To launch your bot on Google chat, you must:

  • Enable Google Chat API
  • Set Up API Configurations
  • Create a Service Account
  • Set Up the Bot Configurations

Enable Google Chat API

To launch this bot on Google Chat, you would need to enable Google Chat API, create a Service Account and set up the integration.

  1. Log in to Google Developer Console.
  2. Click Enable APIs and Services.
  3. Search and select Google Chat API.
  4. Click Enable.
  5. On enabling the API, you are redirected to the Overview page of the Google Chat API.

Set Up API Configurations

  1. Go to the Configurations section from the left pane and provide all the required details like:
    • Bot name
    • Avatar URL
    • Description
  2. Under Functionality choose both Bot works in direct messages and Bot works in rooms options.
  3. 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.
  4. Select the appropriate option under Permissions.

Create a Service Account

You must set up the credentials to facilitate the integration.

  1. From the Credentials page, click Create credentials and select the Service account.
  2. From the Service account drop-down list, select the New service account option.
  3. Provide a name for your service account, service account description, and click Create and Continue.
  4. 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
  5. Click on the Done button.
  6. Once a service account is created navigate to the Credentials page and click on Manage service accounts.
  7. Navigate to the Manage service accounts page.
  8. From the Manage service accounts page click on Manage keys.
  9. 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

  1. In the Bot Platform, navigate to the Configuration page for the Google Chat channel.
  2. 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
  3. Select the Yes and click Save to enable Google Chat channel.