New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically post a Discord message whenever a Kestra workflow execution fails or warns. One central system flow watches every execution, no per-flow setup.
id: failure-alert-discord
namespace: system
tasks:
- id: send_alert
type: io.kestra.plugin.discord.DiscordExecution
url: "{{ secret('DISCORD_WEBHOOK') }}"
executionId: "{{ trigger.executionId }}"
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED
- WARNING
Catch every failed or degraded workflow run the moment it happens by posting a notification to a Discord channel. This Kestra system flow centralizes failure alerting across your entire instance: instead of wiring notifications into each individual workflow, you define the alerting logic once and it watches every execution. When any flow ends in a FAILED or WARNING state, your team sees it in Discord, with a direct link back to the failing execution for fast triage and incident response.
io.kestra.plugin.core.trigger.Flow trigger listens to executions across the instance. It uses an io.kestra.plugin.core.condition.ExecutionStatus condition that matches when the status is in FAILED or WARNING.send_alert task of type io.kestra.plugin.discord.DiscordExecution posts a message to your Discord channel through an incoming webhook (url).{{ trigger.executionId }} so the alert is tied to the exact execution that failed, giving your team a clickable path straight to the run that broke.executionId) delivered with every alert.Discord webhooks alone have no awareness of your pipelines: they only post what you send them. Kestra supplies the missing piece. The event-driven Flow trigger reacts to execution state changes across the whole instance with no polling, so a single declarative YAML flow replaces alert code copied into every workflow. You get retries on the notification task, full execution lineage linking the alert back to the failing run, and centralized governance of who gets alerted and when. That is orchestration logic Discord's own tooling cannot provide.
DISCORD_WEBHOOK: the Discord incoming webhook URL the send_alert task posts to.DISCORD_WEBHOOK secret in Kestra.system namespace (or your configured system namespace).ExecutionNamespaceCondition to the trigger.