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

# Google Chat Integration

> Install CloudThinker in Google Chat, map each space to a workspace, and ask questions, approve actions, and get alerts in chat.

Add CloudThinker to Google Chat so your team can ask questions, approve actions, and receive incident updates without opening the web app. Each Google Chat space or direct message maps to one CloudThinker workspace, the project that holds your connections and conversations.

> [!NOTE]
>
> Google Chat is an integration, not a [connection](https://docs.cloudthinker.io/guide/connections/overview.md): adding CloudThinker gives it no access to Gmail, Drive, or other Google Workspace data.

## Prerequisites

* A [messaging-eligible plan](https://docs.cloudthinker.io/guide/billing/pricing.md#ai-features-by-plan): Team, Scale, or Enterprise.
* A Google Workspace administrator who can install apps in the Google Admin console. They do this once for your organization.
* **Organization role:** an organization Owner or Admin to map shared spaces. See [roles](https://docs.cloudthinker.io/guide/security/roles.md).
* **Workspace role:** **Developer** or **Admin** to map your own direct message or ask questions. **Viewer** can't run chats. See [workspace users](https://docs.cloudthinker.io/guide/workspace-users.md).

## Install CloudThinker

**1. Open the setup page**

Sign in to CloudThinker as an organization Owner or Admin. Go to **Admin Settings → Integrations → Google Chat**.

The page walks through three steps: **Install CloudThinker**, **Add CloudThinker to a space**, and picking a notification space for each workspace.

**2. Turn on Chat apps in Google Admin**

Your Google Workspace administrator goes to **Apps → Google Workspace → Google Chat → Chat apps** in the Google Admin console and sets **Allow users to install Chat apps** to **On**. The setup page links straight to this screen with **Open Google Chat settings**.

**3. Install CloudThinker for your organization**

In the Google Admin console, go to **Apps → Google Workspace Marketplace apps → Apps list** (or click **Open the Apps list** on the setup page), search for **CloudThinker**, and install it. Install it for everyone, or limit it to the organizational units or groups that should reach it.

**Success state:** CloudThinker appears when people search for apps in Google Chat.

## Map a space to a workspace

Do this once for each shared space, and once for each person who wants a direct message with CloudThinker. For a shared space, an organization Owner or Admin should be the one who adds CloudThinker and mentions it, because only they can open the configuration link for a space that isn't mapped yet.

**1. Add CloudThinker in Google Chat**

Add CloudThinker to a shared space, or start a direct message with it.

If CloudThinker is already in your direct message, remove it and add it again. Google sends the setup event only on a fresh add.

**2. Open the configuration link**

CloudThinker replies with a personal configuration link. In a shared space, Google shows it only to you, so other members never see it. It expires after 15 minutes and must be opened with the Google account that messaged CloudThinker.

**3. Choose a workspace and confirm your Google account**

Pick the CloudThinker workspace this space should use under **Workspace**. Then click **Continue with Google** and choose that same Google account.

**Success state:** the page shows **Google Chat is ready**. Back on **Admin Settings → Integrations → Google Chat**, the space appears under **Mapped spaces**.

**4. Send a first request**

Return to Google Chat and mention CloudThinker again with a question:

```text theme={null}
@CloudThinker Why did our AWS bill go up this week?
```

**Success state:** CloudThinker answers in the same thread, using the mapped workspace's connections.

## Work with CloudThinker in chat

Write requests in plain language. Name a connection or ask for an output shape in words when it matters. See [Commands and prompt syntax](https://docs.cloudthinker.io/guide/commands.md) for the full syntax.

```text theme={null}
@CloudThinker Investigate the latest high-severity incident
@CloudThinker Summarize the open findings for production
@CloudThinker Compare this month's EC2 spend with last month as a dashboard
```

* **Mentions:** in a shared space, mention `@CloudThinker` so Google sends it the message. In a direct message, just type your request.
* **Threads:** reply in the same thread to continue the conversation. A new top-level message starts a new conversation.
* **Long runs:** CloudThinker posts a **Working…** message in the thread and updates it with the current step, then posts the answer in the same thread. If someone else sends a message while a run is going, CloudThinker queues it and starts it as that person when the run finishes. Only messages that pass the [checks below](#who-can-ask-and-approve-from-chat) are queued, and CloudThinker checks the role again before it starts one: a sender who lost access gets **Your linked CloudThinker account cannot run agents in this Workspace.**
* **Files:** upload up to 5 files to your Google Chat message, 20 MB in total. Oversized images are resized; other oversized files are refused with a reply. Supported types include PDF, Word, text and Markdown, CSV and Excel, PowerPoint, JSON and YAML, common images, and code files. Google Drive files are not read, because adding CloudThinker grants no Drive access: upload a copy or paste the part CloudThinker should read.
* **Approvals:** when an action needs sign-off under your [approval rules](https://docs.cloudthinker.io/guide/approvals/overview.md), CloudThinker posts a **CloudThinker needs your approval** card with **Approve**, **Approve with reason** (opens a dialog for your note), and **Reject**. Use **Open in CloudThinker** to see the full context first.

### Who can ask and approve from chat

Being a member of the space is not enough. Each message is checked against the sender's linked CloudThinker account before CloudThinker runs it:

| Sender | What happens |
| - | - |
| Google account not linked to CloudThinker | CloudThinker privately sends a link: **Link your CloudThinker account to continue**. The question doesn't run |
| Linked, but not a member of the workspace, or a **Viewer** | Reply in the thread: **Your linked CloudThinker account cannot run agents in this Workspace.** |
| Linked **Developer** or **Admin** | The question runs as that user, with that user's access |

Each approval click gets the same approver checks as the web app:

| Clicker | What happens |
| - | - |
| Google account not linked to CloudThinker | CloudThinker privately sends a link: **Link your CloudThinker account to continue** |
| Linked, but can't run agents in this workspace | Private reply: **Your linked CloudThinker account cannot run agents in this Workspace.** |
| Linked, not a designated approver (or not in the approver group) | Can still **Reject**. **Approve** gets a private reply naming who can approve |
| Started the run that needs approval | With the [two-person rule](https://docs.cloudthinker.io/guide/approvals/approvers.md#require-a-second-person) on, another approver must approve. They can still reject it |
| Allowed approver | The decision applies and the card updates to show it |

If the approval was already decided, in chat or in the web app, the clicker sees **This approval was already decided.**

## Security and permissions

| Question | Answer |
| - | - |
| Google API scopes | `chat.bot` to receive mentions and post replies and cards. `chat.app.messages.readonly` lets CloudThinker read earlier messages in a thread. A Google Workspace admin must approve it in the Google Admin console. Until then, CloudThinker tells you a Google Workspace admin must approve message reading for CloudThinker |
| Google sign-in | **Continue with Google** only confirms which Google account you are. It requests no Gmail, Drive, or Calendar access |
| Identity mapping | Each Google account links to one CloudThinker user per organization. Every message and click runs as that user, with that user's workspace role |
| What CloudThinker stores | Messages you send to CloudThinker and its replies, saved as a conversation in the mapped workspace, plus files you upload to those messages. In a shared space, Google sends CloudThinker only the messages that mention it; with the message-reading scope approved, it can also read earlier messages in its own thread |
| Approvals | Chat clicks go through the same approval path as the web app, so the decision shows on the conversation in CloudThinker |

## Send notifications to a space

A mapped shared space can receive workspace notifications, such as incident updates, approval requests, and Review results. Each workspace has its own settings, so switch to the right workspace in the workspace switcher at the top of the sidebar first.

**1. Open Notifications**

Go to **More → Workspace settings → Notifications**.

**2. Pick the space**

On the **Google Chat** card, click **Pick a space**, then search for and select a shared space mapped to this workspace. You can also set it from **Admin Settings → Integrations → Google Chat** with **Make notification default** on the space row.

**3. Turn on events**

Under **What to notify me about**, turn on the Google Chat cell for each event the space should get. See [Notifications](https://docs.cloudthinker.io/guide/notifications.md) for the full list.

**Success state:** the **Google Chat** card shows the space name, and the next matching event posts in that space.

Direct messages never receive notifications, so they don't appear as destinations. If the card says **No Google Chat space is mapped to this Workspace yet**, map a shared space to this workspace first.

## Manage mapped spaces

Go to **Admin Settings → Integrations → Google Chat** to see every mapped space and the workspace it uses.

Open the actions menu (**...**) on a space row:

| Action | What happens |
| - | - |
| **Make notification default** | The space becomes the default notification destination for its workspace. The row shows a **Notification default** badge |
| **Change Workspace** | Moves the space to another workspace in the same organization. New messages start fresh conversations there; earlier conversations stay in the original workspace |
| **Remove** | Stops CloudThinker working in the space. The bot stays in the space, and a mention gets **Google Chat is disconnected from this Workspace.** Earlier conversations stay in the workspace. To map the space again, remove CloudThinker from the space in Google Chat and add it again |

To stop using the integration for the whole organization, click **Disconnect Google Chat** at the bottom of the page.

Only organization Owners and Admins can change mappings or disconnect.

## Troubleshooting

> [accordion] CloudThinker does not send a configuration link
>
> Mention CloudThinker again in the same conversation. In a direct message where CloudThinker was added before, remove it and add it again so Google sends a fresh setup event.

> [accordion] This Google Chat link expired or is invalid
>
> The link timed out or was opened with a different Google account (see [step 2](#map-a-space-to-a-workspace)). Mention CloudThinker again to get a new one.

> [accordion] An organization Admin must connect this space
>
> Only an organization Owner or Admin can map a shared space. Ask one to mention CloudThinker in the same space and open the new link.

> [accordion] You cannot run CloudThinker in this Workspace
>
> You aren't a member of that workspace, or your role is **Viewer**, which can't run chats. Ask a workspace Admin for the **Developer** role. Then mention CloudThinker again for a new link.

> [accordion] Google Chat requires a Team plan
>
> Your organization is on the Free plan. Ask your organization Owner to [upgrade](https://docs.cloudthinker.io/guide/billing/subscription.md), then open the link again.

> [accordion] Google Sign-In did not load
>
> Your browser or an extension blocked `accounts.google.com`. Allow it for the CloudThinker site, then reload the page.

> [accordion] A Google Chat space needs to be reconnected
>
> Google Chat refused CloudThinker's messages to that space, so CloudThinker stopped sending there. In Google Chat, remove CloudThinker from the space and add it again.

## Next steps

> [card] [Notifications](https://docs.cloudthinker.io/guide/notifications.md)
>
> Choose which updates each shared space receives

> [card] [Commands and prompt syntax](https://docs.cloudthinker.io/guide/commands.md)
>
> Write requests that name a connection or run a skill

> [card] [Approvals](https://docs.cloudthinker.io/guide/approvals/overview.md)
>
> Decide which actions need a human before they run

> [card] [Slack integration](https://docs.cloudthinker.io/guide/slack-integration.md)
>
> Set up CloudThinker in another chat tool


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