{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21514,"path":"integrate-applications/integration-hub/setup-google-chat.md","title":"Set up the Google Chat spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up the Google Chat spoke\n\nIntegrate the ServiceNow instance and Google Chat by creating a custom OAuth application in Google Cloud console to authenticate ServiceNow requests.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate the Google Chat spoke.\n-   Role required: admin.\n\n## Create OAuth credentials in Google Cloud console for Google Chat spoke\n\nCreate credentials in Google Cloud console account to enable OAuth 2.0 authentication with the Google Chat spoke.\n\n### About this task\n\nComplete these steps from the [Google Cloud console](https://console.cloud.google.com/).\n\n### Before you begin\n\n-   Create a Google Chat application. For more information, see [Develop Google Chat apps](https://developers.google.com/workspace/chat) and [Google Apps Script Chat app quickstart](https://developers.google.com/apps-script/quickstart/chat-app).\n-   Role required: none\n\n### Procedure\n\n1.  In the Google Cloud console, navigate to **Main menu** &gt; **IAM &amp; Admin** &gt; **Create a Project**.\n\n    You can also directly go to [https://console.cloud.google.com/projectcreate](https://console.cloud.google.com/projectcreate)\n\n2.  Enter a descriptive name for your project in the **Project Name** field.\n\n    **Note:** The project ID can't be changed after the project is created, so choose an ID that meets your needs for the lifetime of the project.\n\n3.  After creating a Google Chat app, get the deployment ID of the app and record it.\n\n    You need to provide the deployment ID for connection configuration. For more information, see [Find a deployment ID](https://developers.google.com/apps-script/concepts/deployments#find-deployment).\n\n4.  Navigate to **Navigation Menu** &gt; **APIs &amp; Services** &gt; **Enabled APIs &amp; Services**.\n\n5.  Select **Google Chat API** from the list.\n\n    \\[Omitted image \"google-chat-spoke-select-chat-apis.png\"\\] Alt text: Select Google Chat API in Google Cloud console\n\n6.  Click on the **CREDENTIALS** tab.\n\n7.  Click on **+ CREATE CREDENTIALS** and select **OAuth client ID.**\n\n    \\[Omitted image \"google-chat-gc-console-create-creds.png\"\\] Alt text: Create credentials for Google Chat app in Google Cloud console\n\n8.  On the **Create OAuth client ID** form, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Application|Select Web application from the list.|\n    |Name|Enter a unique name to identify the OAuth 2.0 client.|\n    |Authorized JavaScript origins URI|Enter the URI of your ServiceNow instance. For example, `https://<your-instance-name>.servicen-now.com`|\n    |Authorized redirect URIs|Enter the redirect URI of your ServiceNow instance. For example, `https://<your-instance-name>.servicen-now.com/oauth_redirect.do`|\n\n    \\[Omitted image \"google-chat-gc-create-oauth-cl-id.png\"\\] Alt text: Create OAuth client ID for Google Chat spoke in Google Cloud console\n\n9.  Click **CREATE**.\n\n    An OAuth client is created with client ID and client secret. Record the client ID and client secret.\n\n10. Click on the **CONFIGURATION** tab and fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |App name|Enter a name for your application.|\n    |Avatar URL|Specify an HTTPS URL for your app's avatar image.|\n    |Description|Enter a description for your application.|\n\n11. In **Connection** settings, specify the deployment ID of the Google Chat app from Step 4 in the **Deployment ID** field.\n\n    **Note:** If you have created any Slash commands while creating the app, specify them.\n\n    \\[Omitted image \"google-chat-deployment-id.png\"\\] Alt text: Add deployment ID of the app in Connection settings\n\n12. Save the configuration of your app in Google Cloud console.\n\n\n## Configure a connection for Google Chat spoke\n\nAdd and configure a Docker connection to authenticate ServiceNow requests in Docker spoke.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Navigate to **All** &gt; **Process Automation** &gt; **Flow Designer**.\n\n2.  Click the **Connections** tab.\n\n3.  Locate the alias for **Google\\_Chat** and and click **View Details**.\n\n    **Note:** Don't click**Add Connection**.\n\n    \\[Omitted image \"google-chat-spoke-conn-temp.png\"\\] Alt text: Google Chat spoke connection template\n\n4.  Click **Configure** if you are configuring the connection for the first time.\n\n    \\[Omitted image \"google-chat-spoke-conn-config.png\"\\] Alt text: Google Chat spoke connection configuration\n\n5.  On the **Configure Connection** form, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Connection Name|Name to uniquely identify the connection record.|\n    |Connection URL|URL to Google Chat APIs. Enter `https://chat.googleapis.com`|\n    |API Version|Google Chat API version. Enter `v1`.|\n    |OAuth Client ID|OAuth client ID of Google Chat app in Google Cloud console.|\n    |OAuth Client Secret|OAuth client secret of Google Chat app in Google Cloud console.|\n    |OAuth Redirect URL|OAuth redirect URL of your ServiceNow instance. Enter in this format`https://<your-instance-name>.service-now.com/oauth_redirect.do`|\n\n6.  Click **Configure and Get OAuth Token**.\n\n    You will be redirected to Google accounts login page.\n\n7.  Enter your Google Chat API credentials.\n\n\n### Result\n\nAn OAuth token is generated and configured for the Google Chat spoke.\n\n"}}