Scenario to return today's events in google calendar

Hi everyone,

I’m trying to make a simple scenario that connects to Google Calendar and gets my events for the day scenario is run.

I’m using the Google Calendar module, and this is what my initial settings look like

Put my results look like this

Screenshot 2023-01-06 at 9.24.39 AM

Not sure what I’m missing here. I’m expecting the end date to be the same as the current date and time +8 hours

Any help understanding why this is returning Jan 20 1970 would be appreciated.

Matt

When asking your question, please include:

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

@Matt_Cooper Great question, you are almost there :wink:
If you hover over the timestamp function you can see it actually returns an integer of the current datetime as timestamp. The addHours() function expects a date, and not an integer which is why it returns that weird value.

You can fix it in 2 ways:

  • Add a parseDate() function to parse the timestamp to a date object
  • Use the now function to actually add a datetime object in there

Hope that helps you out :wink: Goodluck!

Let us know if you need any other assistance

1 Like