Google Calendar: Integration Guide

This article explains how enable synchronization between Google resources and YAROOMS spaces.

1. What is Google Calendar integration

2. Prerequisites

3. Creating the Google Calendar integration

1. What is Google Calendar integration

This integration enables synchronization between Google resources and YAROOMS spaces. You can map spaces in YAROOMS with resources in your Google tenant to enable automatic synchronization of events from and to YAROOMS.

2. Prerequisites

Enable APIs for your project

Any application that calls Google APIs needs to enable those APIs in the API Console.

To enable an API for your project:

  1. Open the API Library in the Google API Console.
  2. If prompted, select a project or create a new one.
  3. Select Google Calendar API, then click the Enable button.

Create a service account

Any application that uses OAuth 2.0 to access Google APIs must have authorization credentials that identify the application to Google's OAuth 2.0 server. The following steps explain how to create credentials for your project. Your applications can then use the credentials to access APIs that you have enabled for that project.

  1. Go to the Credentials page.
  2. Click Create credentials → Service Account.
  3. Fill in a name and description.
  4. Edit the newly created service account, go to keys and add a new JSON key.
  5. Save the new JSON file somewhere securely
  6. Enable domain wide delegation 

Then, a super administrator of the Google Workspace domain must complete the following steps:

  1. From your Google Workspace domain’s Admin console, go to Main menu → Security → API Controls.
  2. In the Domain wide delegation pane, select Manage Domain Wide Delegation.
  3. Click Add new.
  4. In the Client ID field, enter the service account's Client ID. You can find your service account's client ID in the Service accounts page.
  5. In the OAuth scopes (comma-delimited) field, enter https://www.googleapis.com/auth/calendar.readonly
    https://www.googleapis.com/auth/calendar.events
  6. Click Authorize.

Create room resources (optional)

This can be achieved by following this guide: https://support.google.com/a/answer/1033925?hl=en 

Create a delegated account 

We will need a user that the service account will impersonate in order to manage remote events in the mapped resources. This account can be created normally from Google Workspace but it is important to have access to the room resources calendars (this should be the default behaviour).Screenshot 2022-06-23 at 14.26.45

3. Creating the Google Calendar integration


Go to Settings →  Integrations → Google Calendar → Manage Google Calendar

Options tab

integration-options_BLURRED

Activate the integration by setting "Integration active" to "Yes".

Copy and paste the contents of the json file downloaded in the Create a service account process in the "JSON key" field.

Resource mapping tab

integration-mappings_BLURRED

Set "Activate Google Calendar sync" to "Yes".

If the “Suppress notification” option is activated, we won’t be sending notifications from YAROOMS when a user books a space that has a mapped resource to it.

Conflict resolution settings determine which booking has a priority:

  • YAROOMS priority - In case of a booking conflict between YAROOMS and Google resources, the YAROOMS booking will override the Google booking. This means that the Google booking will be deleted and replaced with the YAROOMS booking.

  • Google priority - In case of a booking conflict between YAROOMS and Google resources, the Google booking will override the YAROOMS booking. This means that the YAROOMS booking will be deleted and replaced with the Google booking.

In the "Delegated user" field, delegate a user which the service account will impersonate in order to manage remote events in managed resources.

Finally, click Add mapping+. This will spawn a new row in the mappings table. 

Select a space from YAROOMS in the "YAROOMS Space" field. 

In the "External resource" field, enter the room resource email. This can be found in Admin console Home page → Buildings and resources → Click on any resource → Resource email.

resource-email_BLURRED

Don't forget to save your settings.