AgentConnect
Connect & AutomateChat platforms

Google Chat

Connect a Google Chat app to AgentConnect. Configure Google Cloud credentials and HTTPS callbacks so agents can reply to direct messages and mentions in spaces.

A Google Chat integration connects an agent to a Chat app you create in your own Google Cloud project, built as a Google Workspace add-on. Google delivers the app's events over HTTPS callbacks only, with no socket mode, so the deployment needs a public callback endpoint. AgentConnect Cloud has one.

Create the app

The wizard's Before you start step lists what you need:

  • A Google Workspace account that can configure Chat apps.
  • A Google Cloud project with the Google Chat API enabled.
  • The Cloud Resource Manager API enabled in that project. AgentConnect reads the project's number through it.
  • A service account in that same project with the Browser role, and a JSON key for it. Create the key in the Chat app's own project; a key from another project is refused.

Then, in the Google Cloud console, open APIs & Services → Google Chat API → Configuration:

  1. Build the app as a Google Workspace add-on, the default for a new app. Convert an existing Chat app first; the conversion cannot be undone.
  2. Set the app's name, avatar, and description.
  3. Under Functionality, select Receive 1:1 messages and Join spaces and group conversations.
  4. Under Connection settings, choose HTTP endpoint URL, use one URL for all triggers, and enter the value the wizard shows: the deployment's public callback origin followed by /googlechat/events, such as https://relay.example.test/googlechat/events.
  5. Optionally, under Commands, add a slash command named /help, described "Show how to use this app", with command ID 1. Any free ID works, since AgentConnect matches the name. People can then use /help in Chat to see the app's commands.
  6. Under Visibility, choose the people and groups in your Workspace domain who may use the app. A private app needs no Marketplace listing.
  7. Click Save.

Connect it

On your agent, open Integrations → Add integration → Google Chat. Paste the service-account key JSON, and the wizard fills in the Project ID from it. The Project number is optional: AgentConnect looks it up, and checks it if you enter one. Click Connect.

AgentConnect validates the key with Google before saving it, and clears the key field after every attempt. A refusal names its fix: the wrong project, a key from another project, the Cloud Resource Manager API disabled, the Browser role missing, or the Chat API not configured.

After connecting, the wizard shows three states:

  • Saved — Google accepted the key.
  • Connected — the callback endpoint is live and the agent is online.
  • Added — the app is in a space or a direct conversation.

Then test it: send the app a direct message, or add it to a space and mention it.

Use it

  • Direct messages — message the app directly; every message reaches the agent. Replies stream in and are edited into their final form.
  • Spaces — add the app to a space and @-mention it. The agent replies in the same thread as the message. Google delivers a space message to the app only when it mentions the app, replies inside a thread included: a thread reply without the mention is never delivered, so the agent cannot answer it. For the same reason, a space's trigger offers @-mention, By decision, or Off, and no any message option.
  • Welcome and help — the app introduces itself when it is added to a space or a direct message. If the app has the /help command, type /help and pick it from Chat's command list to see the text commands.
  • Working on it — if the agent has shown nothing after two seconds, the app posts "⏳ Working on it…", and the answer replaces it. If the agent decides not to answer, the message is withdrawn, and Google Chat shows that a message was deleted.
  • Formatting — the agent's Markdown is rendered in Google Chat's supported subset: bold, italic, strikethrough, inline code, code blocks, lists, and links. Headings render as bold lines, images as links, and tables as monospace blocks. Long replies are split across messages.
  • Questions — when the agent needs your input, it posts a card in the conversation: a button per option, or a short form with Confirm. Anyone who can see the card can answer it, and it updates to show the answer. Dismiss declines the question.
  • Approvals — when a tool call needs approval, the agent posts a card in the thread with the runtime's choices. Who may answer it is set by the agent's What people can do in chat.

Not supported in this version: attachments in either direction, dialogs, group direct messages, slash commands other than /help, and reactions.

See In-conversation commands for stopping, cancelling, queuing, and changing supported session settings.

Visibility in the console

A direct message with the app stays private to the person who sent it. They can open it in the console after signing in with the same Google account, or linking it on their profile; nobody else can, organization Owners included. Conversations in a space are visible to the organization, whoever is in the space.

Notes

  • Your own Chat app binds to one agent, and a Google Cloud project holds one Chat app. Deleting the integration frees the app for reuse (Use an existing bot next time).
  • Rotate your own app's key under Integrations → Messaging apps → Google Chat by pasting a new service-account key. A deployment Chat app's key rotates in the Setup Server instead.
  • Spaces the app belongs to appear under the integration. A direct conversation appears after its first message, named after the person.

Self-hosting

A self-hosted deployment needs its public callback endpoint configured, as for Linear. An operator can also configure a deployment Chat app that serves every organization through its built-in AgentConnect agent.

How is this guide?

On this page

How is this guide?