google-chat-messages

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 webh

By jezweb · 1,181 installs

npx skills add jezweb/claude-skills --skill google-chat-messages

Source repository · Upstream listing

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: 1. Open a Space click space name Manage webhooks 2. Create webhook (name it, optionally add avatar URL) 3. 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 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 cardsV2 Structure Cards use the cardsV2 format (recommended over legacy cards). Widget Reference All widget types available in cardsV2 sections. textParagraph Formatted text block. Supports Google Chat formatting ( bold , italic , <url text ). decoratedText Labelled value with optional icons. Most versatile widget for key value data. Basic: With start icon: With custom icon URL: With button: Clickable (whole widget): With wrap text: buttonList One or more action buttons. Buttons open URLs or trigger actions. Single button: Multiple buttons: Button with icon: image Standalone image widget. divider Horizontal line separator between widgets. Collapsible Sections Sections can be collapsed with only the first N widgets visible: Known Icons Icons available via knownIcon in decoratedText and button widgets. Icon Name Use For AIRPLANE Travel, flights BOOKMARK Save, reference, links BUS Transport, transit CAR Driving, transport CLOCK Time, duration, schedule CONFIRMATION NUMBER ICON Tickets, bookings DESCRIPTION Documents, files DOLLAR Money, pricing, cost EMAIL Email, messages INVITE Invitations MAP PIN Location, address MEMBERSHIP Members, users MULTIPLE PEOPLE Teams, groups OFFER Deals, promotions PERSON Individual user PHONE Phone number, calls SHOPPING CART Commerce, purchases STAR Rating, favourite, important STORE Shop, retail TICKET Tickets, events VIDEO CAMERA Video, meetings For icons not in the list, use iconUrl with any publicly accessible image (square, ideally 24x24 or 48x48 pixels). Threading Thread messages together using threadKey : The threadKey is a client assigned string. Use consistent keys for related messages (e.g., deploy {date} , alert {id} ). Common Patterns Notification Card Digest Card (Weekly Summary) Error Prevention Mistake Fix bold in text Use bold (single asterisks) [text](url) links Use <url\ text format Missing cardsV2 wrapper Wrap card in { cardsV2: [{ cardId, card }] } Thread replies not threading Append &messageReplyOption=REPLY MESSAGE FALLBACK TO NEW THREAD to webhook URL Webhook returns 400 Check JSON structure — common issue is missing text or cardsV2 at top level Card not showing Ensure sections has at least one widget Asset Files File Purpose assets/types.ts TypeScript type definitions for cardsV2 assets/card builder.ts Utility to build card messages assets/webhook sender.ts POST to webhook with error handling