> For the complete documentation index, see [llms.txt](https://docs.kognitos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kognitos.com/guides/platform/integrations/chat.md).

# Google Chat

Overview of the Google Chat integration.

{% hint style="info" %}
The following documentation is for **Google Chat v2.12.1**.
{% endhint %}

## Overview

Google Chat is the team messaging service in Google Workspace. This integration enables automated message posting and space management workflows.

## Setup

The following integrations need to be connected to your Kognitos workspace:

* **Google Chat**

### Steps

Follow these steps to connect the integration in Kognitos:

{% stepper %}
{% step %}

#### Navigate

Using the left navigation menu, go to **Integrations** → **Explore Integrations**.
{% endstep %}

{% step %}

#### Find

Search for the integration and click on it.
{% endstep %}

{% step %}

#### Connect

Click on <kbd>**Connect**</kbd> to add a connection to the integration.
{% endstep %}

{% step %}

#### Configure

Add a name for the connection. You'll be prompted for [**authentication**](#authentication) details if needed. Then, click on <kbd>**Connect**</kbd>.
{% endstep %}
{% endstepper %}

## Authentication

Use one of the following authentication methods to connect this integration in Kognitos. Each method has its own configuration requirements.

## Actions

The following actions are available in the **Google Chat** integration:

### 1. Add a chat reaction to a chat message

Add an emoji reaction to a Google Chat message.

### 2. Create a direct message space in google chat

Create a direct message space with a user, or return the existing one.

### 3. Find a direct message space in google chat

Find an existing direct message space with a specific user.

### 4. Get a chat message from google chat

Get details about a specific Google Chat message.

### 5. Get a chat space's read state from google chat

Get the read state of a Google Chat space for the authenticated user.

### 6. Get a chat space from google chat

Get details about a specific Google Chat space.

### 7. Get some chat message's chat reactions

Get reactions on a Google Chat message.

### 8. Get some chat message's thread messages from google chat

Get all messages in a thread, given any message from that thread.

### 9. Get some chat space's chat members from google chat

Get members of a Google Chat space.

### 10. Get some chat space's chat messages from google chat

Get messages from a Google Chat space.

### 11. Get some chat spaces from google chat

Get spaces from Google Chat that the authenticated user is a member of.

### 12. Send a chat message in google chat

Send a message to a Google Chat space.

### 13. Send a chat thread reply in google chat

Reply to a message in a Google Chat thread.

### 14. Update a chat message in google chat

Update the text of an existing Google Chat message.

## Concepts

### Google chat message

A Google Chat Message represents a message in a Google Chat space.

| Field Name            | Description                                                          | Type                |
| --------------------- | -------------------------------------------------------------------- | ------------------- |
| `name`                | The resource name of the message (e.g. "spaces/AAAA/messages/BBBB"). | `text`              |
| `text`                | The plain-text body of the message.                                  | `optional[text]`    |
| `formatted_text`      | The message text with formatting markup.                             | `optional[text]`    |
| `sender_name`         | The resource name of the sender (e.g. "users/123456").               | `optional[text]`    |
| `sender_display_name` | The display name of the sender.                                      | `optional[text]`    |
| `sender_email`        | The email address of the sender.                                     | `optional[text]`    |
| `thread_name`         | The resource name of the thread this message belongs to.             | `optional[text]`    |
| `thread_reply`        | Whether this message is a reply in a thread.                         | `optional[boolean]` |
| `space_name`          | The resource name of the space containing this message.              | `optional[text]`    |
| `create_time`         | When the message was created.                                        | `optional[text]`    |
| `last_update_time`    | When the message was last edited.                                    | `optional[text]`    |

### Google chat reaction

A Google Chat Reaction represents a reaction on a message.

| Field Name          | Description                                  | Type             |
| ------------------- | -------------------------------------------- | ---------------- |
| `name`              | The resource name of the reaction.           | `text`           |
| `emoji_unicode`     | The unicode string of the emoji (e.g. "👍"). | `optional[text]` |
| `emoji_custom_name` | The name of the custom emoji, if applicable. | `optional[text]` |
| `user_name`         | The resource name of the user who reacted.   | `optional[text]` |
| `user_display_name` | The display name of the user who reacted.    | `optional[text]` |

### Google chat space

A Google Chat Space represents a conversation space in Google Chat.Spaces can be named spaces (rooms), group chats, or direct messages.

| Field Name         | Description                                                                           | Type               |
| ------------------ | ------------------------------------------------------------------------------------- | ------------------ |
| `name`             | The resource name of the space (e.g. "spaces/AAAAAAAAAAA").                           | `text`             |
| `display_name`     | The display name of the space.                                                        | `optional[text]`   |
| `space_type`       | The type of space (SPACE, GROUP\_CHAT, or DIRECT\_MESSAGE).                           | `optional[text]`   |
| `threading_state`  | The threading state (THREADED\_MESSAGES, GROUPED\_MESSAGES, or UNTHREADED\_MESSAGES). | `optional[text]`   |
| `description`      | The description of the space.                                                         | `optional[text]`   |
| `guidelines`       | The space's rules and expectations.                                                   | `optional[text]`   |
| `create_time`      | When the space was created.                                                           | `optional[text]`   |
| `last_active_time` | Timestamp of the last message in the space.                                           | `optional[text]`   |
| `member_count`     | The number of human members in the space.                                             | `optional[number]` |
| `space_uri`        | The URI for a user to access the space.                                               | `optional[text]`   |

### Google chat space read state

A Google Chat Space Read State indicates the last read time for a user in a space.

| Field Name       | Description                                 | Type             |
| ---------------- | ------------------------------------------- | ---------------- |
| `name`           | The resource name of the space read state.  | `text`           |
| `last_read_time` | The time when the user last read the space. | `optional[text]` |

### Google chat member

A Google Chat Member represents a membership in a Google Chat space.

| Field Name     | Description                                                            | Type             |
| -------------- | ---------------------------------------------------------------------- | ---------------- |
| `name`         | The resource name of the membership (e.g. "spaces/AAAA/members/BBBB"). | `text`           |
| `member_name`  | The resource name of the member user (e.g. "users/123456").            | `optional[text]` |
| `display_name` | The display name of the member.                                        | `optional[text]` |
| `email`        | The email address of the member.                                       | `optional[text]` |
| `member_type`  | The type of member (HUMAN or BOT).                                     | `optional[text]` |
| `role`         | The role of the member in the space (ROLE\_MEMBER or ROLE\_MANAGER).   | `optional[text]` |
| `state`        | The membership state (JOINED, INVITED, or NOT\_A\_MEMBER).             | `optional[text]` |
