Google Chat Messages
Send Google Chat messages via incoming webhooks, text, rich cards (cardsV2), threaded...
Install
npx skills add jezweb/claude-skills --skill google-chat-messages -g -a claude-code -y- Repository
- jezweb/claude-skills1.1k
- Category
- Engineering
- Updated
- 26d ago
- License
- MIT
- Context cost
- Mediumabout 2,342 tokens
- Runs scripts
- Yes, review before use
What it does
Send Google Chat messages via incoming webhooks, text, rich cards (cardsV2), threaded replies. TypeScript types, card builder utility, widget reference inline. Use whenever the user wants to post to Google Chat from a script, build a chatbot reply, send a notification card, build a Google Chat webhook integration, or troubleshoot card / threading issues.
Google Chat Messages
Send messages to Google Chat spaces via incoming webhooks. Produces text messages, rich cards (cardsV2), and threaded replies.
What You Produce
- Text messages with Google Chat formatting
- Rich card messages (cardsV2) with headers, sections, widgets
- Threaded conversations
- Reusable webhook sender utility
Workflow
Step 1: Get Webhook URL
In Google Chat:
- Open a Space > click space name > Manage webhooks
- Create webhook (name it, optionally add avatar URL)
- Copy the webhook URL
Store the URL as an environment variable or in your secrets manager, never hardcode.
Step 2: Choose Message Type
| Need | Type | Complexity |
|---|---|---|
| Simple notification | Text message | Low |
| Structured info (status, digest) | Card message (cardsV2) | Medium |
| Ongoing updates | Threaded replies | Medium |
| Action buttons (open URL) | Card with buttonList | Medium |
Step 3: Send the Message
Use assets/webhook-sender.ts for the sender utility. Use assets/card-builder.ts for structured card construction.
Text Formatting
Google Chat does NOT use standard Markdown.
| Format | Syntax | Example |
|---|---|---|
| Bold | *text* | *important* |
| Italic | _text_ | _emphasis_ |
| Strikethrough | ~text~ | ~removed~ |
| Monospace | `text` | `code` |
| Code block | ```text``` | Multi-line code |
| Link | <url|text> | <https://example.com|Click here> |
| Mention user | <users/USER_ID> | <users/123456> |
| Mention all | <users/all> | <users/all> |
Not supported: **double asterisks**, headings (###), blockquotes, tables, images inline.
Text Message Example
await sendText(webhookUrl, '*Build Complete*\n\nBranch: `main`\nStatus: Passed\n<https://ci.example.com/123|View Build>');
cardsV2 Structure
Cards use the cardsV2 format (recommended over legacy cards).
