Question: How do I use and manage Google Chat and Spaces, and how do I integrate it with my own systems?
Explanation: Google Chat is the chat and collaboration service in Google Workspace, comparable to Slack and Microsoft Teams. It's built into Gmail, runs on desktop, mobile and as a standalone Chrome app, and costs no extra licence on top of your standard Workspace subscription.
Chat consists of three conversation types: direct messages (1-on-1), group messages (small groups) and spaces (persistent collaboration rooms for teams, projects or topics, up to 500,000 members per space since 2024). With huddles for drop-in audio/video, meeting conversations that automatically link meetings to persistent chats, and extensive REST API and webhooks for integration with your own systems, Chat has become a full-featured collaboration platform.
- Direct Message (DM): 1-on-1. No topic structure, no members, no title. For quick questions or confidential alignment.
- Group Message: three or more people without formal structure. No name, no description, no way to add or remove someone without creating a new group. Ad-hoc coordination.
- Space: persistent collaboration room with name, description, members, threads, pinned content, integrations and Gemini support. Up to 500,000 members per space.
Features per Workspace licence:
| Feature | Business Starter | Business Standard | Business Plus | Enterprise |
|---|---|---|---|---|
| Direct messages and group chats | Yes | Yes | Yes | Yes |
| Spaces up to 500,000 members | Yes | Yes | Yes | Yes |
| External Chat and guests | Yes | Yes | Yes | Yes |
| Huddles | Yes | Yes | Yes | Yes |
| Announcement spaces | Yes | Yes | Yes | Yes |
| Message retention via Vault | No | No | Yes | Yes |
| Custom retention rules | No | No | Yes | Yes |
| DLP for Chat | No | No | Yes | Yes |
| Gemini in Chat | No | Yes | Yes | Yes |
| Webhooks (incoming) | No | Yes | Yes | Yes |
| Chat API (apps and bots) | Yes | Yes | Yes | Yes |
Technical architecture and concepts
- Spaces are identified by a spaces/{spaceId} resource name, where spaceId is a case-sensitive unique string (e.g. spaces/AAQAtTYVa5g).
- Messages have a resource name spaces/{spaceId}/messages/{messageId}.
- Threads have a threadKey you can set yourself when sending via webhook, allowing automation to reply in the same thread.
- Chat supports two messaging types: [list]
- Synchronous: a Chat app can respond to messages or slash commands, requires OAuth and Chat API.
- Asynchronous: a webhook receives no replies back, but can push messages to a space based on external triggers.
- Webhook: 1 message per second per space, with a small burst on top.
- Chat API: per-project rate limits, with quotas you can monitor and raise in Google Cloud Console.
- Message size: max 32 KB per message, including card payloads.
- Attachments: max 200 MB per file via the API (larger files are usually sent as Drive links).
Solution:
Navigate to:
Here you'll find all Chat settings: whether it's enabled, how external chat works, whether history is preserved, and which apps are allowed.
- Under History for chats (for DMs and group messages): [list]
- History on: messages are preserved, combinable with Vault retention rules.
- History off: messages are deleted automatically after 24 hours.
- Allow users to change their history setting: users decide per conversation.
- Chat externally: on or off. Determines whether employees can chat with externals.
- External spaces: on or off. Determines whether spaces with externals can be created. Only works if Chat externally is on.
- Allowlisted domains: only external users from pre-approved domains may be added. Strict option for organisations with fixed partners.
External users are identified with two labels:
- External (yellow label): user with a Google Workspace account or a @gmail.com account.
- Guest (teal label): user without a Workspace account, e.g. @hotmail.com or another mail provider. Gets a temporary guest account assigned by your organisation.
Since 2024 external users are invited rather than directly added to a space. They get an email invitation and have to explicitly accept before getting access. This prevents an employee from accidentally sharing confidential data in a space before the external party is verified.
From Chat:
- Click the + icon at the top left next to "Spaces".
- Choose Create space (a new room) or Browse spaces (join existing).
- Give it a name, optionally an emoji and a description.
- Choose whether the space is restricted (invitation only) or discoverable (visible to all employees).
- Decide whether the space uses threaded replies (recommended for most teams) or flat conversation (linear timeline, better for announcements).
- Add members directly or via Google Groups: link a whole Google Group as a member, so updates to that group automatically add or remove members.
Announcement space: a special type of space where only managers or selected members can post, while all members can read and react with emoji. Create via Create space::Space settings::Allow only space managers to post.
Here you see:
- All spaces including name, member count, type, creation date, and owner.
- Who is space manager, who are regular members.
- Ability to assign a new owner when the original owner left the company.
- Ability to delete a space or remove members for compliance reasons.
- System-generated spaces (like meeting conversations, see below) are also visible but rarely worth manual management.
Prerequisites:
- A Business or Enterprise Workspace licence.
- Webhook access enabled in , under "Allow users to install Chat apps" and "Allow incoming webhooks".
- Manager or owner permissions in the space where you want to install the webhook.
Create a webhook:
- Open the space in Google Chat.
- Click the space name at the top, then Apps & integrations.
- Click Add webhooks.
- Give the webhook a name (e.g. Monitoring Alerts) and upload an avatar URL.
- Click Save. You now see a Webhook URL (once), copy it immediately to a safe place (password manager, secrets vault).
Send a message: POST to the webhook URL with a JSON payload. The simplest message:
POST https://chat.googleapis.com/v1/spaces/SPACE_ID/messages?key=KEY&token=TOKEN
Body: {"text": "Server prod-web-01 has been offline since 14:32"}
For a rich card message (with title, buttons, images):
{"cardsV2": [{"cardId": "alert-001", "card": {"header": {"title": "Server offline", "subtitle": "prod-web-01", "imageUrl": "https://example.com/alert.png"}, "sections": [{"widgets": [{"textParagraph": {"text": "Last seen: 14:32 CET"}}, {"buttonList": {"buttons": [{"text": "Open dashboard", "onClick": {"openLink": {"url": "https://monitoring.example.com/host/prod-web-01"}}}]}}]}]}}]}
Threading: want follow-up messages in the same thread? Add a threadKey parameter to the URL. Messages with the same threadKey get grouped:
Prerequisites:
- A Google Cloud project with the Google Chat API enabled.
- An OAuth consent screen configured (even for internal apps).
- A backend (HTTP endpoint, Cloud Function, or Apps Script) that handles incoming events.
Slash commands: commands like /incident, /standup or /lookup that users can type to invoke the app. Configure them in the Chat API settings in Google Cloud Console, under Slash commands with:
- Command ID (a number distinguishing your app's commands).
- Command name (the text users type, /incident).
- Description.
- Whether the command opens a dialog or directly performs an action.
Cards and interactive widgets: Chat apps can show rich UI elements via Card messages: buttons, dropdowns, input fields, datepickers, images and section headers. A user clicks a button, the Chat API sends an event to your backend, and your backend responds with a new card, a dialog or an action.
Dialogs: pop-up modals you can open from a slash command or card button, for form input. For example a /create-ticket command opens a dialog where the user enters title, priority and description, and on submit the ticket is created in your ticketing system.
- Is created and populated by the system up to 7 days before the meeting.
- Is linked to the Calendar event.
- Persists all chat messages sent during the meeting, even after it ends, as a persistent Chat space.
- Follows your organisation's Chat retention rules.
- Unused conversations (without messages or pinned content) are automatically deleted 8 days after the meeting.
For admins this means the "Created spaces" count in Chat reports can rise sharply because the system generates these automatically. This is not real growth in user activity.
In Vault meeting conversations can also be placed on hold, retained and searched just like regular spaces, provided a retention rule is active.
In the Admin Console go to:
Create a new rule with:
- Scope: Chat (pick whether DMs, group messages, spaces or all fall under the rule).
- Conditions: use pre-defined detectors for SSN, credit cards, IBAN, passport numbers, etcetera, or define custom regular expressions.
- Actions: [list]
- Audit only (log without intervention, suitable for monitoring phase).
- Warn user (user gets a warning before sending).
- Block message (message is not sent).
DLP rules don't apply to anonymous users in meeting conversations.
- Manage spaces: create, modify, delete. POST https://chat.googleapis.com/v1/spaces.
- Manage members: add or remove members from a space. POST https://chat.googleapis.com/v1/spaces/{spaceId}/members.
- Send messages: programmatically post messages as a Chat app. POST https://chat.googleapis.com/v1/spaces/{spaceId}/messages.
- Get messages: search and list messages in a space. GET https://chat.googleapis.com/v1/spaces/{spaceId}/messages.
- Reactions: programmatically add emoji reactions.
OAuth scopes:
- https://www.googleapis.com/auth/chat.spaces (read/write spaces)
- https://www.googleapis.com/auth/chat.messages (read/write messages)
- https://www.googleapis.com/auth/chat.memberships (read/write members)
- google.workspace.chat.message.v1.created (new message)
- google.workspace.chat.message.v1.updated (message edited)
- google.workspace.chat.message.v1.deleted (message deleted)
- google.workspace.chat.membership.v1.created (member added)
- google.workspace.chat.space.v1.updated (space settings changed)
With this you can for example:
- Build an audit log of all messages in compliance-sensitive spaces.
- Build a bot that automatically responds to keywords in a space.
- Send notifications to external systems when someone is added to a space.
- Monitoring alerts: configure Prometheus/Grafana/Datadog to send alerts via a webhook to an #alerts-prod space, grouped per incident with threadKey.
- CI/CD pipeline: have GitHub Actions, GitLab CI or Jenkins post notifications to a #deployments space, with cards linking directly to build logs.
- Ticketing system: build a Chat app with slash commands /ticket-create, /ticket-status and /ticket-assign talking to the API of Zendesk, Freshdesk or Jira.
- Onboarding bot: a Chat app that walks new employees through a checklist via dialog and automatically adds them to the right spaces.
- Standup bot: posts a question every morning at 09:00 in a team space, collects answers in a thread, and sends a summary to the manager.
Specific features and use cases
Use cases:
- An ad-hoc question in a team space that's too complex for text.
- A quick escalation during an incident, where the right people are already in the space.
- A short stand-up without Calendar overhead.
Under the hood a huddle is a lightweight Meet session. Audio only by default, participants can enable video. Up to 100 participants per huddle.
- Summarize this conversation: summarises a long conversation into action items and decisions.
- Catch me up: summarises what you've missed since the last time you opened a space.
- Search with Gemini: ask questions to your entire Chat history in natural language ("what did we decide about the Q2 roadmap?").
- Smart replies: three suggested replies to a message, contextual.
Important:
- Spaces with more than 8,000 members have history mandatorily on and can't be turned off.
- For spaces with more than 50,000 members an Announcement-only configuration is strongly recommended, otherwise everyone drowns in notifications.
- Manage members via Google Groups instead of manually: add a Google Group as member and all changes in the group are automatically reflected in the space.
Common mistakes and how to avoid them
- Committing webhook URLs to code repositories. Webhook URLs are secrets and grant the ability to post in your space. Always use a secrets manager or environment variables, and rotate periodically.
- Not using threadKey for related messages. When a monitoring system posts 50 alerts per hour, you get 50 separate messages instead of one thread per incident. Always use a threadKey related to the incident ID.
- Exceeding rate limits without retry logic. Above 1 message per second per webhook you get 429 errors back. Implement exponential backoff with the Retry-After header.
- Creating external spaces before External chat is on. The External spaces setting only works when External chat is on at the organisation level. Check both before promising users anything.
- History off in spaces with external members. When your organisation has history on but the external party has history off, the chat fails. For maximum compatibility force history on for all spaces.
- Skipping Vault retention with auto-deletion. Auto-deletion can delete messages after the retention window. For compliance-sensitive sectors combine both: auto-deletion for user experience, Vault retention for legal requirements.
- Forgetting that external DMs follow the creator's retention. Since February 2026. When an external party starts a DM with your employee, their retention rules apply. Set a Vault retention policy on your whole organisation to cover this.
- Setting up a large space without Announcement mode. A space with 5,000+ members where everyone can post results in an unreadable stream within a day. Make large spaces Announcement-only by default and open a separate discussion space for those who want to reply.
- Not planning for owner replacement. When a space owner leaves the company and no one else is a manager, the space becomes "orphaned". Always assign at least two space managers per active space.
- Slash commands without consent screen. A Chat app always requires an OAuth consent screen, even for internal distribution. Don't forget to declare the right scopes, otherwise users get an error at activation.
- Not accounting for meeting conversations in audits. Since 2024 meetings are automatically created as chat spaces. Account for this in your retention policy, because it can cause an explosion in space counts in reports.