Google Calendar

Supported versions

This connector supports Google Calendar REST APIs.

Before you begin

In your Google Cloud project, do the following tasks:

  • Ensure that network connectivity is set up. For information, see Network connectivity.
  • Grant the roles/connectors.admin IAM role to the user configuring the connector.
  • Grant roles/secretmanager.viewer and roles/secretmanager.secretAccessor IAM roles to the service account that you want to use for the connector
  • Enable secretmanager.googleapis.com (Secret Manager API) and connectors.googleapis.com (Connectors API). For more information, see Enabling services.

Configure the connector

A connection is specific to a data source. It means that if you have many data sources, you must create a separate connection for each data source. To create a connection, do the following:

  1. In the Cloud console, go to the Integration Connectors > Connections page and then select or create a Google Cloud project.

    Go to the Connections page

  2. Click + CREATE NEW to open the Create Connection page.
  3. In the Location section, complete the following:
    1. Region: Select a location from the drop-down list.

      For the list of all the supported regions, see Locations.

    2. Click Next.
  4. In the Connection Details section, complete the following:
    1. Connector: Select Google Calendar from the list of available connectors.
    2. Connector version: Select the connector version from the list of available versions.
    3. In the Connection Name field, enter a name for the connection instance. The connection name can contain lowercase letters, numbers, or hyphens. The name must begin with a letter and end with a letter or number and the name must not exceed 49 characters.
    4. Description: Enter a description for the connection instance.
    5. Optionally, enable Cloud logging, and then select a log level. By default, the log level is set to Error.
    6. Service Account: Select a service account that has the required roles.
    7. Connection Timeout: Optionally, enter the connection timeout in seconds.
    8. Optionally, configure the Connection node settings:

      • Minimum number of nodes: Enter the minimum number of connection nodes.
      • Maximum number of nodes: Enter the maximum number of connection nodes.

      A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.

    9. + ADD LABEL: click this to add a label to the connection in the form of a key/value pair.
    10. Click Next.
  5. In the Authentication section, enter the authentication details.
    1. Select an Authentication type and enter the relevant details.

      The following authentication types are supported by the Google Calendar connection:

      • Service Account Authentication
      • OAuth 2.0 - JWT Bearer
      • OAuth 2.0 - Authorization code

      To understand how to configure these authentication types, see Configure authentication.

    2. Click Next.
  6. Review: Review your connection and authentication details.
  7. Click Create.

Configure authentication

Enter the details based on the authentication you want to use.

  • Service Account Authentication: No additional configuration is required for this authentication type. The service account you selected in the Connection Details section will be used for authentication.
  • OAuth 2.0 - JWT Bearer
    • JWT Certificate: Select the certificate to use for JWT authentication.
    • Secret version: Enter the secret version of the JWT certificate.
    • JWT Subject: Enter the JWT subject.
  • OAuth 2.0 - Authorization code
    • Client ID: Enter the client ID to use for OAuth authentication.
    • Scopes: Enter a list of desired scopes.
    • Client Secret: Enter the client secret to use for OAuth authentication.
    • Secret version: Enter the secret version of the client secret.

Connection configuration samples

This section lists the sample values for the various fields that you configure when creating the connection.

Service account connection type

Field name Details
Location us-central1
Connector Google Calendar
Connector version 1
Connection Name service-account-auth
Enable Cloud Logging Yes
Service Account iam.gserviceaccount.com
Minimum number of nodes 2
Maximum number of nodes 50
Authentication Yes
Service Account Authentication Yes

OAuth 2.0 - JWT bearer connection type

Field name Details
Location us-central1
Connector Google Calendar
Connector version 1
Connection Name jwt-bearer-auth
Enable Cloud Logging Yes
Service Account iam.gserviceaccount.com
Minimum number of nodes 2
Maximum number of nodes 50
Authentication Yes
OAuth 2.0 - JWT bearer Yes
JWT Cert projects/google-cloud-project/secrets/jwt-cert/versions/1
Secret version 1

OAuth 2.0 - Authorization code connection type

Field name Details
Location us-central1
Connector Google Calendar
Connector version 1
Connection Name gcpcloud-googlecalendar-rest-conn
Enable Cloud Logging Yes
Service Account iam.gserviceaccount.com
Minimum number of nodes 2
Maximum number of nodes 50
Authentication Yes
Client Id 60875425788659-mt0cm1tguyiagvst468fvaw7.apps.googleusercontent.com
Scope https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/drive
Client Secret ygdruoX-Rtyah9gzkdZc-7CB0Eng9hyaufD0VD
Secret version 1

System limitations

The Google Calendar connector can process a maximum of 2 transactions per second, per node, and throttles any transactions beyond this limit. By default, Integration Connectors allocates 2 nodes (for better availability) for a connection.

For information on the limits applicable to Integration Connectors, see Limits.

Use the Google Calendar connection in an integration

After you create the connection, it becomes available in both Apigee Integration and Application Integration. You can use the connection in an integration through the Connectors task.

  • To understand how to create and use the connectors task in Apigee Integration, see Connectors task.
  • To understand how to create and use the Connectors task in Application Integration, see connectors task.

Entity operation examples

This section shows how to perform some of the entity operations in this connector.

