Skip to main content

Slack Webhook

Slack is a messaging app for business that connects people to the information they need. The capabilities of a Slack workspace can be expanded by installing applications that connect data and functionality from external platforms. An application can post messages to a workspace channel using incoming webhooks.

This example demonstrates posting messages to a Slack channel directly from a pipeline. Users can create and install their own Slack application, then utilize an incoming webhook URL with the Webhook data destination to allow messages to flow from devices to a channel in their workspace.

note

Data must be JSON and must include a text field with the content of the message. See the Slack documentation for more advanced message formatting options and consider using a transformer to augment your message payload prior to delivery.

Reminder

Make sure to create a secret named SLACK_WEBHOOK with a valid incoming webhook URL for your Slack application.

filter:
path: "*"
content_type: application/json
steps:
- name: step0
destination:
type: webhook
version: v1
parameters:
url: $SLACK_WEBHOOK