The connection between Jetappointment(crocoblock) using a webhook and Google Calendar is not working properly

The connection between Jetappointment(crocoblock) using a webhook and Google Calendar is not working properly.

Please tell me how to fix it.

◆w2.jpg: Diagram of output from webhook
date = 1717200000
slot = 1717232400
slotEnd = 1717236000


◆w3.jpg: Diagram of input to googleCalendar
End Date = empty
Start Date = empty

◆w4.jpg: Diagram of Google Calendar settings


I want to solve this problem.
Jetappointment (crocoblock) support says that the Jetappointment settings are correct.

Hello @yoshi,

You will need to submit dates to Google Calendar but the date coming in from the webhook are unix timestamps formatted as numbers.
Just use parseDate(1717200000) to get a date and should be able to use this parseDate() formula in the Google Calendar module.

3 Likes

thank you for the advice.
Specifically, where and how should I write it?

Actually, from your screenshot it looks correct - the parseDate functions in both Start Date and End Date fields. I don’t know why I didn’t notice that before.

What is the output of your Google Calendar module telling you about the error it has when it runs?

1 Like

thanks.
like this.https://lux-h.com/makeqa/aa3.jpg

Yes, that’s saying you must have an if() function in either your Start Date or End Date field and it didn’t evaluate correctly, leading to it sending invalid data in the API call.

In your original screenshot you had only parseDate() functions in the Start Date and End Date fields, have you modified those?

Please show the fields before running the module (like in your original screenshot) and the result of the Google module like in your most recent link.

1 Like

The problem is now resolved.
The cause was that the x was written in lower case.

There is another problem.
The webhook outputs the time in Tokyo.
The 9-hour time difference between world standard time and Tokyo is displayed on Google Calendar.

How should I fix it?
https://lux-h.com/makeqa/aa4.jpg https://lux-h.com/makeqa/aa5.jpg

Let’s see if I can get this right because date and time can get confusing…

The webhook is giving you Unixtime which is always based on GMT.
How you see it in Make by default is based on your org’s timezone, but how it’s passed on to other modules is still GMT.

If you need to adjust it for Google Calendar then you can apply a formatDate() function on it like this:
{{formatDate(1717200000; "YYYY-MM-DD HH:mm"; "Asia/Tokyo")}}

That will take the unixtime of 1717200000 which converts to:
Sat Jun 01 2024 00:00:00 GMT+0000

Then the formatDate will add 9 hours to adjust for the time zone difference, then format it like this:
2024-06-01 09:00

That input should be sufficient for Google Calendar.

1 Like