> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-apis.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding the Google Chat Channel

<Badge icon="arrow-left" color="gray">[Back to Available Channels](/ai-for-service/channels/adding-channels-to-your-bot#available-channels)</Badge>

Adding Google Chat as a channel to your AI Agent allows end-users to chat with it using Google Chat. This article shows you how to set it up.

## Step 1: Enable the Google Chat API

1. Log into [Google Cloud.](https://console.developers.google.com/projectselector2/apis/dashboard?pli=1)

2. Click **Library**, in the left side menu.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=45a815fc06301e54980d0dca9da57cc5" alt="Library" width="1024" height="410" data-path="ai-for-service/channels/images/google_chat.png" />

3. Search and select the **Google Chat API**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat1.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=ee3754e9199705c8177092acece2f39f" alt="Google Chat" width="1024" height="416" data-path="ai-for-service/channels/images/google_chat1.png" />

4. Click **Enable**.

5. On enabling the API, you are redirected to the **Overview** page of the **Google Chat API**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat2.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=e60d9d5642dec8e71d92ff758e3dfa5b" alt="Google Chat API" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat2.png" />

## Step 2: Set Up the API in Google Cloud

To set up the Google Chat API, you need to create credentials first, then configure its details and functionality, as follows:

1. From the Credentials page, click **Create credentials** and select **Service account**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat3.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=a213bb6c3fa9b86442ce608ec632af26" alt="create credentials" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat3.png" />

2. Provide a name for your service account, service account description, and click **Create and Continue**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat4.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=523158cc57573d815201d483f1876a90" alt="Library" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat4.png" />

3. 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

4. Click on the **Done** button.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat5.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=cd0455140f4a33aff2e98eee9e312248" alt="grant users" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat5.png" />

5. Go to the **Configurations** section and provide all the required details like:
   * App name
   * Avatar URL
   * Description
     <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat6.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=51b0edd6093e2f3cbfd4d0408af06eaa" alt="configurations" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat6.png" />

6. Under **Functionality** choose both **Receive one-to-one messages** and **Join spaces and group conversations** options.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat7.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=ba19ad503a2cac4a040ca5755bf3efef" alt="Library" width="1024" height="462" data-path="ai-for-service/channels/images/google_chat7.png" />

7. Under **Connection Settings**:
   * Select the **App URL** option.
   * Go to the Kore.ai **Channels & Flows** > **Channels** > **Digital** > **All** > **Google Chat** > **Configurations** and copy the **Webhook URL**.
   * Go back to **Connections Settings in Google Cloud** and paste the Webhook URL

8. Select the appropriate option under **Permissions**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat8.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=876fb80dae0542f2b66a4d41f7abf029" alt="permissions" width="1024" height="412" data-path="ai-for-service/channels/images/google_chat8.png" />

Next, we will be configuring the API keys that the Platform will use to connect to Google Chat.

## Step 3: Create API Keys

Once your service account has been created, you need to manage the keys corresponding to your API, as follows:

1. Navigate to the **Credentials** page and click on **Manage service accounts**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat9.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=8b5fb9718a4637be7eee3bfa7576d231" alt="Manage Service" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat9.png" />

2. From the Manage service accounts page click the **Actions** button corresponding to your newly created account, then on **Manage keys**.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat10.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=c220602929c49a8d8606cddaad7ebbf2" alt="Manage Keys" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat10.png" />

3. From the **Manage Keys** page click on **Add Key** button, select **Create new key** from the drop down, select the JSON option, and click on **Create** button.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat11.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=a201a7d5ee422edfd6fa818098f3f229" alt="create new key" width="1024" height="456" data-path="ai-for-service/channels/images/google_chat11.png" />

A JSON file will be generated and you need to copy the **client\_email**, and **private\_key** that needs to be input into the Platform. .

## Step 4: Configure the Google Chat Channel

In the Platform, select the AI Agent you’re working with, then go to **Channels & Flows** > **Channels** > **Digital** > **All** > **Google Chat** > **Configurations**.

1. Enter the following configuration details:
   1. **Client Email** - Copy the value of the **client\_email** field present in the credentials JSON file of your Service Account and enter it here.
   2. **Private Key** - Copy the value of the **private\_key** field present in the credentials JSON file of your Service Account and enter it here.

2. Enable **Proactive Notifications** to send  relevant updates to the users without requiring them to initiate interaction with the app first.

3. Enable the **Welcome Event** toggle to automatically send a welcome message and initiate start (experience) flows when users install an app(bot) integrated with Google Chat via Google Workspace.

4. Select **Yes** and select **Save** to enable Google Chat channel.
   <img src="https://mintcdn.com/koreai-apis/e5R_rp3slC_iCxcr/ai-for-service/channels/images/google_chat12.png?fit=max&auto=format&n=e5R_rp3slC_iCxcr&q=85&s=7b7a898cc2a439a428c3184ece90ab31" alt="save channel" width="696" height="880" data-path="ai-for-service/channels/images/google_chat12.png" />

After enabling the channel and verifying all the configurations, you can optionally publish the app for the new channel. Learn more about [Publishing your App](/ai-for-service/deployment/publishing-app).
