Skip to main content

Google Chat

Google Chat is a destination in Dispatch — events are delivered to a Google Chat space via an incoming webhook URL.

note

Google Chat is not a webhook source. You cannot receive webhooks from Google Chat into Dispatch. It is only used as a delivery target.

Connecting a Google Chat Destination

Google Chat uses incoming webhook URLs — no OAuth or bot account is required.

  1. Open the Google Chat space you want to deliver to
  2. Click the space name at the top → Apps & integrationsWebhooks
  3. Click Add webhook
  4. Enter a name (e.g. Dispatch) and optionally an avatar URL — this is the sender name that appears in Google Chat
  5. Click Save and copy the webhook URL
  6. In the Dispatch dashboard, go to DestinationsAdd DestinationWebhook URL tab
  7. Select Google Chat as the provider, paste the webhook URL, and give the destination a name
  8. Click Add Destination

Message Formatting

By default, Dispatch auto-converts the embed format into a Google Chat text message. For full control, use a template with a Google Chat platform variant.

Auto-Converted Format

When no template is assigned, Dispatch converts the embed fields into Google Chat markdown:

  • Title becomes *bold* text (with a link if a URL is set)
  • Author is prepended as _italic_
  • Description is included as-is
  • Fields are formatted as *name:* value pairs
  • Footer is appended as _italic_

Native Text Mode

Use a v2 multi-platform template with a googlechat platform variant for full control over the message text:

{
"version": 2,
"platforms": {
"googlechat": {
"google_chat_text": "*{{ .Payload.action }}* on `{{ .Payload.repository.full_name }}`\n\nPushed by *{{ .Payload.sender.login }}*"
}
}
}

The template is a Go template rendered as Google Chat markdown. You can mix Go template actions ({{ }}) with Google Chat markdown syntax directly.

Supported markdown:

SyntaxResult
*text*Bold
_text_Italic
~text~Strikethrough
`text`Inline monospace
``` block ```Monospace block
<url|label>Hyperlink

Template helper functions:

FunctionUsageOutput
gcBold{{ .Payload.x | gcBold }}*value*
gcItalic{{ .Payload.x | gcItalic }}_value_
gcStrike{{ .Payload.x | gcStrike }}~value~
gcMono{{ .Payload.x | gcMono }}`value`
gcLink{{ gcLink .Payload.url .Payload.title }}<url|title>

Sender Display Name

The sender name and avatar shown in Google Chat are set when you create the webhook — not via the message payload. To change the display name, edit the webhook in the space's Apps & integrations settings.

Rate Limiting

If Google Chat returns a 429 response, Dispatch automatically reschedules the delivery rather than counting it as a failure.