New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Zenduty incident automatically when any Kestra flow in the company namespace fails or warns. Event-driven on-call paging, no polling.
id: zenduty-failure-alert
namespace: system
tasks:
- id: send_alert
type: io.kestra.plugin.zenduty.ZendutyExecution
url: https://www.zenduty.com/api/events/{{ secret('ZENDUTY_INTEGRATION_KEY') }}/
executionId: "{{ trigger.executionId }}"
message: Kestra workflow execution {{ trigger.executionId }} of a flow {{
trigger.flowId }} in the namespace {{ trigger.namespace }} changed status
to {{ trigger.state }}
triggers:
- id: failed_prod_workflows
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespace
namespace: company
prefix: true
Route Kestra workflow failures straight into Zenduty so the right on-call engineer gets paged in seconds. This blueprint listens across every flow in the company namespace and, whenever an execution lands in FAILED or WARNING, fires a Zenduty event API call with the failing execution, flow, namespace, and state baked into the alert message. Centralize incident response for data pipelines, ETL jobs, infrastructure automations, and business workflows without writing custom webhooks or duplicating alerting logic in every flow.
A io.kestra.plugin.core.trigger.Flow trigger watches all executions in the Kestra instance and applies two conditions: io.kestra.plugin.core.condition.ExecutionStatus matching FAILED or WARNING, and io.kestra.plugin.core.condition.ExecutionNamespace with namespace: company and prefix: true, so it covers every sub-namespace under company. When the conditions match, the send_alert task uses io.kestra.plugin.zenduty.ZendutyExecution to POST to the Zenduty events API at https://www.zenduty.com/api/events/{integration-key}/, with the integration key pulled from {{ secret('ZENDUTY_INTEGRATION_KEY') }}. The alert message includes the triggering executionId, flowId, namespace, and final state from the upstream execution.
Kestra's Flow trigger is event-driven, so alerts fire the instant an execution ends, with no polling and no cron lag. Conditions let you scope alerts by namespace, status, labels, or custom expressions without touching the alerted flows. Every alert execution is itself a first-class Kestra run with logs, retries, and lineage, so you can audit which incidents were paged and when. Declarative YAML keeps the alerting policy in source control next to the flows it protects. Zenduty has no native way to subscribe to arbitrary workflow events; Kestra bridges that gap by turning execution lifecycle signals into Zenduty events.
company namespace (or rename the condition)ZENDUTY_INTEGRATION_KEY: the integration key from your Zenduty API integrationZENDUTY_INTEGRATION_KEY as a Kestra Secret in your environment.company.* to confirm an incident appears in Zenduty.alertType on ZendutyExecution to critical, error, warning, or info based on the state.io.kestra.plugin.core.condition.ExecutionLabels (for example, tier: production).io.kestra.plugin.notifications.slack.SlackIncomingWebhook or io.kestra.plugin.notifications.mail.MailSend tasks.