slack_webhook
Send formatted notifications to Slack via the Incoming Webhook API.
Overview
Send formatted notifications to Slack via the Incoming Webhook API.
Setup: 1. Go to your Slack workspace's app management (https://api.slack.com/apps) 2. Create a new app or select an existing one 3. Enable Incoming Webhooks in the Features section 4. Click "Add New Webhook to Workspace" and select a channel 5. Copy the webhook URL (format: https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXX) 6. Store your webhook URL securely (e.g., as an environment variable: SLACK_WEBHOOK_URL)
Webhook URL: Required. Get from https://api.slack.com/apps (Incoming Webhooks section)
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}"
Configuration
| 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. |
Base Configuration
These configuration options are available on all steps:
| Parameter | Type | Default | Description |
|---|---|---|---|
name | | null | Optional name for this step (for documentation and debugging) |
description | | null | Optional description of what this step does |
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. |