Microsoft Teams
Messages to a Microsoft Teams channel: the teams destination, from the teams package. Declare the package once in dependencies.yml; DRE installs it on demand:
plugins: - teamsProfile fields
Section titled “Profile fields”Set in profiles.yml, under destinations:, in a target with type: teams.
| Field | Default | Notes |
|---|---|---|
webhook_url (required) |
The Workflows webhook URL of the channel (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 Microsoft Teams channel through a Workflows webhook.
It takes messages only: a file output, or attach:, sent to it is an error in dre validate.
Deliver files to object storage and link them from the message with outputs.<name>.location.
Released as 1.0.0-rc.1.
The profile holds webhook_url, which is a credential: anyone with it can post to the channel.
Set it with env_var(). DRE never logs it or shows it in an error.
destinations: finance_teams: targets: prod: {type: teams, webhook_url: "{{ env_var('TEAMS_FINANCE_WEBHOOK') }}"}To create the webhook: in Teams, open the channel’s … menu > Workflows, choose Post
to a channel when a webhook request is received, pick the team and channel, and copy the URL
it shows. The message arrives as a card: the title in bold, then the text, with bold, italics,
links and bullets. Teams has no destination options. A message over 15,000 characters is cut
short with a note (the full text is in the run’s .md file and run_results.json), with a
warning. A post Teams rate-limits or answers 503 to is tried again (see Tries again).
Adapt a headline to Teams
Section titled “Adapt a headline to Teams”Start with the complete headline example. Add teams to its
dependencies, use the profile above, and replace the headline destination with
destination: {profile: finance_teams}. Add dev: {deliver: false} beside the prod profile
entry to keep local runs quiet. Run dre run <report> --preview 5 to inspect the message.
invalid-destination-option on attach means Teams takes messages only; remove attachments
and put a storage link in the text. delivery-failed after the workflow was removed needs a
new webhook URL set through the environment variable. A truncated message needs shorter text;
the warning is not a delivery failure. See messages,
destination keys, error codes
and message.