OpenClaw Google Chat Channel
Connect OpenClaw to Google Chat using the Google Chat API via an HTTP endpoint. This enterprise integration lets your AI assistant operate in Google Workspace — handling direct messages and space conversations. The bot receives HTTP POST requests from Google Chat, validates bearer tokens via a service account, and routes messages through the OpenClaw Gateway.
Google Chat Supported Features
Text Messages
Supported
Media & Files
Supported
Reactions
Supported
Threads
Supported
Voice Messages
Not Supported
Group Chat
Supported
Google Chat Prerequisites
- A Google Workspace account (Business or Enterprise). Domain admin access may be needed for authorization scope approvals and app visibility settings
- Google Cloud project with the Google Chat API enabled
- A service account with a JSON key file
- OpenClaw Gateway running and configured
- A publicly accessible HTTPS endpoint for the webhook (e.g., via Tailscale Funnel, Caddy, or Cloudflare Tunnel)
Google Chat Quick Setup
Enable Google Chat API & create service account
Go to the Google Cloud Console, enable the Google Chat API. Create a new service account (e.g., 'openclaw-chat'), skip permission configurations, then generate and download a JSON key file. Store it on your gateway host (e.g., ~/.openclaw/googlechat-service-account.json).
Configure Chat App in Google Cloud Console
In the Google Cloud Console Chat Configuration, set up the app name, avatar URL, and description. Enable interactive features, allow the app to join spaces/group conversations. Select 'HTTP endpoint URL' as the connection setting and enter your gateway's public URL followed by '/googlechat' (use 'openclaw status' to find the gateway URL).
Set visibility, enable the app, and test
Restrict app availability to specific users or groups in your domain. Save the configuration, refresh the page, and change the app status to 'Live — available to users'. In Google Chat, click the '+' icon next to Direct Messages, search for your app name, and send a test message.
Google Chat Configuration Example
{
"channels": {
"googlechat": {
"serviceAccountFile": "~/.openclaw/googlechat-service-account.json",
"webhookPath": "/googlechat"
}
}
}Google Chat Deep Dive
Architecture Overview
Service Account Setup
{
"channels": {
"googlechat": {
"serviceAccountFile": "~/.openclaw/googlechat-service-account.json"
}
}
}Chat App Configuration
Public URL & Webhook Configuration
# Tailscale Funnel example:
tailscale funnel --set-path=/googlechat localhost:18789
# Caddy example:
reverse_proxy /googlechat* localhost:18789
# Cloudflare Tunnel ingress:
- hostname: your-domain.com
path: /googlechat
service: http://localhost:18789
- service: http_status:404DM & Group Policies
{
"channels": {
"googlechat": {
"dmPolicy": "pairing",
"groupPolicy": "allowlist",
"groupAllowList": ["spaces/AAAA1234"]
}
}
}Targets & Session Routing
{
"channels": {
"googlechat": {
"botUser": "users/123456789",
"spaces": {
"spaces/AAAA1234": {
"systemPrompt": "You are a helpful assistant for the engineering team."
}
}
}
}
}Google Chat Configuration Reference
| Key | Type | Default | Description |
|---|---|---|---|
| serviceAccountFile | string | "" | Path to the Google Cloud service account JSON key file |
| audience | string | "app-url" | Audience type for bearer token validation. When set to app-url, Google Chat sends an OIDC ID token; when set to project-number, it sends a self-signed JWT. Options: app-url, project-number |
| audienceValue | string | "" | The audience value used for token validation (URL or project number) |
| webhookPath | string | "/googlechat" | HTTP endpoint path for incoming Google Chat webhooks |
| botUser | string | "" | Bot user identifier (users/<id>) for @-mention detection in spaces |
| dmPolicy | string | "pairing" | Controls who can DM the bot. Options: pairing, allowlist, open, disabled |
| allowFrom | string[] | [] | User IDs or emails allowed to message the bot (when dmPolicy is allowlist) |
| groupPolicy | string | "disabled" | Group space policy. Options: disabled, allowlist, open |
| groupAllowList | string[] | [] | Space IDs allowed when groupPolicy is allowlist |
| spaces.<id>.systemPrompt | string | "" | Custom AI system prompt for a specific Google Chat space |
| mediaMaxMb | number | 20 | Maximum media file size in megabytes |
| actions.typing | boolean | true | Send typing indicators while the AI is generating a response |
Path to the Google Cloud service account JSON key file
Audience type for bearer token validation. When set to app-url, Google Chat sends an OIDC ID token; when set to project-number, it sends a self-signed JWT. Options: app-url, project-number
The audience value used for token validation (URL or project number)
HTTP endpoint path for incoming Google Chat webhooks
Bot user identifier (users/<id>) for @-mention detection in spaces
Controls who can DM the bot. Options: pairing, allowlist, open, disabled
User IDs or emails allowed to message the bot (when dmPolicy is allowlist)
Group space policy. Options: disabled, allowlist, open
Space IDs allowed when groupPolicy is allowlist
Custom AI system prompt for a specific Google Chat space
Maximum media file size in megabytes
Send typing indicators while the AI is generating a response
Google Chat Frequently Asked Questions
Google Chat Troubleshooting
The Google Chat plugin is not enabled, the channels.googlechat configuration section is missing, or the Gateway was not restarted after configuration changes.
The service account file path is incorrect, the audience setting doesn't match, or the bearer token is expired.
The bot user identifier is not configured for mention detection, or the space is not in the allowlist.
The public URL is not properly configured, firewall is blocking incoming connections, or SSL certificate is invalid.