⚒️Configuring Google Workspace Calendar Integration
Last updated
Last updated
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.
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:
Enabling Google Calendar API and creating a service account with API credentials on Google Cloud Platform (GCP).
Authorizing the service account to access users' data in your Google Workspace.
Configuring Cubu calendars integration.
Set up a Google Cloud Platform Project:
Go to the Google Cloud Console.
Create a new project or select an existing one.
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.
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.
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.
The JSON file contains sensitive information that provides access to your Google Workspace. Keep it in a safe place.
At the end of this process, your Google Calendar API should look similar to this:
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.
Go to Security > Access and data control > API controls
Click on MANAGE DOMAIN WIDE DELEGATION
Enter https://www.googleapis.com/auth/calendar
as the OAuth scope.
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
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: user@email.com PKCS8 data must be contained within '-----BEGIN PRIVATE KEY-----' and '-----END PRIVATE KEY-----'. (Parameter 'pkcs8PrivateKey')
Try removing linebreaks () from the private key.
In the Client ID text box, enter the client_id
value from the JSON credentials file you have downloaded.