New to Kestra?
Use blueprints to kickstart your first workflows.
Reusable Kestra subflow that posts a consistently formatted Slack message for any calling pipeline, with a status prefix and the source flow name.
Centralize all of your Slack alerting in one reusable Kestra flow. Instead of copying an incoming-webhook task and payload formatting into every pipeline, you call this single subflow and pass three inputs: the message body, a status label, and the name of the calling flow. It posts a consistently formatted Slack notification, so when you want to change the message style you edit one place and every caller updates at once. This solves the classic problem of drifting, inconsistent alerts scattered across dozens of flows.
The flow exposes three inputs: message (the body text), status (a label such as success, warning, failure, or info, defaulting to info), and source_flow (an identifier of the calling flow, defaulting to unknown). A single task, post_message, of type io.kestra.plugin.slack.notifications.SlackIncomingWebhook, sends the alert. The webhook URL is read securely from {{ secret('SLACK_WEBHOOK_URL') }}, and the JSON payload renders a one-line message in the form [STATUS] source_flow: message, uppercasing the status with the | upper filter.
Slack incoming webhooks have no scheduler, no retry logic, and no awareness of your pipelines. Kestra wraps the webhook call in an orchestrated, declarative YAML flow that you can trigger on events, retry on transient failures, and track with full execution lineage. Because it is a subflow, callers stay simple while notification logic stays centralized and versioned. The webhook alone cannot react to pipeline state, fan out from other flows, or give you an auditable execution history; Kestra fills exactly that gap.
SLACK_WEBHOOK_URL: the Slack incoming webhook URL used to post messages.SLACK_WEBHOOK_URL secret in your Kestra namespace.io.kestra.plugin.core.flow.Subflow task calling slack-notify-subflow and pass message, status, and source_flow.payload template to match your team's Slack formatting standard, including Block Kit blocks for richer layouts.status values to emoji or color attachments for at-a-glance severity.SlackIncomingWebhook for a Slack app token task if you need threads, reactions, or file uploads.source_flow: "{{ flow.id }}" from callers for automatic traceability.