google-chatSend messages to Google Chat spaces and users via webhooks or OAuth. Use when you need to send notifications, alerts, or messages to Google Chat channels (spaces) or direct messages to specific users. Supports both incoming webhooks (for predefined channels) and OAuth 2.0 (for dynamic messaging to any space or user).
Install via ClawdBot CLI:
clawdbot install darconada/google-chatSend messages to Google Chat using two methods:
Send to a pre-configured channel:
python3 scripts/send_webhook.py "$WEBHOOK_URL" "Your message here"
Example with threading:
python3 scripts/send_webhook.py "$WEBHOOK_URL" "Reply message" --thread_key "unique-thread-id"
Configuration: Store webhooks in google-chat-config.json:
{
"webhooks": {
"acs_engineering_network": "https://chat.googleapis.com/v1/spaces/...",
"general": "https://chat.googleapis.com/v1/spaces/..."
}
}
Read config and send:
WEBHOOK_URL=$(jq -r '.webhooks.acs_engineering_network' google-chat-config.json)
python3 scripts/send_webhook.py "$WEBHOOK_URL" "Deploy completed ā
"
First-time setup:
google-chat-oauth-credentials.json)python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--space "General" \
"Test message"
Send to a space by name:
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--space "Engineering Network" \
"Deploy completed"
Note: OAuth messages automatically include š¤ emoji prefix. Use --no-emoji to disable this:
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--space "Engineering Network" \
"Message without emoji" \
--no-emoji
List available spaces:
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--list-spaces
Send to a DM (requires existing space ID):
# Note: Google Chat API doesn't support creating new DMs by email
# You need the space ID of an existing DM conversation
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--space-id "spaces/xxxxx" \
"The report is ready"
Send to space by ID (faster):
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--space-id "spaces/AAAALtlqgVA" \
"Direct message to space"
Install required Python packages:
pip install google-auth-oauthlib google-auth-httplib2 google-api-python-client
Required OAuth Scopes:
https://www.googleapis.com/auth/chat.messages - Send messageshttps://www.googleapis.com/auth/chat.spaces - Access space informationhttps://www.googleapis.com/auth/chat.memberships.readonly - List space members (for DM identification)If OAuth credentials don't exist yet:
google-chat-oauth-credentials.jsonThe credentials JSON should look like:
{
"installed": {
"client_id": "...apps.googleusercontent.com",
"client_secret": "GOCSPX-...",
"redirect_uris": ["http://localhost"],
...
}
}
To create a webhook for a Google Chat space:
google-chat-config.jsonUse Webhooks when:
Use OAuth when:
OAuth Limitations:
--list-spaces to find available DM space IDsBoth methods support simple text. For advanced formatting (cards, buttons), construct JSON payloads:
Webhook with card:
import json
import urllib.request
payload = {
"cardsV2": [{
"cardId": "unique-card-id",
"card": {
"header": {"title": "Deploy Status"},
"sections": [{
"widgets": [{
"textParagraph": {"text": "Production deploy completed successfully"}
}]
}]
}
}]
}
data = json.dumps(payload).encode("utf-8")
req = urllib.request.Request(webhook_url, data=data, headers={"Content-Type": "application/json"})
urllib.request.urlopen(req)
Webhook errors:
OAuth errors:
Permission errors:
Deploy notification to engineering channel:
WEBHOOK=$(jq -r '.webhooks.acs_engineering_network' google-chat-config.json)
python3 scripts/send_webhook.py "$WEBHOOK" "š Production deploy v2.1.0 completed"
Alert specific user about task:
python3 scripts/send_oauth.py \
--credentials google-chat-oauth-credentials.json \
--token google-chat-token.json \
--dm juan@empresa.com \
"Your report is ready for review: https://docs.company.com/report"
Thread multiple messages together (webhook):
WEBHOOK=$(jq -r '.webhooks.general' google-chat-config.json)
THREAD_KEY="deploy-$(date +%s)"
python3 scripts/send_webhook.py "$WEBHOOK" "Starting deploy..." --thread_key "$THREAD_KEY"
# ... deployment happens ...
python3 scripts/send_webhook.py "$WEBHOOK" "Deploy completed ā
" --thread_key "$THREAD_KEY"
Generated Mar 1, 2026
Send automated alerts to Google Chat spaces when CI/CD pipelines complete deployments, fail, or require manual approval. This ensures engineering teams receive real-time updates without switching contexts, improving response times and collaboration.
Notify IT support teams in dedicated Google Chat spaces about system outages, security breaches, or high-priority tickets. This enables rapid coordination and escalation, reducing downtime and streamlining incident resolution workflows.
Automatically post sales leads, closed deals, or pipeline changes to a sales team's Google Chat space from CRM systems. This keeps the team aligned on targets and opportunities, fostering transparency and quick follow-ups.
Send alerts to support managers or specialized agents in Google Chat when customer issues require escalation or exceed SLA thresholds. This ensures critical cases are addressed promptly, improving customer satisfaction and service quality.
Monitor production lines and send notifications to Google Chat spaces about equipment failures, quality control issues, or inventory shortages. This allows maintenance and operations teams to react quickly, minimizing disruptions and downtime.
Offer this skill as part of a larger SaaS platform that integrates with Google Chat for notifications across various business tools like project management, CRM, or monitoring systems. Charge subscription fees based on usage tiers or number of channels.
Provide consulting services to businesses for setting up and customizing Google Chat messaging workflows, including OAuth configuration, webhook management, and advanced formatting like cards. Bill clients hourly or per project.
Operate a managed service that handles Google Chat notifications for clients, including monitoring, troubleshooting, and scaling. Offer SLAs and support packages, generating revenue through monthly retainers or per-alert pricing.
š¬ Integration Tip
Start with webhooks for simple, static notifications to reduce setup complexity, then transition to OAuth for dynamic messaging once familiar with the API and authentication flow.
iMessage/SMS CLI for listing chats, history, watch, and sending.
Use when you need to control Discord from Clawdbot via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, fetch permissions or member/role/channel info, or handle moderation actions in Discord DMs or channels.
Use when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
Build or update the BlueBubbles external channel plugin for Clawdbot (extension package, REST send/probe, webhook inbound).
OpenClaw skill for designing Telegram Bot API workflows and command-driven conversations using direct HTTPS requests (no SDKs).