Create icon
Flow icon
ExecutionStatus icon
ExecutionNamespace icon

Create a ticket in Zendesk when a workflow fails

Turn Kestra workflow failures into Zendesk incident tickets automatically. A system flow that watches your namespace and files a ticket on every failed run.

Categories
CoreInfrastructure

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.

How it works

A io.kestra.plugin.core.trigger.Flow trigger listens for executions across your environment and fires only when two conditions match: an io.kestra.plugin.core.condition.ExecutionStatus condition limited to FAILED and WARNING states, and an io.kestra.plugin.core.condition.ExecutionNamespace condition scoped with comparison: PREFIX 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.

What you get

  • A Zendesk incident ticket created automatically on every failed or warning execution
  • Coverage of an entire namespace tree from one flow, no per-pipeline wiring
  • Tickets pre-tagged and pre-assigned so triage starts immediately
  • Execution ID and start time embedded in each ticket for fast root-cause tracing
  • Failure tracking that lives alongside your existing customer and support tickets

Who it's for

  • Platform and data engineers who own many flows and need a single failure net
  • On-call and support teams that already triage in Zendesk
  • Operations leads who want incidents tracked, assigned, and auditable

Why orchestrate this with Kestra

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.

Prerequisites

  • A Kestra instance with the Zendesk plugin available
  • A Zendesk account and subdomain (domain)
  • A valid Zendesk OAuth token and an assigneeId for the agent or group to own tickets

Secrets

This 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.

Quick start

  1. Add this flow to a company-prefixed namespace (or change the namespace condition to match yours).
  2. Set domain to your Zendesk subdomain and supply a real oauthToken and assigneeId.
  3. Save the flow so the on_failure trigger becomes active.
  4. Run any workflow under the watched namespace and let it fail to confirm a ticket appears in Zendesk.

How to extend

  • Adjust the ExecutionStatus condition to ticket only on FAILED and skip WARNING.
  • Map flow severity to Zendesk priority and ticketType for sharper triage.
  • Add a Slack or email notification task alongside the ticket for real-time alerts.
  • Enrich the description with the failed task name, namespace, and a deep link to the execution.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.