Covert odd date extracted with regular expression from email to ISO, so I can create event in G-calendar

Hi everyone,

I’m trying to automate adding events to Google Calendar using Make.com, but I’m stuck on a date formatting issue. The date I receive from an email is in the format “Feb 3, 2025” (I extract this with text parser module) and I need to convert it to “MM-DD-YYYY” for Google Calendar. I attempted to use the parseDate and formatDate functions like this directly in the g-calendar module:

{{ formatDate(parseDate("Feb 3, 2025"; "MMM D, YYYY"); "MM-DD-YYYY") }}

However, I’m getting an error. I’m not sure if I’m using the functions correctly or if there’s another way to achieve this conversion.

Please help :slight_smile:

@Ivan_Germanov just use {{parseDate("Feb 3, 2025"; "MMM D, YYYY")}} without the formatDate().

3 Likes

It works! Four hours of my life that I could if saved if I created this threat earlier. Thank you!!!

1 Like

So I would really appreciate if you can give me a clue how to solve the whole puzzle. I want to create a google calendar event by searching for a specific email in my inbox, taking out string with regular expressions and creating the event after them.

So this is the email and this are the strings I want to take out and set as the invitation details:

meet.google.com/vuj-XXXX-sqc
Feb 3, 2025
12:30 PM EET
lurie NXXa
nuca.iXXXe@gXail.com

All strings are dynamic, they will change with each email

I managed to take out the Date as value with regular expression and parse it in the calendar successfully with your help. Now I don’t know how to take all those details in bulk as values and set the in the calendar invite.

This is my scenario so far:



If I manage to get those as separate values I will be able to setup my calendar module.

Thank you :slight_smile:

Now I managed to take these values:

However when entering them in the calendar module they fail and always create the meeting for 00:00.

these are my settings:

What should I do?
Also I have the timezone as value too - is there a way to include it in also for maximum accuracy?
@Ronak_Bhagdev

@Ivan_Germanov, you forgot a space between date and time. So, the correct input is

{{parseDate("Feb 3, 2025"+" "+"12:20 PM"; "MMM D, YYYY hh:mm a")}}

Regarding the timezone, there is no direct way. But…

1). You can use Set Variables, add variables for all 40 zones, and then use the same in the calendar.

2). OR set up an array
3). OR use Json to array.

1 Like

The missing puzzle… You rock! Thank you!

What module should I use to extract multiple variables dynamically from an email?

Is there a way to scrape this emails:

And get a set of separate variables:

  1. Feb 3, 2025
  2. 12:30 PM EET
  3. meet.google.com/vuj-oyew-sXX
  4. nuca.iuXXe@gmail.coX
  5. 20 min
  6. EET
  7. Iurie NuXa

What would be the most straightforward way?

BTW I should buy you a beer :beers:

Just to clarify I did test some solutions (up until 3 am yesterday :D) but ended up with a “module train”. It works but its inefficient.

@Ivan_Germanov use the following regex to extract all the variables. Check Global Match, Single Line and Multiline.

^Location:\s*(.*?)\r?\n^Date:\s*(.*?)\r?\n^Time:\s*(\d{1,2}:\d{2}\s*[APMapm]{2})\s+(\S+)\s*\(([^)]*)\)\r?\n(?:\r?\n\s*)*^Founder:\s*(.*?)\r?\n^(?:.*\(([^)]+)\).*?)$