step
discord_webhook
Publish formatted event summaries to a Discord Incoming Webhook.
Overview
Publish formatted event summaries to a Discord Incoming Webhook. Message content can be static or built via template substitution. Optional embeds and event excerpts are appended before POSTing to the configured webhook URL. Failure handling mirrors the `slack_webhook` step.
Quick Start
steps:
- type: discord_webhook
webhook_url: https://discord.com/api/webhooks/123/abcConfiguration
| Parameter | Type | Required | Description |
|---|---|---|---|
webhook_url | string | Yes | Full Discord Incoming Webhook URL that receives the message payload. |
content | string | No | Static message body. Ignored when 'content_template' is supplied. |
content_template | string | No | Template with ${path.to.key} substitutions rendered against the current event to build the message content. |
username | string | No | Override for the display name Discord shows for this webhook message. |
avatar_url | string | No | Custom avatar image URL shown beside the message. |
embeds | string | No | Static list of embed objects to append to the payload. Values are passed through to Discord without additional validation. |
include_event | boolean | No | When True, append the event (or selected fields) formatted as a JSON code block beneath the message content.
Default: false |
event_fields | string | No | List of top-level event keys to include when 'include_event' is True. Omitting this sends the entire event. |
drop_on_failure | boolean | No | If True, return None on network errors or non-2xx responses instead of attaching error details to the event.
Default: false |
timeout | integer | No | Request timeout in seconds for the webhook POST (default 5).
Default: 5 |
output_to | string | No | Event key used to store success or error metadata returned by the step.
Default: "discord" |
inject | string | No | DEPRECATED: Use 'output_to' instead. Event key for storing result metadata. |
tts | boolean | No | Set to True to mark the message for Discord text-to-speech playback (only the 'content' field is spoken).
Default: false |
Examples
Simple text message
Send a basic text notification to Discord
type: discord_webhook
webhook_url: https://discord.com/api/webhooks/YOUR/WEBHOOK/URL
content: Server deployment completed successfully
Dynamic message with custom bot
Send a message with dynamic content and custom bot appearance
type: discord_webhook
webhook_url: ${env:discord_webhook}
content_template: "🎉 New user ${user.name} just signed up!"
username: Signup Bot
avatar_url: https://example.com/bot-avatar.png
Rich embed message
Send a formatted embed with title, description, and fields
type: discord_webhook
webhook_url: ${env:discord_webhook}
content: Alert notification
embeds:
- title: ${alert.title}
description: ${alert.description}
color: 15548997
fields:
- name: Severity
value: ${alert.severity}
inline: true
- name: Service
value: ${alert.service}
inline: true
timestamp: ${alert.timestamp}
Advanced Options
These options are available on all steps for error handling and retry logic:
| Parameter | Type | Default | Description |
|---|---|---|---|
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |