⚒️Configuring Google Workspace Calendar Integration

Google Calendar integration is supported for Google Workspace accounts. This feature is not supported when using individual Google accounts.

Following the instructions in this document requires admin access to the organization’s Google Workspace.

Overview

For Cubu to access the Google Workspace Calendars of users in your organization, you must provide Cubu with the proper credentials.

The process consists of the following steps:

  1. Enabling Google Calendar API and creating a service account with API credentials on Google Cloud Platform (GCP).

  2. Authorizing the service account to access users' data in your Google Workspace.

  3. Configuring Cubu calendars integration.

Google Cloud Platform Configuration

  1. Set up a Google Cloud Platform Project:

  2. Enable the Google Calendar API:

    • In the Google Cloud Console, go to the Library and search for "Google Calendar API."

    • Click on the result and enable the API for your project.

  3. Create API Credentials:

    • In the Google Cloud Console, navigate to "APIs & Services" > "Credentials."

    • Click "Create credentials" and choose "Service accounts".

    • Click on “CREATE SERVICE ACCOUNT”

    • Name the service account and set the service account ID.

    • Complete the steps (using defaults) to create the account.

  4. Creating a private key for the service account

    • From the Credentials section, click on the service account you have just created.

    • Go to the KEYS tab and click on ADD KEY

    • Choose JSON and click CREATE. This will download a JSON credentials file to your computer.

At the end of this process, your Google Calendar API should look similar to this:

Google Workspace Configuration

Delegating domain-wide authority to the service account

In this step, you will authorize the service account created in the previous section to access Workspace user data on behalf of users in the Google Workspace domain.

  1. Go to Security > Access and data control > API controls

  2. Click on MANAGE DOMAIN WIDE DELEGATION

  3. In the Client ID text box, enter the client_id value from the JSON credentials file you have downloaded.

  4. Enter https://www.googleapis.com/auth/calendar as the OAuth scope.

Cubu Configuration

  • In Cubu, go to Admin Tools > Settings > Integration.

  • Choose the Calendars tab.

  • Select Google Workspace as the provider.

  • Copy the service account email (client_email) and private key (private_key) values from the JSON credentials file.

  • Tick the Enable external calendars integration check box.

  • Click on Save

Troubleshooting Integration Issues

Check the Event Log (Admin tools > Logs > Event log) if events are not created in the remote calendar.

If you get a message similar to this:

User: [email protected] PKCS8 data must be contained within '-----BEGIN PRIVATE KEY-----' and '-----END PRIVATE KEY-----'. (Parameter 'pkcs8PrivateKey')

Try removing linebreaks () from the private key.

Last updated