Google Calendar Connector
  • 30 Sep 2022
  • 7 Minutes to read
  • Contributors

Google Calendar Connector


Article Summary

Google Calendar Connector

Integrating Tulip with Google Calendar

Introduction

Google Calendar API allows the users to create, read and edit google calendar events with the right access set to their google accounts. The goal of this connector is to use OAuth Authentication and integrate with Google Calendar V3 Api with Tulip using HTTP Connectors & provide our customers with an out-of-box connector that can be imported into their instance.

Purpose

This document highlights different HTTP connector functions that can be built by doing HTTP calls to Google Calendar V3 API endpoints to interact with the Google Calendar to try out various read and write actions on the calendar that could be leveraged for various use cases.

API Doc

  1. Google Calendar

Pre-Requisites

  1. Create an account on Google's cloud Console & configure the OAuth 2.0 credentials. More information can be found in Google's API docs.
  2. Activate the Google Calendar API in the Google API Console.

Tulip Connection Details

The following information would need to be configured on Tulip's connectors.

  1. Running On: Cloud Connector Host
  2. Host:www.googleapis.com
  3. Port:443
  4. TLS: Yes
  5. Connector Authentication: OAuth2.0(Admin/Operator)
  6. Following are the scopes needed to be passed:

Connector Functions

Get All Calendars

Purpose

This connector will fetch all the calendars existing in a user's google calendar.

Endpoint

HTTP GET call to the endpoint https://www.googleapis.com:443/calendar/v3/users/me/calendarList

Required Input

No Inputs required

Required Output Extractor

  1. Calendar Id: Unique identifier of the Calendar which will be used to carry out the other tasks
  2. Title: The Title of the Calendar
  3. Additional parameters that are returned with the response can be included as part of the output parameters

Get all Events

Purpose

This connector will fetch all the events of a specific calendar.

Endpoint

HTTP GET call to the endpoint -https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events

Required Input

The following are the URL parameters that are to be passed

  1. Calendar Id- Calendar Id/ pass “primary” as a value in the calendar ID parameter. Specifying “Primary” gets all the events of a user's primary calendar.

Required Output Extractor

  1. Calendar Id: Unique identifier of the Calendar which will be used to carry out the other tasks
  2. Event ID: Unique identifier of the Event which will be used to pull details about a specific event.
  3. Title: The Title of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Get Events By Filter

Purpose

This connector fetches all events that fall in the specified date range given by the query parameters.

Endpoint

HTTP GET call to the endpoint -https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events?maxResults={MaxResults}&orderBy=updated&timeMax={MaxTime}&timeMin={MinTime}&singleEvents=true

Required Input

The following are the URL parameters that are to be passed

  1. Calendar ID: Calendar ID
  2. MaxResults: Number of records to fetch
  3. MinTime: Start Date Time of the events to fetch
  4. MaxTime: End Date Time of the events to fetch

Required Output Extractor

  1. Calendar Id: Unique identifier of the Calendar which will be used to carry out the other tasks
  2. Event ID: Unique identifier of the Event which will be used to carry out the other tasks
  3. Title: The Title of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Create a New Event for Single/Group/Multiple Users

Purpose

  1. Users can pass an Event Title, Description, Start DateTime, End DateTime as input & Tulip will create a new event with the event title provided. The response of the API will be the metadata and various properties of the file.
  2. Information is pulled from Google Calendar V3 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.

Endpoint

HTTP POST call to the endpoint https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events

Required Input

The following are the parameters that are sent as the Request Body

  1. Calendar ID- Selected Calendar ID
  2. Event Title - The Event Title
  3. Start Date Time- Event Start Date Time
  4. End Date Time- Event End Date Time
  5. Time Zone- Event Timezone
  6. Attendees- Event Attendees
  7. Location-Event Location
  8. Description - Description of the Event

Required Output Extractor

  1. Event Id: Unique identifier of the Event which will be used to carry out the other tasks
  2. Event Title: The Title of the Event
  3. Organizer: Organizer name of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Create a New Recurring Event for Single/Group/Multiple Users

Purpose

  1. Users can pass an Event Title, Description, Start DateTime, End DateTime, Recurrence End DateTime, Recurrence Type, and other parameters as input & Tulip will create a new event with the event title provided. The response of the API will be the metadata and various properties of the file.
  2. Information is pulled from Google Calendar V3 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.

Endpoint

HTTP POST call to the endpoint https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events

Required Input

