> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=9dcbae814660adb89aff9ca7c05844a3" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat1.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=b18d91d2ce122f032d9890b147c0a85b" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat2.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=d8cacbdaa0649af5aad9059ce3946a7c" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat3.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=854a1b7c49e80086dd6db72a62ddd3b8" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat4.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=08b75b4665ddebcaff0b938337419c26" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat5.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=0efeb479239d26bccaec36d4799c574f" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat6.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=c6790aea41293bf903229f76c57769d5" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat7.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=57b9f0b29972a8dd02b228aa0f802a8c" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat8.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=2de69eb7a10f64a5ce23fe2c5bbfd4aa" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat9.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=32c86336481c46a9043130e668612e66" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat10.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=7f0791dc979f0ac34c6b36d1ac0600df" 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-ai-for-work-dev/kf8Q_kUDO0B4_XU4/ai-for-service/channels/images/google_chat11.png?fit=max&auto=format&n=kf8Q_kUDO0B4_XU4&q=85&s=e3c788288c8c83cfad0b4ff078a1b477" 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-ai-for-work-dev/lcGrgjBCmnyfT4qR/ai-for-service/channels/images/google_chat12.png?fit=max&auto=format&n=lcGrgjBCmnyfT4qR&q=85&s=aef051bccfc7ff5793c85f9369449c84" 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).
