Google Chat
The Google Chat adapter registers a Snippbot app in Google Workspace so agents can participate in spaces and direct messages using a service account for authentication.
Prerequisites
Section titled “Prerequisites”- A Google Workspace account (paid or trial)
- Google Cloud project with billing enabled
- Admin access to Google Cloud Console and Google Workspace Admin Console
- A publicly accessible Snippbot URL with HTTPS
-
Create a Google Cloud Project
Go to console.cloud.google.com → New Project.
-
Enable the Google Chat API
In your project → APIs & Services → Library → search for Google Chat API → Enable.
-
Create a Service Account
In IAM & Admin → Service Accounts → Create Service Account:
- Name:
snippbot-chat - Role: no project role needed (Chat manages its own permissions)
After creation, go to the service account → Keys → Add Key → JSON.
Download the JSON key file — this is your
service_account_json. - Name:
-
Configure the Chat API
In APIs & Services → Google Chat API → Configuration:
- App name: Snippbot
- Avatar URL: your logo URL
- Description: your description
- Functionality: enable Receive 1:1 messages and Join spaces and group conversations
- Connection settings: HTTP endpoint URL →
https://your-snippbot-url.com/webhook/google_chat - Slash commands: add
/snippbotif desired - Click Save
-
Store credentials in Snippbot
Go to Settings → Channels → Google Chat and paste the entire contents of the JSON key file, or provide a path:
Via CLI:
Terminal window snippbot channel set google_chat \--service-account-json "$(cat /path/to/service-account.json)" -
Start the adapter
Terminal window snippbot channel start google_chat -
Create a channel binding
In Settings → Channels → Google Chat → Bindings, click Add Binding:
- Channel ID: the Google Chat space name (e.g.,
spaces/AABBcc...) - Agent: which agent responds
- Access mode:
open/allowlist/admin_only
- Channel ID: the Google Chat space name (e.g.,
-
Add the app to a space
In Google Chat, open the space → Apps → Add apps → search for your app name → Add.
How it works
Section titled “How it works”The Google Chat adapter uses service account authentication:
- Google Chat delivers webhook events to your endpoint as HTTPS POST with a Bearer token in the Authorization header
- The adapter verifies the Bearer token to authenticate the request
- The message is normalized and routed to the bound agent
- The response is sent back via the Google Chat REST API, authenticated with the service account credentials
Message types
Section titled “Message types”- Text messages in spaces and DMs
- @mentions in spaces (Snippbot responds when mentioned)
- Cards for rich responses (formatted results, tables, buttons)
Slash commands
Section titled “Slash commands”Register custom slash commands in the Chat API configuration:
| Command | Description |
|---|---|
/snippbot | Send a message to the bound agent |
/status | Check agent and project status |
/help | Show available commands |
Access modes
Section titled “Access modes”| Mode | Who can use the bot |
|---|---|
open | Any workspace user in bound spaces |
allowlist | Only approved Google accounts (by email) |
admin_only | Only admin users |
Troubleshooting
Section titled “Troubleshooting”Webhook endpoint not accepted by Google Chat
Section titled “Webhook endpoint not accepted by Google Chat”The adapter must be running before configuring the endpoint:
snippbot channel status google_chatGoogle Chat sends a verification event to the endpoint on save. Check adapter logs for the verification request.
JWT verification failing
Section titled “JWT verification failing”- Ensure the service account JSON is complete and unmodified
- Check that the Chat API is enabled in your Google Cloud project
- Verify the project ID in the JSON matches the project where Chat API is enabled
App not appearing in space search
Section titled “App not appearing in space search”The Google Workspace admin must publish the app. Go to Google Workspace Admin Console → Apps → Google Workspace Marketplace SDK (or direct publishing for internal apps).
# Check adapter status and last errorsnippbot channel logs google_chatService account key rotation
Section titled “Service account key rotation”When rotating the service account key:
- Create a new key in Google Cloud Console
- Update Snippbot:
snippbot channel set google_chat --service-account-json "$(cat new-key.json)" - Restart the adapter:
snippbot channel restart google_chat - Delete the old key in Google Cloud Console