The following are the parameters that are sent as the Request Body

  1. Calendar ID- Selected Calendar ID
  2. Event Title - The Event Title
  3. Start Date Time- Event Start Date Time
  4. End Date Time- Event End Date Time
  5. Time Zone- Event Timezone
  6. Attendees- Event Attendees
  7. Description - Description of the Event
  8. Location-Event Location
  9. Recurrence Rule- The Recurrence Rule contains all the details of how and when the event should recur. Below are the list of few recurrence rule added in-app (Refer [RFC5545](https://tools.ietf.org/html/rfc5545

##section-3.8.5) document for detailed recurrence rules) :

Daily for occurrences:

RRULE:FREQ=DAILY;COUNT=

Ex: RRULE:FREQ=DAILY;COUNT=5

The event occurs for 5days from the event start date for the same start time and end time.

Daily until :

RRULE:FREQ=DAILY;UNTIL=

Ex: RRULE:FREQ=DAILY;UNTIL=20210924T000000Z

The event occurs daily until “September 24 2021” from the event start date for the same start time and end time.

Weekly for occurrences:

RRULE:FREQ=WEEKLY;COUNT=

Ex: RRULE:FREQ=WEEKLY;COUNT=3

The event occurs Weekly for 3 weeks for the same day of the weekday of the event start date and for the same start time and end time.

Weekly until :

RRULE:FREQ=WEEKLY;UNTIL=

Ex: RRULE:FREQ=WEEKLY;UNTIL=20210924T000000Z

The event occurs Weekly until “September 24, 2021” for the same day of the weekday of the event start date and for the same start time and end time

Every Tuesday, every other month:(this)

RRULE:FREQ=MONTHLY;INTERVAL=;BYDAY=

Ex: RRULE:FREQ=MONTHLY;INTERVAL=2;BYDAY=TU

The event occurs Tuesday of every other month for the same start time and end time.

Required Output Extractor

  1. Event Id: Unique identifier of the Event which will be used to carry out the other tasks
  2. Event Title: The Title of the Event
  3. Organizer: Organizer name of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Update an Event Metadata

Purpose

  1. Users can pass an Event Title, Description, Start DateTime, End DateTime, and other parameters as input & Tulip will update an existing event with the provided inputs. The response of the API will be the metadata and various properties of the file.
  2. Information is pulled from Google Calendar V3 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.

Endpoint

HTTP PATCH call to the endpoint https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events/{EventID}?sendUpdates=all&fields=*

Required Input

The following are the parameters that are sent as the Request Body

  1. Calendar ID- Selected Calendar ID
  2. Event ID- Selected Event ID
  3. Event Title - The Event Title
  4. Start Date Time- Event Start Date Time
  5. End Date Time- Event End Date Time
  6. Time Zone- Event Timezone
  7. Location-Event Location
  8. Description - Description of the Event

Required Output Extractor

  1. Event Id: Unique identifier of the Event which will be used to carry out the other tasks
  2. Event Title: The Title of the Event
  3. Event Description: The Title of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Update a Recurring Event

Purpose

  1. Users can pass an Event Title, Description, Start DateTime, End DateTime, Recurrence Rule, and other parameters as input & Tulip will update an existing event with the provided inputs. The response of the API will be the metadata and various properties of the file.
  2. Information is pulled from Google Calendar V3 API can then be further used either within Tulip apps, Tulip tables, or Tulip variables which would be piped into other connector functions.

Endpoint

HTTP PATCH call to the endpoint https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events/{EventID}?sendUpdates=all&fields=*

Required Input

The following are the parameters that are sent as the Request Body

  1. Calendar ID- Selected Calendar ID
  2. Event ID- Selected Event ID
  3. Event Title - The Event Title
  4. Start Date Time- Event Start Date Time
  5. End Date Time- Event End Date Time
  6. Time Zone- Event Timezone
  7. Location-Event Location
  8. Description- Description of the Event
  9. Recurrence Rule- The Recurrence Rule contains all the details of how and when the event should recur. Refer to the list of few recurrence rules added in-app mentioned above document for detailed recurrence rules)

Required Output Extractor

  1. Event Id: Unique identifier of the Event which will be used to carry out the other tasks
  2. Event Title: The Title of the Event
  3. Event Description: The Title of the Event
  4. Additional parameters that are returned with the response can be included as part of the output parameters

Delete an Event

Purpose

  1. Users can pass Calendar ID & Event ID as input & Tulip will delete the event in the google calendar.

Endpoint

HTTP DELETE call to the endpoint -https://www.googleapis.com:443/calendar/v3/calendars/{CalendarID}/events/{EventID}

Required Input

The following are the parameters that are sent as the Request Body

  1. Calendar ID- Selected Calendar ID
  2. Event ID- Selected Event ID

Was this article helpful?