Make.com Timezones explained | Full Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
as weird as it sounds but with at least 50% of the clients that create make.com scenarios in house I have seen the weirdest methods of dealing with time zones surprisingly enough I've even seen other YouTubers in the automation space dealing with time zone in a way that makes no sense at all they for example use AI to determine the time zone of a Time string which in my opinion is just the worst approach you can probably take not is it really inaccurate and it often breaks things but it is also coming along with additional costs for your me.com scenarios which I just really don't understand so today's video is my Approach on showing you how you can actually convert time zones and manage them directly inside of make.com without occurring extra costs so that your workflows work better and are more accurate before we even dive into the scenarios I would like you to know that make.com has its very own way of handling time zones oh and to sprinkle in a little bit more of complexity it's not only one but it's two ways the first one is your time zone defined on an organizational level or basically your company level inside of make.com this time zone is used for everything on a tech level and it is defined by you once you create your account to give you a better example let's assume you have a scenario that is scheduled to execute at 3:00 a.m. in the morning then make.com will use your time zone to determine what 3:00 a.m. actually means so let's assume you're from the US and you want to schedule something at 3:00 a.m. in the morning then it would be 3:00 a.m. for you but for the European clients it would probably be somewhere around noon the second way how make.com is altering the time zones is by defining it on a user level so you as a user when you log into make.com you have the possibility of defining a time zone apart from the organization that is dependent on wherever you are while this doesn't do much on a technical level it helps you to understand the time zones that you're working in so that they can be adjusted visually by make.com so that you can represent them based on your time zone now imagine for example your client is in the US they want to have a schedule at 3:00 a.m. in the morning and you're sitting let's say in Asia somewhere you can have your time zone and it shows you basically the execution time of that us time zone but in your time zone so that you can get a better understanding of when that schedule is actually happening based on your time zone so that it's easier for you to debug now while make.com efforts are great on one hand they are bad on the other especially if you work with web hooks that don't properly format their date and time strings you may think no wow that's great yanis but why is it bad that make.com provides a time zone wouldn't it be worse if there wouldn't be any at all that is certainly a valid point but there will always be a time zone nevertheless of what make.com says and that my friends brings us to the next part the coordinated universal time zone or in short UTC mostly anything that happens on a technical level let's say servers let's say the backend structure of make.com everything works with a universal time zone called UTC so this allows us to basically streamline the time zone across a lot of technical aspects so we can always have it in one format that we can then use to brunch it out to other formats or other time zones we need it in and like I just shared make.com is not different it also handles the time zones directly inside of UTC and I'm going to prove it to you right here on my screen within a scenario that I just created so it is a basic plain scenario like you would usually see it once you create it and what I'm going to do now is I literally just select the tools and I select the set multiple variable section and within it I just Define a variable and we're going to call that one date time string so now if I'm going to click in the variable value you probably also know that within here in this tabs of the dynamic text you will have one tap for the date and times so you can basically pre-select a time and you can also add variables like a time stamp now and you have a couple of functions in my example I'm just going to use the now variable so when I click okay and I'm going to run the scenario you'll see one specific thing I'm going to see here a time stamp which is the current time of my time zone important to mention because that is the time zone that makes uses from my user profile to display that information so you can see it is June 22nd at 10:40 a.m. which is my time zone but now there comes the part as you can see already in the little popup the time zone that is actually displayed as the time and date string looks different so if you don't see it with a popup or if you want to see it in a better way you can also go to download output bundles and once you open it you can see the actual date and time string right here and I'm just going to give you a quick explanation of it so you know what's going on obviously in the beginning we have the normal date formatted by the month by the year then the month and then the the days there is another reason why it is formatted in that way because you can you can hierarchically order it based on the date exactly so let's say you have the 2024 is the highest number then you have June which is the highest number then you have the day which is the highest number after so you can simply break it down and you can just kind of create an hierarchy which makes it easier with starting algorithms to figure out a time a very small detail but that is why it is written in that format with the year first then the month and then the days because you have it easier to sort things based on the current time to the older time Etc then we have a little T here which just stands for time which is kind of the separator that we use for separating the time from that actual date as you can see here we have the hours we have the minutes we have the seconds and down here we have the milliseconds at the very end separated by a DOT and by having three characters of it and at the end you see a weird Z which is very important that Z basically stands for Zulu which is just another time zone in the UTC time zone itself it is just something that we use to determine a very short and easy way on how the UTC time phone is defined so that that basically stands for Zulu like I mentioned so we know that this time string is in the UTC time format which again is just what make.com internally uses as well to use the time zones which in my opinion and probably everyone else's opinion too is that time zone that we should use when dealing with apis and web Hooks and anything else a technological level so basically everything that happens in me.com also runs on UTC so why do they do this time zone conversion in the first place the answer is to make it simpler for you so that you can deal with time zones in a visual way without worrying about converting things all the time back to UTC imagine you want to schedule a task inside of make.com for your scenario and you would need to always calculate back to oh what is actually the right UTC time I need to use to start this thing based on my time zone let's say I'm in the US and I would like to start it at 3:00 a.m. in the morning how do I need to format this UTC time time zone so that it works exactly at 3:00 a.m. in the morning in the US so it's just a way of unifying that whole setup so that it's easier for you to handle and the arrow rate is less now while this actually makes it easier when you use make.com on a daily basis it sometimes becomes a bit of a trouble especially if you work with UTC time zones like me as a developer I always work with UTC time zones in that case it becomes a little bit more complex and that is not the only thing there are other things like apis as well that often do completely weird things but I'm going to get into this right now if you've seen my previous videos about Ai and web hooks you probably know that most providers that create web hooks so that might be the developers inside the company whatever other external service provider they use for creating those API end points they all have their very own interpretation of how a web hook or an API should look like so there are massive differences sometimes on how they work even though we expect them based on the notations we have so far they should be fairly similar right unfortunately it isn't that easy and I often see things like time zones being returned in a separate field and then the date and time string is in another field but it has no time zone definition at the end which means for example not have a z at the end that defines the julu time zone in that case if we only have a time we don't know exactly what time zone it is in right so we would need to rely on that extra time zone parameter now while this is graded is actually very complex for make.com to reformat the time zone or convert it from one time zone that is not UTC to another time zone because make.com offers you two functions maybe you've seen them they're called pars date and format date and to give you a basic explanation of those functions pars date basically just translates a date string so basically a date and a time in a string format and it turns it into an actual date time format so kind of like a time stamp if you can imagine this just generalizes the thing in one way which is great which is exactly what we want so we can even Define the format it should output it the problem is it always or very often defines it in the time zone of the organization or the user so you might get a different time zone outcome that you have expected when you actually get it so to give you an example let's for example say we have a date time string that comes at 10:00 a.m. in the morning in the US but you are sitting for example in Europe and you're getting this time string and you want to pars it or you want to format it with those functions make.com most likely will format it depending on the organization's time string which again can falsify that information if it was provided incorrectly by the API because of that it is incredibly hard to actually get the correct time zone formatted into a Time string that make.com can work with with a time zone directly included into that date and time string now luckily you're watching this video cuz I'm going to provide you a solution for all of that and it is completely for free you don't need to create any accounts or whatsoever and it directly Works inside of make.com flawlessly and we are really using that for a lot of our clients especially for converting time zones with voice AI assistants where people can for example say on the phone hey I would like to schedule a meeting tomorrow it and then you basically have ai just take that value and pars it through send it to a function and then we need to do some formatting there in that case it's again the exact same scenario we have a time zone that we pass in in a in a separate format or in a separate field because sometimes with UTC time zone conversion by AI it makes a lot of mistakes we don't like that so that is exactly why I try to rely as less as possible and I literally just try to get the static or the most accurate and absolute ABS solute values from the conversation that we have with the user in the voice AI system and send that back to the user so we of course know where the user is from because of the lead list that we usually call and we also have their time zone in most cases so we can just pass that along in the request great so now we have the date and time string and we have the time zone separately so how can we format them so the tool I'm talking about is called time zone.io and it is basically a free service that allows you to map and validate and convert time zones in a visual way directly inside of make.com so that you can rely on a service that actually does really really good time zone formatting without relying on the fact that make.com translates time zone depending on yours even though that is not even what you want for that specific use case you might have run into that in the past or you might have just ignored it and you just feed in wrong dates I've seen that many times as well that people just say whatever the date doesn't matter that much to me if it's like an hour difference who really cares they just push it in and that's it but I value accuracy and for us that is really really important especially if you want to run more scheduled tasks after so that is exactly why I'm going to show you that and it's going to be super powerful so let's just jump right over to my screen as you can see on my screen now we are back inside of the make.com scenario and I'm going to click on the variable field cuz we now set a time string but what we're going to do instead is I'm just going to copy that part right from here so as you can see we basically just take that dat time string and I'm just going to feed that right within here and as you can see now we have basically no definition of the time zone itself so in that case what is it we don't know we cannot really say it for sure it probably is UTC if it comes from an API but I really mean probably because often is actually the user time zone as well I've seen this with so many apis and that case what they usually have they have another field it's called time zone and then they're going to send over the time zone so let's say our customers in the US we can say for example America SL and then lore Angeles there's a whole list for those time zones I'm going to show show you them as well they also documented directly in the time API so now if I'm going to click okay here and I'm going to run that you can see that it basically just sends over this time string and it sends over the time zone so these are often values that I've seen come in from web hooks from API endpoints that can trigger a scenario in make.com so now my goal is to basically generalize that and format that specific time of that time zone to UTC so that we can leverage it directly inside of make.com without needing to worry about the time zone being wrong or incorrect or whatsoever to do that what we are going to do is we click here on the little Plus for adding a new module we're going to select the HTTP module you scroll down and you select the make a request action now we can define a URL and a couple of other parameters and that is exactly where time API comes in so this is the page of time API as you can see here it is completely for free so all you do is you simply head over to the website you copy their URL time api. I'm going to paste it here now I'm going to head over to get started which opens the Swagger documentation so Swagger is basically just a generalized format of providing an API documentation for you in a visual way you can basically just use it to get your API documentation in a Json format whatsoever it is just a standard for creating apis in a visual way so that you understand them that's all you need to know the good thing is I'm telling you that because in a lot of documentations for different apis it always looks the same so you can see this format so if you get yourself familiar with this format it definitely helps you a lot down the line so if you know Swagger you know that this is basically the endpoints that are provided which are the endpoints that we can interact with on their API and since we would like to convert a time zone in my case we would use their conversion endpoint but as you can see they also have time end points they have time zone end points they allow you to do a lot of different formattings but we really just care about the time zone conversion and I haven't mentioned it yet but you don't need to know any coding but you definitely itely need to know what Json is or you should defin basically be able to understand Json because Json is the structured format that we use for communicating with the API so if that sounds complicated Don't Be Afraid what we're going to do now is we basically just copy this URL here since I cannot really copy it I'm just going to copy that part and I can see there's an/ API in the front so what we would do is at the end of this URL we would paste API and then I'll just add this whole time zone conversion string right here which is this one as a method we have get here this one requires a post method so what we're going to do is Swit change the method method to post going to head back over to time API and now you can see that it basically just sends over a Json as a payload head basically over to another tool called Json editor online it is also for free I'm going to paste this whole string right here and you can see now a couple of values I'm just pasting it here so I can show it to you visually and I can make it a little bit easier to understand so we have the from time zone which is obviously clear this is the time zone where the the actual time that comes in is from so in our case this would be uh actually like here America Los Angeles so we would literally just put put that part here then we would have the actual date and time which is the one that comes from the API right and we would have the two time zone and the two time zone is very important cuz that is the one we would like to format it in so we would set this one to Simply UTC you can even set it to other time zones in the UTC time zone because there are quite a few in that uh in the time zone so you can Define Zulu you can Define UTC in my opinion I just use UTC because it's the easiest and you don't need to remember much then we also have DST ambiguity which is something that you probably don't need to worry too much it's more interesting if it comes to time zone conversion of winter summertime so for countries that for example switch the time zone right if you want to support that or not so in my case I'm just going to leave it empty and I'm going to copy this whole Json what I'm going to do now is head into the make.com scenario with here within here in the body type I select draw then I select the content type Json and in the request content I'm just going to post this part right here so now since we have the values available from our incoming web hook which are the ones that we would like to format to the UTC time zone what I would do is I would obviously remove the time zone here and I would say select the time zone dynamically from the drop down and I'm going to do the same thing for the daytime right here so let's just select this day time string and we're going to set also par response to yes so we can actually see the response and what I'm going to do now is I'm just running this whole thing so now if we click here on the little bubble you can see that oh it says a 400 error which means something went wrong we can also see that it says invalid dat time format which means the time and date that we actually inputed here is not in a correct format so right now you can see it's in a visual format and obviously I think for most apis it will never arrive this way but to show you that we can still make this work I'm going to show you an example at the end of this video on how we can use this daytime string to actually format it so that it works as well but now for Simplicity reasons what I'm going to do is I'll simply use the predefined time that is defined here in the API so we can actually just test it alongside of with this one so I'm just going to click in here I'm going to add another variable we're going to call it um dat time string wrong this is where I'm going to paste this part up here and here I'm going to P this part so I'm just going to change it to the current year just to make it a little more accurate now I'm going to press okay and I'm going to run this whole thing again so now if we did everything right we get a status qu 200 back which means now it actually recognize the data format which is this format that we just have available here or the MySQL format and inside the data format it becomes really interesting now so look at this we have the from time zone from date and the two time zone which is the values that we defined and then we have the conversion results which are very interesting so you can see the exact separate values broken down into separate fields you can always access them separately you can as well see the date time which is the exact conversion of the date time that we have and as you can see here we have as well the T but the Z is missing at the end right so what we could do now is uh before I'm going into that actually I just wanted to show you the other values as well so DST active is false which is okay time zone is UTC this is exactly what we wanted and now if you want to turn this into a UTC Tim stamp what we can do is we literally just add the Z at the very end inside of our next field so let's for example say we're going to have another one for setting a variable let's say new time stamp and then we can say in here okay we have the conversation uh the the conversion results I'm going to set this daytime and at the end I'm adding a z because we have UTC which is Zulu so now if I'm going to run this whole thing again you can see directly in here we have a properly formatted Tim stamp and this one will also work directly inside of make.com obviously I see you have the actually we have one more thing that we could do here we have 0 0 okay we have basically the the standard definition so we have no milliseconds as you can see in this in this response right here we have basically the hours the minutes and the seconds so in order to also properly mention the milliseconds what we can do is we simply go right back into here I add a point before the Z and then I just add 0 0 which would be the definition for milliseconds because we don't have it in that case so now if I'm going to run this whole thing you can see directly within here we have now basically a properly formatted time string and you can see that it automatically formats it based on M com's validation but if you're looking into the output bundels you can see that we have the properly formatted time string now we have it in UTC depending on the customer time zone so that we can reuse it inside of our scenario wherever we need it now like I mentioned we have the other part that I just defined here which is the time string that is wrong so we could basically reformat that time string directly inside of make.com as well in that case what I'm going to do is I'll simply head a another module we're going to add another tools module and I'm going to set multiple variables so now we say the wrong format corrected so it's just another variable I'm defining for you and right within here our goal is to basically just take take this wrong dat time string and format it into a different format so that it is available in a proper time stamp that we can then reuse again inside of make.com so to do that what I what I will do is I will head over to the date and time functions I'm going to set the par date right here now within the part date in the first part so in the in the date part I'm going to add this wrong date time string and here we can now Define the exact format of that we that we have addited so you can see the time string says here June so June so if you look now in the make.com documentation you can see here in format we have tokens for date time formatting so we can simply open that one and you will now see a massive list of things that we can use for formatting uh the daytime you can see here January February November December so what have we defined here we have actually defined June which is the fully written month so in that case this would be the right word so I'm going to use that I'm going to paste that directly inside here cuz June is the first value that we basically use then I'm going to add a space and now we have 22 which are the days and the days were defined as DD as you can see here because it's the the twod digigit definition so then we basically just add here DD then you can see it's a comma separation then it's a space as you can see here and then it's the year so for the year just going to paste y y y y because I know this is the one for the actual year as you can see here too and now at the end we have the we have another space and then we have the standard definition of the time that we also use in in make.com so we have here the two digit definition with HH which is for the hours we're going to paste HH we can also see maybe within here actually we can even just get that from here so HH double Point mm which is the exact same definition like here and I guess that is actually the definition let me just check exactly the value that we sending through oh it says am as well at the end so then we basically need to add this as well so I click again at the very end I'm going to add another space now we can check for the DAT and time format of am which is here which is a big a so we going to add the big a here just going to C okay I'm not going to add an extra time zone I'm just going to run this whole thing and yeah so now if we look at it we can see that yep I have the wrong time string right here so what I'm going to do is I play I remove this one cuz it was the original one but we want the actual wrong one cuz that's the one we formatted for I'm going to click okay now we're going to run the scenario again and now again if you look into here we can see June 22nd 20 24th 10: a.m. so it looks the exact same right but if we going to look into the output bundle you can see that the actual time format was formatted to a Zulu time which means now it is actually the internal time that we were expecting the only difference is we can see 640 and this is exactly what I mean with u make.com doing all the formatting for you it formats it again depending on your current time zone so we don't want that what we want is we want to use the UTC time zone so what I'm going to do is I'll add another semicolon I'm going to say UTC so I'm going to press this whole scenario or run it again and now we can see it says 2:40 p.m. here probably my time and you can see 10:40 is the the zulu time so the UTC time stamp which would then again match with that actual time zone that we defining so just to show you that the whole thing again 1040 is now the the zulu time which if we would Define it here would be basically the UTC time right again it doesn't fully make sense because now we have the UTC time so what we would do is we would basically still kind of use the format I would just probably strip away the Z at the end of the tag right within here and I would then send it again to the time API and then format it over again and then you can basically again get the proper time conversion so just one more thing so that you actually see that it or how it would do it I would basically just click on add item I would Define the new value here just going to call that one and now we could basically do the same thing we did here now just with one more thing and this is right right here in the text and binary functions you can find a field here called replace I'm just going to put in whatever we had here then I'm searching for the Z and I'm going to replace it by an empty string so if I run this thing again you can see now we can see an arrow actually okay so it probably because it it considers it a time format so in that case we probably even need to format it to a text string so in that case Cas I would probably just copy that part again going to head back into here it's good actually that we can test it now so you can you can get a feeling on on what you need to do uh over here we have another function it is called two string I'm going to paste this whole thing in here going to click okay and I'm going to run this whole thing again so now if we look into it you can see that we basically have now formatted that actual time stamp but we have removed the Z at the end and now we could for example use this thing again in the same format and we can feed it directly into the time API and then time API does the formatting for us so again what I just showed you now is a little more more complex and honestly I would have probably never even expected this kind of format from an API but I just wanted to show you that even with the wrong time format here you can still pars information and you can format it in a time stamp and then use the initial time zone that came along with it to format the time again based on the time API definition or API so that's a lot of information to digest I suggest to just check this video over and over so if you have any further questions you're most welcome to drop them down below in the comments and that's all I got for you I hope you got some value out of this video thanks for watching and see you next time
Info
Channel: Jannis Moore | AI Automation
Views: 489
Rating: undefined out of 5
Keywords: make.com, make.com tutorial, make.com guide, make.com course, make.com money guide, make.com entrepreneur, make.com money, make.com for people who want to make real money, make.com api, course make.com, learn make.com, make.com time zones, automate with make.com, make.com tips, make.com automation, make.com if function, if function make.com, make.com tutorial for beginners, make.com if, if make.com, make.com switch function, make.com ifempty function
Id: aNWz076u_x4
Channel Id: undefined
Length: 22min 58sec (1378 seconds)
Published: Mon Jul 01 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.