# Google Chat | DRE

> The google_chat destination: space webhooks.

You're reading the docs for DRE 0.4 (v0.4.4). [This page for 0.5](https://getdre.com/docs/plugin-google_chat/) · [New in 0.5](https://getdre.com/docs/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

```yaml
plugins:
  - google_chat
```

### Profile fields

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)

## Notes

Posts [messages](https://getdre.com/docs/v0.4/plugins/#the-message-format) 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.

```yaml
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](https://getdre.com/docs/v0.4/plugins/#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.

## Adapt a headline to Google Chat

Use the complete [headline example](https://github.com/get-dre/dre/blob/v0.4.4/examples/slack-headline/) 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](https://getdre.com/docs/v0.4/messages/), [destination keys](https://getdre.com/docs/v0.4/reference-report/#outputdestination), [error codes](https://getdre.com/docs/v0.4/reference-error-codes/) and [message](https://getdre.com/docs/v0.4/glossary/#message).

[Previous  
Google Cloud Storage](https://getdre.com/docs/v0.4/plugin-gcs/)[Next  
Parquet](https://getdre.com/docs/v0.4/plugin-parquet/)
