step
slack_webhook
Send formatted notifications to Slack via the Incoming Webhook API.
Overview
Send formatted notifications to Slack via the Incoming Webhook API.
Quick Start
steps:
- type: slack_webhook
webhook_url: https://hooks.slack.com/services/T000/B000/XXXXConfiguration
| Parameter | Type | Required | Description |
|---|---|---|---|
webhook_url | string | Yes | Slack Incoming Webhook URL that receives the formatted payload. |
text | string | No | Static message text. Ignored when 'text_template' is provided. |
text_template | string | No | Template with ${path.to.key} substitutions rendered against the event to build the message text. |
include_event | boolean | No | When True, append the event (or selected fields) as a formatted code block attachment.
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. |
extra | string | No | Additional payload fragments (for example blocks or attachments) merged into the request JSON without validation. |
drop_on_failure | boolean | No | If True, return None on network errors or non-2xx responses instead of injecting error details.
Default: false |
timeout | integer | No | Timeout in seconds for the webhook POST (default 5).
Default: 5 |
output_to | string | No | Event key used to store success or error metadata emitted by the step.
Default: "slack" |
inject | string | No | DEPRECATED: Use 'output_to' instead. Event key for storing result metadata. |
Examples
Simple text message
Send a basic text notification to Slack
type: slack_webhook
webhook_url: https://hooks.slack.com/services/YOUR/WEBHOOK/URL
text: Deployment completed successfully
Dynamic message with template
Send a message with dynamic content from the event
type: slack_webhook
webhook_url: ${env:slack_webhook}
text_template: "New user signup: ${user.email} from ${user.country}"
Rich message with blocks
Send a formatted message with Slack blocks
type: slack_webhook
webhook_url: ${env:slack_webhook}
text_template: "Alert: ${alert.severity} - ${alert.message}"
extra:
blocks:
- type: section
text:
type: mrkdwn
text: "*Alert Details*\n${alert.message}"
- type: section
fields:
- type: mrkdwn
text: "*Severity:*\n${alert.severity}"
- type: mrkdwn
text: "*Service:*\n${alert.service}"
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. |