Use cases → AI agents on Workspace
Send Google Chat bot responses domain-wide with delegation
Respond to Google Chat messages across all users in a Workspace domain using a delegated service account, without manual token handling.
| Who it is for | Platform teams building Chat bots that need to act on behalf of any user or room in the organisation. |
|---|---|
| APIs | Chat API, Admin SDK |
| Typical scopes | chat.bot, admin.directory.user.readonly |
The problem
Building a Google Chat bot that responds across all user DMs and rooms gets blocked by the need for user tokens, which do not scale and break with staff turnover. Delegated service accounts allow centralised control, but require careful handling to ensure the bot appears in the right context and is allowed to post everywhere it's expected.
How it works
- Register the bot with the Chat API and configure it for domain-wide delegation.
- Use the Admin SDK to enumerate all users and Chat spaces where the bot should participate.
- Impersonate the relevant user via the service account to send a message or respond to an event in the correct Chat context.
- Monitor delivery and error responses from the Chat API for each attempted message.
What changes
The bot can send and respond to Chat messages anywhere in the domain, without manual user authentication or token churn.
Watch it explained
“AI Agents Native to Google Workspace — Per-Space Routing | Cuneiform Chat” — Cuneiform Chat on YouTube. Third-party video, included because it covers this ground well. We are not affiliated with the channel.
Questions people ask
Can the bot post in every space by default?
No. The bot must be explicitly added to each space or DM before it can post there, even with domain-wide delegation.
Does impersonation let the bot bypass Chat membership?
No. Impersonation with a service account does not grant access to DMs or spaces the bot has not joined; it only allows acting as a user where already permitted.
Want this built?
This is a pattern we run in production. We will set up the delegation and build this on top of it — $500 per hour, most of it working the same day.
Talk to us Or read the setup guideRelated use cases
Give an AI agent safe access to a mailbox
Let an assistant read context and prepare work, while keeping every outbound action behind human approval.
Ground an assistant in your own documents
Give an agent read access to the folders that hold your real knowledge so it answers from your material, not the internet.
Build an approval desk for everything an agent produces
Queue agent output for human review in one place, with approve, edit and reject — and an audit trail.