To launch your bot on Google chat, you must:
- Enable Google Chat API
- Create a Service Account
- Set Up the Integration.
- Set Up the Bot Configurations
Enable Google Chat API
- Log in to Google Developer Console.
- Click Enable APIs and Services.
- Search and select Google Chat API.
- Click Enable.
- On enabling the API, you are redirected to the Overview page of the Google Chat API.
Set Up API Configurations
- Go to the Configurations section from the left pane and provide all the required details like:
- Bot name
- Avatar URL
- Description
- Under Functionality choose both Bot works in direct messages and Bot works in rooms options.
- Under Connection Settings:
- Select the Bot URL option.
- Enter the Webhook URL provided by Kore.ai from the Configurations tab of the channel setup page.
- Select the appropriate option under Permissions.
Create a Service Account
You must set up the credentials to facilitate the integration.
- From the Credentials page, click Create credentials and select the Service account.
- From the Service account drop-down list, select the New service account option.
- Provide a name for your service account, service account description, and click Create and Continue.
- Once the service account is created there are 2 optional steps:
- Grant this service account access to project
- Grant users access to this service account
- Click on the Done button.
- Once a service account is created navigate to the Credentials page and click on Manage service accounts.
- Navigate to the Manage service accounts page.
- From the Manage service accounts page click on Manage keys.
- From the Manage Keys page click on Add Key button, select Create new key from the drop down, select JSON option, and click on Create button.
A JSON file will be generated and you need to copy the client_email, and private_key that needs to be inputted into the respective section of the configurations tab of the channel setup page.
Set Up the Bot Configurations
- In the Bot Platform, navigate to the Configuration page for the Google Chat channel.
- Enter the following configuration details:
- WEBHOOK URL – Copy this URL and provide it in the Configurations of Google Chat API page.
- Client Email – Copy the value of the client_email field present in the credentials JSON file of your Service Account and enter it here.
- Private Key – Copy the value of the private_key field present in the credentials JSON file of your Service Account and enter it here
- Select the Yes and click Save to enable Google Chat channel.