Use Google Calendar as a data source


Data Source Type: REST/URL
Authentication: OAuthToken Authentication
Sample Query Basic query:

The above query with additional time and date parameters:{date.startOfWeek.format("yyyy-MM-dd'T'HH:mm:ss")}-04:00&timeMax={date.endOfWeek.format("yyyy-MM-dd'T'HH:mm:ss")}-04:00
API Documentation Google Calendar API Documentation
API Explorer Google Calendar API explorer


Creating a data source using Google Calendar

To create a data source using Google Calendar data, you need to accomplish these tasks:

  • Start the data source creation process.
  • Write a query and enter it in Klipfolio.

Step 1. Start the data source creation process

To create a data source using Google Calendar, go to the Connector Gallery page in Klipfolio and select Google Calendar.

Step 2: Write a query and enter it into Klipfolio

Here is a sample query that will help you create a simple API call.

To retrieve all calendar events:

  1. Enter the above query in the URL field in Klipfolio.
  2. At Data Format, select JSON.
  3. At Method, select GET.

Add to the query

You can use the base query above to retrieve all calendar events, or you can add query parameters to retrieve more specific information with the help of the Google Calendar API Documentation and Google Calendar API explorer.

Use the Google Calendar API explorer

The best way to build your query and add parameters is with the Google Calendar API explorer.

    1. Navigate to the Navigate to the Google Calendar API explorer.
    2. At Authorize requests using OAuth 2.0 (top right corner of the page) click the ON button.
    3. In the popup window, select Authorize.
    4. Choose the appropriate Google account for your calendar.
    5. Select Accept.
    6. Enter your chosen calendar ID
    7. Add any additional fields to the query string.
    8. Select Execute.
    9. Copy the Request URL into Klipfolio.
    10. Make sure the date format is using timeMin and timeMax and that they are offset from UTC. 
      For example,{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
      To learn more about date ranges in queries, see Date parameters in data source queries

      In the example above, we build off the base URL above and add date, time and week parameters.

      Find a Calendar ID and time zone

      Your calendar ID is typically the email address associated with your Google Calendar account. Your time zone is a value offset from UTC. If you are unsure of your calendar ID and/or time zone,

      1. Navigate to Google Calendar
      2. In the drop down menu of your chosen calendar, select Calendar settings.
      3. At Calendar Address, copy the calendar ID.
      4. At Calendar Time Zone copy the time zone in the same format. For example, -04:00.

      Related Links

Have more questions? Submit a request