Skip to content
Release: Australia · Updated: 2023-08-03 · Official documentation · View source

Set up the Google Calendar spoke

Set up an outbound integration between your ServiceNow instance and the Google Calendar Application Programming Interfaces (API) by setting up a connection and credential record.

Before you begin

  • Request an Integration Hub subscription.
  • Activate the Google Calendar spoke.
  • Ensure that you have a Google Workspace account.
  • Ensure that you have a domain and an email address related with the domain. For example, www.mydomain.com and jane-admin@mydomain.com.

    Note: you can only register one email address per domain in Google Workspace.

  • Role required: admin.

Create OAuth application on Google Calendar

Create an OAuth application on the Google Calendar that authenticates requests to access the Google Calendar APIs from your ServiceNow instance. After successful authentication, you can generate an OAuth token that your ServiceNow can use to access the Google Calendar APIs.

Before you begin

Google Calendar spoke integration requirements:

  • A domain and an email address associated with the domain. For example, www.mydomain.com and jane-admin@mydomain.com. Note that you can only register one email address per domain in Google Workspace.
  • Google Workspace login credentials created with the same domain.

Role required: admin.

Procedure

  1. Log in to https://console.developers.google.com with your Google Workspace credentials.

  2. Create a project on Google Workspace.

    The project provides the OAuth application and the permissions to access the Google Calendar APIs from your ServiceNow instance.

    1. Select the button.
Image omitted: google-calendar-spokes-click-create-project.png
Create project button for Google Calendar on Google Workspace.
2.  On the Select a Project window, select **NEW PROJECT**.

3.  In the Project name field, enter a unique name for the project.

4.  In the Location field, select BROWSE to select an organization.

5.  Select **CREATE**.

    The Notifications window confirms that the project is created.
Image omitted: gcalendar-spoke-proj-created.png
Project creation confirmation.
6.  Select SELECT PROJECT.
  1. Enable the Google Calendar API permissions.

    1. Select + ENABLE APIS AND SERVICES.
Image omitted: gcalendar-spoke-enable-api.png
Enable API and Services button.
2.  On the Welcome to the API Library page, navigate to the Google calendar API card under the Google Workspace heading.
Image omitted: gcalendar-spoke-api-button.png
Google Calendar API button.
3.  Select **Google Calendar API**.

4.  Select **ENABLE**.

    The Google calendar API is enabled on your project.
Image omitted: google-calendar-api-enabled.png
Google Calendar API is enabled.
  1. Create the credentials that the connection and credential form will store.

    1. Select CREATE CREDENTIALS.
Image omitted: google-calendar-create-creds.png
Create credentials button to access Google Calendar API.
2.  Fill the form.
  
Select an APIName of the API that your ServiceNow instance accesses. Note: Ensure that the Google Calendar API option is chosen.
What data will you be accessing? \*Type of data that your ServiceNow instance accesses from the Google Calendar application.Tip: To create an OAuth application, select User data.
3.  Select **NEXT**.

4.  In the OAuth Consent Screen section, fill the form.

    |Field|Description|Mandatory?|
    |-----|-----------|----------|
    |App name|Custom name of the OAuth app.|Yes|
    |User support email|Users of the OAuth app can send their queries on consent to this email.|Yes|
    |App logo|Logo of the OAuth app,|No|
    |Developer contact information|Google uses this email ID to inform you about any changes to the project.|Yes|

5.  Select **SAVE AND CONTINUE**.
  1. Specify the permissions to access specific Google Calendar API.

    1. Under the SCOPES heading, select ADD OR REMOVE SCOPES.

    2. In the Update selected scopes window, enter Google Calendar in the Enter property name or value field.

Image omitted: gcalendar-spoke-scope.png
Enter Google Calendar in the field.
3.  From the list, select Google Calendar API.

4.  Select the required APIs from the list.
Image omitted: gcalendar-spoke-api-selection.png
Select required Google Calendar APIs.
5.  Select **UPDATE**.
  1. Generate the OAuth Client ID and related details.

    You must enter the OAuth Client ID and related details in the connection and credential form.

    1. In the Application type field, select Web application.

    2. In the Name field, enter a custom name for the application.

    3. To add a redirect URL, under the Authorised redirect URIs heading, select + ADD URI.

    4. Enter the URL of your ServiceNow instance.

    5. Select CREATE.

      The credentials for the OAuth application are created, as shown in the image.

Image omitted: google-calendar-copy-creds.png
Copy or download the OAuth credentials.
  1. Select DONE.

Create Connection and Credential record for the Google Calendar spoke

Create a connection and credential record that enables your ServiceNow instance to integrate with the Google Calendar Application Programming Interface (API).

Before you begin

Role required: admin.

About this task

The connection and credential record includes the details that you had set up when you created the OAuth app. See Create OAuth application on Google Calendar.

Procedure

  1. Navigate to All > Process Automation > Flow Designer.

  2. Select Connections.

  3. In the Search all connections field, enter Google Calendar.

Image omitted: google-calendar-search-conn-card.png
Search the Google Calendar connection card.
  1. On the Google_Calendar card, click View Details.

  2. Click Configure.

Image omitted: google-calendar-configure-button.png
Google Calendar connection and credential record configure button.
  1. Fill the details in the form.
FieldDescription
Connection NameName of the connection with the Google Calendar API.Note: The first and default connection name is Google_Calendar which is read-only. To provide a custom name to the connection, create a connection by selecting Add Connection.
Connection URLThe URL to the Google Calendar APIs.Enter `https://googleapis.com`.
API VersionVersion of the Google Calendar APIs that your ServiceNow instance accesses.Enter `V3`.
OAuth Client IDThe ID of the client that accesses the OAuth app you had created.Tip: You can find the OAuth Client ID in the JSON file you had downloaded while creating the OAuth app. See Create OAuth application on Google Calendar.
OAuth Client SecretThe secret that your ServiceNow instance uses to prove its identity to the OAuth app.Tip: You can find the OAuth Client secret in the JSON file you had downloaded while creating the OAuth app. See Create OAuth application on Google Calendar.
OAuth Redirect URLThe redirect URL to the application after the OAuth app authenticates the request from your ServiceNow instance.Tip: You can find the OAuth Redirect URL in the JSON file you had downloaded while creating the OAuth app. See Create OAuth application on Google Calendar.
OAuth Authorization URLThe URL provided by the OAuth service provider that your ServiceNow instance can use to initiate the OAuth authorization process.Tip: You can find the OAuth Authorization URL in the JSON file you had downloaded while creating the OAuth app.
OAuth Token URLThe URL provided by an OAuth service provider that your ServiceNow instance can use to exchange an authorization code for an access token.Tip: You can find the OAuth Authorization URL in the JSON file you had downloaded while creating the OAuth app.
  1. Select Configure and Get OAuth Token.

  2. Log in to Google Workspace and get the OAuth Token.

    The connection and credential record is created.