0

Google Calendar Today and Upcoming events - Rolling data

Hey Klipfolio experts,

I've been loading Google calendar events and wanted to understand how I can set "Today" date (in timeMin) from the GET call and for next 2 weeks time (in timeMax) and was just not able to do it.

Output :Pull events data for the following time duration. This is 2 weeks of rolling data that should be fully dynamic.

timeMin = Today (dynamic)  ; timeMax = 2 weeks from now (dynamic) 

The query for Today's events is as follows - gives all events for today.

https://www.googleapis.com/calendar/v3/calendars/trIDdg@group.calendar.google.com/events?timeMin={date.format("yyyy-MM-dd'T'00:00:00Z")}&timeMax={date.format("yyyy-MM-dd'T'23:59:59Z")}&singleEvents=true

Other types of queries: 

https://www.googleapis.com/calendar/v3/calendars/thesparkfk4c@group.calendar.google.com/events?timeMin={date.startOfMonth.format("yyyy-MM-dd'T'HH:mm:ss")}-04:00&timeMax={date.endOfMonth.format("yyyy-MM-dd'T'HH:mm:ss")}-04:00

-- startOfMonth and startOfWeek  queries total - but this does not give rolling data again as the week or month ends.

 

Let me know how I can go about setting dates to get 2 weeks rolling data of events from today here

 

6 comments

Please sign in to leave a comment.