New to Kestra?
Use blueprints to kickstart your first workflows.
Turn Kestra workflow failures into Zendesk incident tickets automatically. A system flow that watches your namespace and files a ticket on every failed run.
id: create-zendesk-ticket-on-failure
namespace: company.team
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
dependsOn:
- when: "{{ trigger.namespace startsWith 'company' }}"
states:
- FAILED
- WARNING
tasks:
- id: create_zendesk_ticket
type: io.kestra.plugin.zendesk.tickets.Create
domain: mycompany.zendesk.com
oauthToken: zendesk_oauth_token
subject: Workflow failed
description: "{{ trigger.executionId }} has failed on {{ taskrun.startDate }}."
priority: NORMAL
ticketType: INCIDENT
assigneeId: 1
tags:
- bug
- workflow
Failed workflows are easy to miss when alerts get buried in chat or email. This system flow turns every Kestra execution failure into a tracked Zendesk incident ticket, giving your team a durable, assignable, searchable record of each broken run. It watches an entire namespace tree, so one flow covers all of your pipelines without touching their code, and it routes incidents into the same support tooling where the rest of your operational work already lives.
A io.kestra.plugin.core.trigger.Flow trigger listens for executions across your environment and fires only when its dependsOn entry matches: states: [FAILED, WARNING] limits it to those states, and a when: "{{ trigger.namespace startsWith 'company' }}" expression scopes it so it catches the target namespace and every nested child namespace below it.
When the trigger fires, the single create_zendesk_ticket task of type io.kestra.plugin.zendesk.tickets.Create opens a ticket in your Zendesk domain. It sets priority: NORMAL, ticketType: INCIDENT, an assigneeId, and tags of bug and workflow. The subject and description pull live context from the failed run, including {{ trigger.executionId }} and {{ taskrun.startDate }}, so every ticket points back at the exact execution that failed.
Zendesk has no awareness of your pipeline runs, and your individual workflows have no shared, declarative way to escalate their own failures into a ticketing system. Kestra closes that gap. The event-driven Flow trigger reacts to execution status across namespaces the moment a run fails, with no polling and no scheduler of its own to maintain. Because the logic is declarative YAML in one system flow, you avoid copying error handling into every pipeline, you get retries and full execution lineage for the ticket-creation step itself, and you can version and review the escalation policy like any other code.
domain)assigneeId for the agent or group to own ticketsThis blueprint does not reference any {{ secret('NAME') }} values: the oauthToken is passed inline as a placeholder. For production, replace the inline oauthToken with {{ secret('ZENDESK_OAUTH_TOKEN') }} and store the credential in your secret backend rather than committing it to the flow.
company-prefixed namespace (or change the when expression's namespace prefix to match yours).domain to your Zendesk subdomain and supply a real oauthToken and assigneeId.on_failure trigger becomes active.dependsOn states list to ticket only on FAILED and skip WARNING.priority and ticketType for sharper triage.description with the failed task name, namespace, and a deep link to the execution.