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 built as a Google Workspace add-on in your Google Cloud project. Google only delivers Chat app events over HTTPS callbacks (there's no socket mode), so your deployment needs a public callback endpoint. AgentConnect Cloud provides one automatically.
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 so AgentConnect can look up the project number.
- A service account in the same project with the Browser role, along with a JSON key for it. Create the key in the Chat app's own project; keys from other projects are rejected.
Next, in the Google Cloud console, open APIs & Services → Google Chat API → Configuration:
- Build the app as a Google Workspace add-on (the default for new apps). If you're reusing an existing Chat app, convert it first. Note that this conversion can't be undone.
- Set the app's name, avatar, and description.
- Under Functionality, select Receive 1:1 messages and Join spaces and group conversations.
- Under Connection settings, choose HTTP endpoint URL, use one URL for all triggers, and enter the URL shown in the wizard (your deployment's public callback origin followed by
/googlechat/events, such ashttps://relay.example.test/googlechat/events). - Optionally, under Commands, add a slash command named
/helpwith description "Show how to use this app" and command ID1. Any unused ID works, since AgentConnect matches by command name. Users can then run/helpin Chat to see the app's commands. - Under Visibility, choose the people and groups in your Workspace domain who can use the app. Private apps don't need a Marketplace listing.
- 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 automatically. Project number is optional: AgentConnect looks it up for you, and checks it if you enter one manually. Click Connect.
AgentConnect validates the key with Google before saving it and clears the key field after every attempt. If validation fails, the error message tells you what to fix: a mismatched 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 has been added to a space or direct conversation.
To test the setup, 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, and replies stream in and edit in place until finished.
- Spaces: Add the app to a space and @-mention it. The agent replies in the same thread. Google only delivers space messages that mention the app, including replies inside a thread. Thread replies without a mention aren't delivered, so the agent can't answer them. For the same reason, space triggers only offer @-mention, By decision, or Off (there's no any message option).
- Welcome and help: The app introduces itself when added to a space or direct message. If you configured the
/helpcommand, type/helpand pick it from Chat's command list to see the text commands. - Working on it: If the agent hasn't shown output after two seconds, the app posts "⏳ Working on it…" and replaces it once the answer is ready. If the agent decides not to reply, that placeholder is withdrawn and Google Chat shows that a message was deleted.
- Formatting: Markdown renders using 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 multiple messages.
- Questions: When the agent needs input, it posts a card in the conversation with a button per option or a short form with Confirm. Anyone who can see the card can answer it, and the card updates to show the result. Click Dismiss to decline the question.
- Approvals: When a tool call requires approval, the agent posts a card in the thread with the runtime's options. Who can approve it is set by the agent's What people can do in chat setting.
Not supported in this version: file 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 is 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 see it, including organization Owners. Conversations in a space are visible to the organization, regardless of who is in the space.
Recover a Workspace connection
If you use the deployment's shared Chat app, one Google Workspace customer connects to one AgentConnect organization. If the app reports that the Workspace is already connected elsewhere, release the existing connection first.
If you have access to the original AgentConnect organization, ask an editor of its built-in AgentConnect agent to delete the Google Chat integration from that agent's Integrations tab. That releases the Workspace binding. Then send the app a new message in Google Chat and follow its connection link to connect to your target organization.
If you can't access the original organization, a current Google Workspace super administrator can recover the connection:
- Send
/helpto the shared app in a direct message and open Manage Workspace connection. - Sign in with the same Google account, select the target AgentConnect organization, and click Connect. You must be an Owner or Collaborator of that organization.
- When the page reports that the Workspace is connected elsewhere, select Verify Workspace administrator and complete Google's read-only administrator check.
- Confirm the destination organization and select Recover connection. Verification alone doesn't change the binding, and you can cancel before confirming.
Recovery stops the original connection. Session history and agents remain in the original organization, and connection settings aren't transferred, so configure the new connection in the destination organization. The original installer doesn't need to participate, even if they have left the company. First-time connections don't require this extra verification.
If verification isn't available, or you have a delegated administrator role instead of super administrator, email contact@agentconnect.md with your Workspace domain, app name, and target organization. Self-hosted users should contact their deployment operator, who can configure administrator recovery.
Uninstalling or reinstalling the app in Google Workspace doesn't currently release its AgentConnect binding, and removing it from a space or direct message leaves the Workspace binding intact. These steps apply to the deployment's shared app; an app you registered yourself follows the standard integration removal flow below.
Notes
- Your own Chat app binds to one agent, and each Google Cloud project can contain one Chat app. Deleting the integration frees the app for reuse (choose 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 is rotated in the Setup Server.
- Spaces the app belongs to appear under the integration. Direct conversations appear after their first message, labeled with the person's name.
Self-hosting
A self-hosted deployment needs a public callback endpoint configured, just like Linear. An operator can also configure a deployment Chat app that serves every organization through its built-in AgentConnect agent.
How is this guide?