# Send Google Chat to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "google-chat",
    "name": "Google Chat",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/darconada/google-chat",
    "canonicalUrl": "https://clawhub.ai/darconada/google-chat",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/google-chat",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-chat",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "references/config-example.json",
      "scripts/send_oauth.py",
      "scripts/send_webhook.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "google-chat",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T04:43:19.005Z",
      "expiresAt": "2026-05-07T04:43:19.005Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-chat",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=google-chat",
        "contentDisposition": "attachment; filename=\"google-chat-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "google-chat"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/google-chat"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/google-chat",
    "downloadUrl": "https://openagent3.xyz/downloads/google-chat",
    "agentUrl": "https://openagent3.xyz/skills/google-chat/agent",
    "manifestUrl": "https://openagent3.xyz/skills/google-chat/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/google-chat/agent.md"
  }
}
```
## Documentation

### Google Chat Messaging

Send messages to Google Chat using two methods:

Webhooks - Fast, pre-configured channels (messages appear as a bot)
OAuth - Dynamic messaging to any space or user (requires authentication)

### Method 1: Webhooks (Recommended for Known Channels)

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 ✅"

### Method 2: OAuth (For Dynamic Messaging)

First-time setup:

Save OAuth credentials to a file (e.g., google-chat-oauth-credentials.json)
Run initial authentication (opens browser, saves token):

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"

### Dependencies

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 messages
https://www.googleapis.com/auth/chat.spaces - Access space information
https://www.googleapis.com/auth/chat.memberships.readonly - List space members (for DM identification)

### OAuth Setup Guide

If OAuth credentials don't exist yet:

Go to Google Cloud Console
Select your project or create one
Enable Google Chat API
Go to APIs & Services → Credentials
Create OAuth 2.0 Client ID (Desktop app type)
Download JSON and save as google-chat-oauth-credentials.json

The credentials JSON should look like:

{
  "installed": {
    "client_id": "...apps.googleusercontent.com",
    "client_secret": "GOCSPX-...",
    "redirect_uris": ["http://localhost"],
    ...
  }
}

### Webhook Setup Guide

To create a webhook for a Google Chat space:

Open Google Chat in browser
Go to the space
Click space name → Apps & integrations
Click Manage webhooks → Add webhook
Give it a name (e.g., "Agustin Networks")
Copy the webhook URL
Add to google-chat-config.json

### Choosing the Right Method

Use Webhooks when:

Sending to the same channels repeatedly
Messages should appear as a bot/service
Speed is important (no OAuth handshake)
Configuration is static

Use OAuth when:

Sending to different spaces dynamically
Messages should appear from your configured Google Chat App
Space names are determined at runtime
Need to list and discover available spaces

OAuth Limitations:

Cannot create new DMs by email address (Google Chat API restriction)
To send DMs, you need the space ID of an existing conversation
Use --list-spaces to find available DM space IDs

### Message Formatting

Both 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)

### Troubleshooting

Webhook errors:

Verify webhook URL is correct and active
Check space still exists and webhook wasn't deleted
Ensure message isn't empty

OAuth errors:

Run authentication flow again if token expired
Verify Google Chat API is enabled in Cloud Console
Check user has access to the target space
For DMs, ensure user email is correct and in same workspace

Permission errors:

Webhooks: Must be member of the space
OAuth: Must have access to target space or user
Corporate Workspace: Some features may be restricted by admin policies

### Examples

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"
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: darconada
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T04:43:19.005Z
- Expires at: 2026-05-07T04:43:19.005Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/google-chat)
- [Send to Agent page](https://openagent3.xyz/skills/google-chat/agent)
- [JSON manifest](https://openagent3.xyz/skills/google-chat/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/google-chat/agent.md)
- [Download page](https://openagent3.xyz/downloads/google-chat)