
OpenClaw Integration with Google Chat

By Sarah Jenkins


By Sarah Jenkins
Status: ready for DMs + spaces via Google Chat API webhooks (HTTP only).
~/.openclaw/googlechat-service-account.json).Once the gateway is running and your email is added to the visibility list:
Google Chat webhooks require a public HTTPS endpoint. For security, only expose the /googlechat path to the internet. Keep the OpenClaw dashboard and other sensitive endpoints on your private network.
Use Tailscale Serve for the private dashboard and Funnel for the public webhook path. This keeps / private while exposing only /googlechat.
Your public webhook URL will be: https://<node-name>.<tailnet>.ts.net/googlechat
Your private dashboard stays tailnet-only: https://<node-name>.<tailnet>.ts.net:8443/
Use the public URL (without :8443) in the Google Chat app config.
Note: This configuration persists across reboots. To remove it later, run tailscale funnel reset and tailscale serve reset.
If you use a reverse proxy like Caddy, only proxy the specific path:
your-domain.com {
reverse_proxy /googlechat* localhost:18789
}With this config, any request to your-domain.com/ will be ignored or returned as 404, while your-domain.com/googlechat is safely routed to OpenClaw.
Configure your tunnel's ingress rules to only route the webhook path:
/googlechat -> http://localhost:18789/googlechatAuthorization: Bearer <token> header.audienceType + audience:botUser if mention detection needs the app’s user name.Use these identifiers for delivery and allowlists:
users/<userId> (recommended).name@example.com is mutable and only used for direct allowlist matching when channels.googlechat.dangerouslyAllowNameMatching: true.users/<email> is treated as a user id, not an email allowlist.spaces/<spaceId>.{
channels: {
googlechat: {
enabled: true,
serviceAccountFile: "/path/to/service-account.json",
// or serviceAccountRef: { source: "file", provider: "filemain", id: "/channels/googlechat/serviceAccount" }
audienceType: "app-url",
audience: "https://gateway.example.com/googlechat",
webhookPath: "/googlechat",
botUser: "users/1234567890", // optional; helps mention detection
dm: {
policy: "pairing",
allowFrom: ["users/1234567890"],
},
groupPolicy: "allowlist",
groups: {
"spaces/AAAA": {
allow: true,
requireMention: true,
users: ["users/1234567890"],
systemPrompt: "Short answers only.",
},
},
actions: { reactions: true },
typingIndicator: "message",
mediaMaxMb: 20,
},
},
}Notes:
serviceAccount (JSON string).serviceAccountRef is also supported (env/file SecretRef), including per-account refs under channels.googlechat.accounts.<id>.serviceAccountRef./googlechat if webhookPath isn’t set.dangerouslyAllowNameMatching re-enables mutable email principal matching for allowlists (break-glass compatibility mode).reactions tool and channels action when actions.reactions is enabled.send for text and upload-file for explicit attachment sends. upload-file accepts media / filePath / path plus optional message, filename, and thread targeting.typingIndicator supports none, message (default), and reaction (reaction requires user OAuth).mediaMaxMb).If Google Cloud Logs Explorer shows errors like:
status code: 405, reason phrase: HTTP error response: HTTP/1.1 405 Method Not AllowedThis means the webhook handler isn't registered. Common causes:
Verify the channel is running:
openclaw channels status
# Should show: Google Chat default: enabled, configured, ...openclaw channels status --probe for auth errors or missing audience config.botUser to the app's user resource name and verify requireMention.openclaw logs --follow while sending a test message to see if requests reach the gateway.About the author

Sarah Jenkins is a seasoned OpenClaw developer with a strong focus on optimizing high-performance computing solutions. Her work primarily involves crafting efficient parallel algorithms and enhancing GPU acceleration for complex scientific simulations. Jenkins is renowned for her meticulous attention to detail and her ability to translate intricate theoretical concepts into practical, robust OpenClaw implementations.