Google Chat
Required Variables
GOOGLECHAT_STUDIO_FLOW_SID
(Guide)GOOGLECHAT_SERVICE_ACCOUNT_KEY_BASE64
Setup
- Ensure you have the following before proceeding
- A Google Workspace account with access to Google Chat.
- A Google Cloud Project (Guide)
- Login to your Google Cloud Console and Enable Google Chat API
- Within your
Google Cloud Console > Google Chat API
, click onCredentials
followed by+ Create Credentials
- Select
Service Account
- Follow the on-screen instructions to create the
Service Account
and clickCREATE AND CONTINUE
- Service Account Name:
flex-conversations-adapaters
- Service Account ID:
<<AUTO FILLED>>
- Service Account Description:
Conversations Adapters - Google Chat
- Service Account Name:
- Click
DONE
. You can skip the optional steps. - After your
Service Account
has been successfully created, click into it and go toKEYS > ADD KEYS > Create new key
. SelectJSON
for the Key Type and clickCREATE
.- The
.json
credentials file will be automatically downloaded to your local computer
- The
- Open up your terminal / bash client and
cd
to the folder where your.json
credential files reside and issue the following commandcat <<JSON CREDENTIALS FILE NAME>> | base64
- Copy the entire output from your terminal / bash client as it will be the value for
GOOGLECHAT_SERVICE_ACCOUNT_KEY_BASE64
Configure Incoming Webhook
- Ensure you have deployed Conversations Adapters into your Twilio Flex account
- Ensure you are logged into Google Cloud Console - Chat API
- Select
Google Chat API > Configuration
- Under
App Url
, insert your deployed incoming webhook- The Conversations Adapters incoming webhook URL should be in the format of
https://twilio-flex-conversations-adapters-<RANDOMNUMBER>-dev.twil.io/api/googlechat/incoming
- The Conversations Adapters incoming webhook URL should be in the format of
- To make the Google Chat App visible, add the email addresses of people/group under the
Visibility
section
Known Limitations
- Images sent from Flex Agent to End User will be invalidated after 300 seconds (Read more: here). If you require longer validity, do consider extending the codebase to upload media to Google Drive.
- Google's Service Account Authentication for Google Chat API does not support Media Upload (i.e. Video). Read here for more information