New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Zenduty incident from Kestra the moment a flow fails. Declarative errors block, Zenduty API integration, no glue code, no missed pages.
Turn every Kestra flow failure into a Zenduty incident automatically. This blueprint demonstrates the errors block pattern: a deliberately failing shell task triggers a io.kestra.plugin.zenduty.ZendutyAlert task that posts a fully structured event to the Zenduty Events API, complete with severity, summary, entity id, and a deep link back to the alert. It is the canonical example of attaching on-call alerting to any orchestrated pipeline without writing custom HTTP clients, retry loops, or shell wrappers around curl.
fail task uses io.kestra.plugin.scripts.shell.Commands and runs exit 1 to simulate a real production failure.errors block.alert_on_failure error handler calls io.kestra.plugin.zenduty.ZendutyAlert, sending a JSON payload to https://www.zenduty.com/api/events/{{ secret('ZENDUTY_INTEGRATION_KEY') }}/.alert_type, message, summary, entity_id, a nested payload with status, severity, and project, and a urls array that surfaces a clickable link inside the Zenduty incident.message, summary) and optional fields (alert_type, entity_id, custom payload) shown side by side.Zenduty integrations are great at managing incidents, but they do not know when your pipelines run, why they fail, or how to attach the right runtime context. Kestra fills that gap. The errors block runs only on failure, has access to every Pebble expression ({{ flow.id }}, {{ execution.id }}, {{ taskrun.id }}), and can be reused across hundreds of flows through subflows or pluginDefaults. You get event triggered alerts, automatic retries before paging, full execution lineage in the UI, and a single declarative YAML file that doubles as documentation for your on-call playbook.
ZENDUTY_INTEGRATION_KEY: the integration key from your Zenduty API integration URL.ZENDUTY_INTEGRATION_KEY.fail task will exit with status 1.fail task with your real workload (Python, SQL, dbt, Airbyte, Terraform, anything).alert_type to critical for production and keep info for staging by templating it from a label.{{ flow.id }}, {{ execution.id }}, and a deep link to the execution in the Kestra UI.errors block into a reusable subflow and call it from every production flow via io.kestra.plugin.core.flow.Subflow.