Channels
How to Connect OpenClaw to Google Chat
Browse more in Channels.
All channels guides →This guide walks you through connecting OpenClaw to Google Chat using the Google Chat API webhooks. You will create a Google Cloud Chat app, secure the webhook with a service account, and expose only the `/googlechat` path over HTTPS.
By the end, your OpenClaw agent will respond to direct messages and spaces in Google Chat.
Prerequisites
- ✓A Google Cloud project where you can enable the Google Chat API and create service accounts.
- ✓Access to the Google Cloud Console, including the Google Chat API Credentials and Chat Configuration pages.
- ✓An OpenClaw gateway already running and reachable from your machine so you can later expose `/googlechat` over HTTPS.
- ✓Tailscale, a reverse proxy like Caddy, or Cloudflare Tunnel available to expose a public HTTPS endpoint for `/googlechat`.
Steps
- 1
Enable the Google Chat API in your Google Cloud project
Start by turning on the Google Chat API so your Chat app and webhooks can exist at all. Use the Google Chat API Credentials page to both enable the API and later manage service accounts and keys.
textGo to: https://console.cloud.google.com/apis/api/chat.googleapis.com/credentials - 2
Create a service account and JSON key for OpenClaw
Create a dedicated service account for the Chat integration and download a JSON key that OpenClaw will use to verify webhook tokens and call the Chat API. Keep permissions and principals empty as the docs specify, and store the JSON file on the gateway host where OpenClaw can read it.
textPress Create Credentials>Service Account. Name it whatever you want (e.g., `openclaw-chat`). Leave permissions blank (press Continue). Leave principals with access blank (press Done). In the list of service accounts, click on the one you just created. Go to the Keys tab. Click Add Key>Create new key. Select JSON and press Create. - 3
Store the service account key on the OpenClaw gateway
Move the downloaded JSON key onto the machine running your OpenClaw gateway so the process can read it at startup. openclaw`, which keeps channel credentials in one place.
textStore the downloaded JSON file on your gateway host (e.g., `~/.openclaw/googlechat-service-account.json`). - 4
Create and configure the Google Chat app
Create a Chat app in the Google Cloud Console and point its HTTP endpoint at your OpenClaw gateway’s `/googlechat` path. Make sure you enable interactive features, join spaces, and restrict visibility to your own account while you test.
textFill in the Application info: App name: (e.g. `OpenClaw`) Avatar URL: (e.g. `https://openclaw.ai/logo.png`) Description: (e.g. `Personal AI Assistant`) Enable Interactive features. Under Functionality, check Join spaces and group conversations. Under Connection settings, select HTTP endpoint URL. Under Triggers, select Use a common HTTP endpoint URL for all triggers and set it to your gateway’s public URL followed by `/googlechat`. Tip: Run `openclaw status` to find your gateway’s public URL. Under Visibility, check Make this Chat app available to specific people and groups in <Your Domain>. Enter your email address (e.g. `user@example.com`) in the text box. Click Save at the bottom. - 5
Set the Chat app status to live
After saving the Chat app configuration, you need to explicitly mark it as live so Google Chat will let users talk to it. This is easy to miss because the status control appears only after the first save.
textAfter saving, refresh the page. Look for the App status section (usually near the top or bottom after saving). Change the status to Live - available to users. Click Save again. - 6
Configure OpenClaw with the Google Chat service account and audience
Wire the service account JSON into OpenClaw and set the audience type and value so token verification matches your Chat app configuration. googlechat` section in your gateway config.
textEnv: `GOOGLE_CHAT_SERVICE_ACCOUNT_FILE=/path/to/service-account.json` Or config: `channels.googlechat.serviceAccountFile: "/path/to/service-account.json"`. - 7
Expose only the /googlechat webhook path over HTTPS
Google Chat requires a public HTTPS endpoint, but you should keep the OpenClaw dashboard private. Use Tailscale Funnel (recommended), a reverse proxy like Caddy, or Cloudflare Tunnel to expose only `/googlechat` while keeping `/` locked down.
text# Check what address your gateway is bound to: ss -tlnp | grep 18789 # Expose the dashboard to the tailnet only (port 8443): # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale serve --bg --https 8443 http://127.0.0.1:18789 # If bound to Tailscale IP only (e.g., 100.106.161.80): tailscale serve --bg --https 8443 http://100.106.161.80:18789 # Expose only the webhook path publicly: # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale funnel --bg --set-path /googlechat http://127.0.0.1:18789/googlechat # If bound to Tailscale IP only (e.g., 100.106.161.80): tailscale funnel --bg --set-path /googlechat http://100.106.161.80:18789/googlechat # Verify the configuration: tailscale serve status tailscale funnel status 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. Caddy reverse proxy example: your-domain.com { reverse_proxy /googlechat* localhost:18789 } Cloudflare Tunnel ingress example: * Path: `/googlechat` ->`http://localhost:18789/googlechat` * Default Rule: HTTP 404 (Not Found) - 8
Start the OpenClaw gateway and add the bot in Google Chat
With config and networking in place, start or restart the gateway so the Google Chat channel registers its webhook handler. Then add the app in Google Chat via Direct Messages and send a test message to confirm the round trip.
textStart the gateway. Google Chat will POST to your webhook path. Once the gateway is running and your email is added to the visibility list: 1. Go to https://chat.google.com/. 2. Click the + (plus) icon next to Direct Messages. 3. In the search bar (where you usually add people), type the App name you configured in the Google Cloud Console. Note: The bot will not appear in the “Marketplace” browse list because it is a private app. You must search for it by name. 4. Select your bot from the results. 5. Click Add or Chat to start a 1:1 conversation. 6. Send “Hello” to trigger the assistant!
Configuration
| Option | Description | Example |
|---|---|---|
| GOOGLE_CHAT_SERVICE_ACCOUNT_FILE | Path to the Google Chat service account JSON file that OpenClaw uses for Chat API access and webhook token verification. | /home/openclaw/.openclaw/googlechat-service-account.json |
| channels.googlechat.serviceAccountFile | Config key pointing to the service account JSON file on disk for the Google Chat channel. | /home/openclaw/.openclaw/googlechat-service-account.json |
| channels.googlechat.enabled | Enables the Google Chat channel integration in the OpenClaw gateway. | |
| channels.googlechat.audienceType | Controls how OpenClaw interprets the audience when verifying Google Chat tokens, either as the app URL or the Cloud project number. | app-url |
| channels.googlechat.audience | The expected audience value for Google Chat tokens, usually your HTTPS webhook URL or project number. | https://gateway.example.com/googlechat |
| channels.googlechat.webhookPath | The HTTP path where OpenClaw listens for Google Chat webhook POSTs. | /googlechat |
| channels.googlechat.botUser | Optional Chat user resource name for the app, used to improve mention detection in group spaces. | users/1234567890 |
| channels.googlechat.dm.policy | Policy for handling direct messages, such as pairing-based access control. | pairing |
| channels.googlechat.dm.allowFrom | List of user resource names allowed to DM the bot when using pairing or allowlist policies. | |
| channels.googlechat.groupPolicy | Policy for group spaces, such as allowlist-based access. | allowlist |
| channels.googlechat.groups."spaces/AAAA".allow | Enables or disables the bot in a specific Google Chat space. | |
| channels.googlechat.groups."spaces/AAAA".requireMention | Requires an @-mention of the bot in the specified space before it responds. | |
| channels.googlechat.groups."spaces/AAAA".users | List of allowed user resource names for a specific space. | |
| channels.googlechat.groups."spaces/AAAA".systemPrompt | Custom system prompt applied to messages in the specified space. | Short answers only. |
| channels.googlechat.actions.reactions | Enables reactions support for the Google Chat channel. | |
| channels.googlechat.typingIndicator | Controls how typing indicators are sent for Google Chat, such as message-based indicators. | message |
| channels.googlechat.mediaMaxMb | Maximum attachment size in megabytes that OpenClaw will download and store from Google Chat. | |
| channels.googlechat.dangerouslyAllowNameMatching | Re-enables mutable email principal matching for allowlists as a compatibility mode. |
Troubleshooting
status code: 405, reason phrase: HTTP error response: HTTP/1.1 405 Method Not Allowed
This means the Google Chat webhook handler is not registered in the gateway, usually because the channel config is missing, the plugin is disabled, or the gateway was not restarted after changes. googlechat` exists in your config, then ensure the plugin is enabled, and finally restart the gateway so the handler is mounted.
openclaw config get channels.googlechat
openclaw plugins list | grep googlechat
openclaw gateway restart
openclaw channels status
# Should show: Google Chat default: enabled, configured, ...Google Chat messages never reach OpenClaw (no logs, no replies)
When nothing shows up in OpenClaw, it is often an auth or audience mismatch, or the Chat app is pointing at the wrong URL or events. Probe the channel for auth errors, double-check the webhook URL and event subscriptions in the Chat app, and tail the gateway logs while sending a test message.
openclaw channels status --probe
openclaw logs --followFrequently asked questions
Powered by Mem0
Add persistent memory to OpenClaw
Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.