Example - List all the calendars

  1. In the Configure connector task dialog, click Entities.
  2. Select Calendars from the Entity list.
  3. Select the List operation, and then click Done.
  4. In the Task Input section of the Connectors task, you can set the filterClause as per the customer requirement.
  5. You must use single quotes (') to enclose the value for a filterClause.

    You can use the filterClause to filter records based on the columns.

Example - Get calendar details

  1. In the Configure connector task dialog, click Entities.
  2. Select Calendars from the Entity list.
  3. Select the Get operation, and then click Done.
  4. Set the entityId to "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com" which is the key to be passed.
  5. To set the entityId, in the Data Mapper section of the Data Mapping, click Open Data Mapping Editor and then enter "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com" in the Input Value field and set the entityId as local variable.
  6. The value for entityId should be passed directly, such as "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com". Here "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com" is the unique primary key value, which must be passed.

    In certain cases, passing an entityId might throw an error if the entity uses two composite keys. In such cases, you can use the filterClause to pass the value, such as id='c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com'.

Example - Delete a calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select Calendars from the Entity list.
  3. Select the Delete operation, and then click Done.
  4. Set the entityId to "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com" which is the key to be passed. To set the entityId, in the Data Mapper section of the Data Mapping, click Open Data Mapping Editor and then enter "c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com" in the Input Value field and set the entityId as local variable.

    If entity has two composite business or primary keys instead of specifying the entityId, you can also set the filterClause to id='c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com'.

Example - Create a calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select Calendars from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "New calendar"
    }
    

    If the integration is successful, the calendar task's connectorOutputPayload response parameter will have a value similar to the following:

    {
      "Id": "c_5bae32e1c48ed38af98efecbd6da6bb002a31e887276aa65cc2530717123b75f@group.calendar.altostrat.com"
    }
    

Example - Create an event in a calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select AllCalendars from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "New event",
      "CalendarId": "c_b4e891cebb19267bf5ac838f0c5f691bee164a7cec9dcc1a93e54625279baa80@group.calendar.altostrat.com",
      "StartDate": "2025-09-01",
      "EndDate": "2025-09-02"
    }
    

    If the integration is successful, the calendar task's connectorOutputPayload response parameter will have a value similar to the following:

    {
      "Id": "fnf0p7292pbm2buk59ubc1a37k",
      "CalendarId": null
    }
    

Example - Create an event in your primary calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select your email ID from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "new event for my calendar",
      "CalendarId": "xyz@xwf.altostrat.com",
      "StartDate": "2025-09-01",
      "EndDate": "2025-09-02"
    }
    

    If the integration is successful, the AllCalendars task's connectorOutputPayload response parameter will have a value similar to the following:

    {
      "Id": "fnf0p7292pbm2buk59ubc1a37k",
      "CalendarId": null
    }
    

Example - Create a type of event in a calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select AllCalendars from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "EventType": "outOfOffice",
      "Summary": "outOfOffice",
      "CalendarId": "xyz@xwf.altostrat.com",
      "StartDateTime": "2025-09-03 14:00:00",
      "EndDateTime": "2025-09-03 15:00:00"
    }
    

    If the integration is successful, the AllCalendars task's connectorOutputPayload response parameter will have a value similar to the following:

    {
      "Id": "fnf0p7292pbm2buk59ubc1a37k",
      "CalendarId": null
    }
    

Example - Create a recurring event in a calendar

  1. In the Configure connector task dialog, click Entities.
  2. Select AllCalendars from the Entity list.
  3. Select the Create operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "Google Cloud Recurring event",
      "CalendarId": "xyz@xwf.altostrat.com",
      "StartDateTime": "2025-11-2 14:00:00",
      "EndDateTime": "2025-11-2 14:30:00",
      "Recurrences": "RRULE:FREQ=WEEKLY;BYDAY=TH;COUNT=5",
      "StartDateTimeZone": "America/Los_Angeles",
      "EndDateTimeZone": "America/Los_Angeles"
    }
    

    If the integration is successful, the AllCalendars task's connectorOutputPayload response parameter will have a value similar to the following:

    {
      "Id": "fnf0p7292pbm2buk59ubc1a37k",
      "CalendarId": null
    }
    

Example - Update calendar details

  1. In the Configure connector task dialog, click Entities.
  2. Select Calendars from the Entity list.
  3. Select the Update operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "Updated from Google Cloud"
    }
    
  5. Set the entityId in Data Mapper to the entity of the Calendar.
  6. To set the entityId, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the entityId as local variable.

    Instead of specifying the entityId, you can also set the filterClause to id='c_3054d6e09a9dfae7886f995311@group.calendar.altostrat.com'.

    Running this example returns a response similar to the following in the connector task's connectorOutputPayload output variable:

    {
      "Id": "c_5bae32e1c48ed38af98efecbd6da6bb002a31e887276aa65cc2530717123b75f@group.calendar.altostrat.com"
    }
    

Example - Update all calendars details

  1. In the Configure connector task dialog, click Entities.
  2. Select AllCalendars from the Entity list.
  3. Select the Update operation, and then click Done.
  4. In the Data Mapper section of the Data Mapping task, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the connectorInputPayload as local variable.
    {
      "Summary": "Great event"
    }
    
  5. Set the entityId in Data Mapper to the entity of the AllCalendars.
  6. To set the entityId, click Open Data Mapping Editor and then enter a value similar to the following in the Input Value field and set the entityId as local variable.

    Instead of specifying the entityId, you can also set the filterClause to Summary='New sep event'.

    Running this example returns a response similar to the following in the connector task's connectorOutputPayload output variable:

    {
      "Id": "fnf0p7292pbm2buk59ubc1a37k",
      "CalendarId": null
    }
    

Get help from the Google Cloud community

You can post your questions and discuss this connector in the Google Cloud community at Cloud Forums.

What's next