Skip to content
You're reading the docs for DRE 0.4 (v0.4.4). This page for 0.5 · New in 0.5

Google Chat

Messages to a Google Chat space: the google_chat destination, from the google_chat package. Declare the package once in dependencies.yml; DRE installs it on demand:

dependencies.yml
plugins:
- google_chat

Set in profiles.yml, under destinations:, in a target with type: google_chat.

Field Default Notes
webhook_url (required) The space’s webhook URL (keep it secret) Secret: use env_var().
connect_timeout 30s How long to wait for a connection (30s, 2m, or seconds) A duration (30s, 2m) or seconds.
timeout 60s How long a read or write may make no progress before it fails. A duration (30s, 2m) or seconds.
retries 3 How many times to try again after a temporary error (0: never)

Posts messages to a Google Chat space through its incoming webhook. Like teams, it takes messages only. Released as 1.0.0-rc.1.

The profile holds webhook_url (it contains the space’s key and token), best set with env_var(); it’s never logged.

destinations:
ops_chat:
targets:
prod: {type: google_chat, webhook_url: "{{ env_var('GCHAT_OPS_WEBHOOK') }}"}

To create the webhook: in Google Chat, open the space, then Apps & integrations > Webhooks

Add webhook, name it, and copy the URL (Google Workspace accounts only; an administrator may need to allow webhooks). The message is the title in bold, then the text in Chat’s formatting. Over 4,000 characters it’s cut short with a note and a warning. A rate-limited post is tried again (see Tries again).

Every destination streams the file from target/run/. If an upload fails, the output stays there and the run reports which Binding failed.

Use the complete headline example as the starting project. Declare google_chat, use ops_chat from the profile above, and set the message output’s destination: {profile: ops_chat}. Add a dev: {deliver: false} target to the profile, preview the rendered message locally, then validate prod before sending.

A file output or attach cannot be sent to this message-only destination; use a storage link in the message instead. invalid-destination-option identifies the unsupported option. delivery-failed with an invalid webhook needs the space’s current webhook in the environment variable. If messages exceed 4,000 characters, shorten the text so recipients can see it all. See messages, destination keys, error codes and message.