> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atonom.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Chat

> Create a Google Chat bot in your own Google Cloud project and connect it to an Atonom Cloud Employee.

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](/webhooks/external-chat). 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](https://console.cloud.google.com/) with a Google Workspace account.
2. Create a project, or select the project you want to use.
3. Open [Google Chat API](https://console.cloud.google.com/apis/library/chat.googleapis.com) and click **Enable**.
4. Open the Chat API **Configuration** page. Google's setup guide is [Build a Google Chat app](https://developers.google.com/workspace/chat/quickstart/gcf-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:

```
https://app.getsignals.ai/api/chatinator/google-actions
```

9. Set **Authentication audience** to **Project number**. That choice stays hidden while the add-on box is checked.
10. 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.
11. Click **Save**. Saving this page is required. A service-account key alone cannot send messages.

<Note>
  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**.
</Note>

***

## 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](https://admin.google.com) 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](https://console.cloud.google.com/apis/library/cloudresourcemanager.googleapis.com) 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.

***

## Link the bot to a Cloud Employee

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.