Integrating Google Chat with Torq enhances your team's communication and automation capabilities, enabling seamless interaction and real-time updates within your chat environment.
Creating a Google Chat Integration
Follow the instructions to create a Google Cloud Platform (GCP) integration, with some adjustments in the following sections:
Enable GCP Domain-Wide Delegation
The recommended process is to follow the Google Cloud Platform (GCP) guide, which includes enabling GCP domain-wide delegation. However, if you prefer not to enable this, you can skip the Enable GCP Domain-Wide Delegation and Authorize the Service Account sections. Instead, create a Google Chat OAuth integration, allowing you to authenticate with Google Chat as yourself, limiting actions to your user account without acting on behalf of others.
The steps Send Message, Ask a Question, and Send Interactive Form can be authenticated with the Google Chat integration without enabling GCP domain-wide delegation.
If you prefer not to enable domain-wide delegation, you'll need to create a Google Chat OAuth integration for all other Google Chat steps.
The Google Chat OAuth steps specifically require the OAuth integration.
Authorize the Service Account
In step 6 provide these additional scopes:
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.memberships.app
https://www.googleapis.com/auth/chat.spaces
Enable APIs
In the API Library select the Google Chat API and click MANAGE.
Go to CONFIGURATION and set the HTTP endpoint URL to:
https://interactivity.torq.io/google-chat/v1/interactivity-hooks
If you are in the EU, set the HTTP endpoint URL to:
https://interactivity.eu.torq.io/google-chat/v1/interactivity-hooks
3. Set the Authentication Audience to Project Number.
4. In APIs & Services > Enabled APIs & services, enable the API named IAM Service
Account Credentials API.
5. In IAM & Admin > IAM, locate your principal (service account) in the list.
6. Click GRANT ACCESS, fill in the principal, and add the role of Service Account
Token Creator.
Create a Google Chat Integration in Torq
Go to Integrations > Steps > Google Chat, and click Add.
Provide the credentials file you saved in step 3.5
Enter the GCP project number.
Give the integration a unique and meaningful name.
Google Chat OAuth Integration
Follow these steps to get the client ID and secret from Google Workspace:
Log in to your Google Workspace project: console.cloud.google.com.
Go to APIs & Services > +ENABLE APIS AND SERVICES. Select the cards of the APIs you want to use in Torq and make sure they are enabled.
Go to Credentials > +CREATE CREDENTIALS and select OAuth client ID.
Provide the following information and click CREATE.
Application type: Web application.
Name: provide a meaningful name.
Authorized Javascript origins:
https://app.torq.io
or EU:https://app.eu.torq.io
Authorized redirect URIs: Copy the value of the Callback URL field in the integration creation form in Torq:
https://redir.torq.io/integrations/google_chat_token_oauth
Copy the Client ID and Client Secret and save them for the next step.
Create a Google Chat OAuth Integration in Torq
Perform these steps in Torq.
Go to Build > Integrations > Steps > Google Chat OAuth, and click Add.
Enter a meaningful name for the integration.
Enter the client ID and secret you copied previously.
Review the default suggested scopes and add any others as needed.
Click Add.
When updating an integration, attempting to create an integration after a failure, or creating a new integration with the same credentials, you may need to go to https://myaccount.google.com/u/0/permissions, select your app, and click REMOVE ACCESS.