Skip to main content
Connect a Google Chat bot to an Atonom Cloud Employee. You create the Chat app in your own Google Cloud project. Atonom does not publish a bot for you. One Cloud Employee uses one Google Cloud project. A second bot needs a second project and a second key. When a conversation closes, Atonom sends the external chat webhook. For Google Chat, provider is googlechat and workspace_id is the project number.

Create the Google Chat bot

  1. Sign in to the Google Cloud Console with a Google Workspace account.
  2. Create a project, or select the project you want to use.
  3. Open Google Chat API and click Enable.
  4. Open the Chat API Configuration page. Google’s setup guide is Build a Google Chat app.
  5. Enter the app name, avatar, and description.
  6. Clear Build this Chat app as a Google Workspace add-on. If Google asks you to disable the add-on, confirm it.
  7. Set the connection to HTTP endpoint URL.
  8. Set the HTTP endpoint URL to:
  1. Set Authentication audience to Project number. That choice stays hidden while the add-on box is checked.
  2. Set visibility to the people who should install and use the bot. Google allows up to five individual email addresses, or one or more Google Groups.
  3. Click Save. Saving this page is required. A service-account key alone cannot send messages.
Use the same URL for every Cloud Employee. Atonom tells tenants apart by the project number in Google’s request, which is why the audience must be Project number.

Optional: add more than five people

Google allows five individual email addresses on the visibility list. To include more people, create one Google Group and add that group’s email. The five-person limit does not apply to members of the group. Create the group in the Admin console. A group created only at groups.google.com cannot be used for Chat visibility.
  1. Open the Google Admin console as a Groups admin.
  2. Go to Directory → Groups.
  3. Click Create group.
  4. Enter a name and a group email, such as chat-bot@yourdomain.com. Click Next.
  5. Leave Security unchecked. Click Next.
  6. Choose an access type, such as Team. Click Next, then Create group.
  7. Open the group, click Add members, and add the people who should use the bot. They must be in the same Workspace.
  8. On the Chat API Configuration page, paste that group email into Visibility and click Save.

Create the service account key

Create the service account in the same project as the Chat app.
  1. Open Cloud Resource Manager API and click Enable.
  2. Open IAM & Admin → Service accounts.
  3. Click Create service account. Enter a name.
  4. On the role step, select Browser (roles/browser). Click Continue, then Done.
  5. Open the new service account. Go to Keys → Add key → Create new key.
  6. Choose JSON and download the file.
The JSON file contains project_id, private_key, and client_email. It does not contain the project number. Atonom uses the Browser role to read that number when you save the key. The bot does not need any other project role to send messages.
  1. In Atonom, open the Cloud Employee channel settings.
  2. Open the external chat channel.
  3. Choose Google Chat.
  4. Paste the full JSON key and save.
In Google Chat, open a direct message with the bot, or add the bot to a space. A direct message does not need an @mention. In a space, the bot receives a message when someone @mentions it. Other space messages are not sent to this endpoint. To replace the key, paste the new JSON file and save again. The same Cloud Employee keeps one Google Chat connection. A key from a different project replaces the project number on that connection.