New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Kestra flow whenever another execution hits a given status and send a Slack alert. Build status-driven failure monitoring across all your flows.
id: flow-condition-executionstatus
namespace: company.team
triggers:
- id: flow
type: io.kestra.plugin.core.trigger.Flow
dependsOn:
- states:
- FAILED
tasks:
- id: send_slack_message
type: io.kestra.plugin.slack.notifications.SlackExecution
url: "{{ secret('SLACK_WEBHOOK') }}"
executionId: "{{ trigger.executionId }}"
payload: "The workflow execution {{ trigger.executionId }} failed for the flow
{{ trigger.flowId }} in the namespace {{ trigger.namespace }}"
Catch failures across every flow in your instance and react to them automatically. This blueprint uses a Kestra Flow trigger gated by a dependsOn states filter so that whenever any other execution reaches the FAILED state, this flow fires and posts a contextual Slack alert with the failing execution, flow, and namespace. It turns scattered, easy-to-miss failures into a single, status-driven notification pipeline without bolting monitoring logic onto every workflow.
flow trigger of type io.kestra.plugin.core.trigger.Flow listens to executions produced by other flows in the instance.dependsOn entry sets states: [FAILED], so only failed executions pass through.send_slack_message task of type io.kestra.plugin.slack.notifications.SlackExecution posts a message to the Slack webhook URL.{{ trigger.executionId }}, {{ trigger.flowId }}, and {{ trigger.namespace }} so the alert names exactly which execution failed and where.FAILED.The dependsOn states filter lets you react to the lifecycle of other executions declaratively, something a tool's own scheduler cannot do because it has no awareness of cross-flow outcomes. Kestra evaluates the event in real time as executions complete, so there is no polling. You keep retries, full execution lineage, and a single declarative YAML definition, and the trigger scales to every flow in the instance instead of one cron job per workflow.
SLACK_WEBHOOK: the Slack incoming webhook URL used by the notification task.SLACK_WEBHOOK as a secret in your Kestra instance.states list, such as WARNING or SUCCESS, to broaden coverage.when expression, or flowId/namespace fields, to the dependsOn entry.