Adding event in Google Calendar

(Antonio) #1

Hi team,
I would like to book an appointment trough a bot by adding the event in a google calendar.
If I ask user to choose a date and time, it works fine!
What if I ask user: not to choose for a date&time but ask him/her to choose between two possibilities: “tomorrow at 10:00 am” or “Day after tomorrow at 3:30 pm”?
How can I add such events in google calendar?

Hope my question make sense

(Antonio) #2

Hi,
I found the formula that, starting from a whatever user’s session date&time, when he/she choose “day after tomorrow at 3:30 pm” returns exactly the day after tomorrow at 3:30 pm.
Following is the formula:
date&time +48h + date&time + 24h-date&time-24h- 15h -30m
I tested it in an excel sheet and it works.
I tried to implement in the flow (add event in google calendar) but it return the following error message:
“‘Start Date/Time’ isn’t in a recognised format (‘Sat Mar 31 2018 08:48:26 GMT+0000 (UTC) +48h +Sat Mar 31 2018 08:48:26 GMT+0000 (UTC) +24h -Sat Mar 31 2018 08:48:26 GMT+0000 (UTC) -24h -15h -30m’).”

As I know it is possible to calculate date/time field in google calendar by writing
“{{myflow.datetime}} +48h”, I desume that is possible writing the following formula

{{myflow.datetime}} +48h +{{myflow.datetime}} +24h -{{myflow.datetime}} -24h -15h -30m
Am I wrong?

(Daniel Beckett) #3

You could use the Date & Time Service to format the date before adding it into Google Calendar.

(Antonio) #4

It was easier than I thought!!
Thank you Daniel