New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically create a GitHub issue when a Kestra workflow fails. Capture the execution ID and timestamp, apply labels, and track incidents in GitHub.
id: create-github-issue-on-failure
namespace: company.team
tasks:
- id: create_issue
type: io.kestra.plugin.github.issues.Create
jwtToken: "{{ secret('GITHUB_TOKEN') }}"
repository: kestra-io/kestra
title: Kestra Workflow Failure
body: "{{ trigger.executionId }} has failed on {{ taskrun.startDate }}"
labels:
- bug
- workflow
triggers:
- id: on_failure
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
comparison: PREFIX
Turn silent pipeline failures into tracked, actionable work. This blueprint watches every execution in your namespace and, the moment one ends in FAILED or WARNING, automatically opens a GitHub issue with the failing execution ID, the failure timestamp, and triage labels. Instead of relying on someone noticing a red run, your orchestration failures land directly in the same GitHub backlog your engineers already work from, with a clean audit trail of when each incident occurred.
on_failure trigger of type io.kestra.plugin.core.trigger.Flow listens to executions across your instance.io.kestra.plugin.core.condition.ExecutionStatus condition limits it to runs ending in FAILED or WARNING.io.kestra.plugin.core.condition.ExecutionNamespace condition with comparison: PREFIX scopes the automation to executions whose namespace starts with company.create_issue task (io.kestra.plugin.github.issues.Create) authenticates with jwtToken and opens an issue in the target repository.body is templated as {{ trigger.executionId }} has failed on {{ taskrun.startDate }}, and labels (bug, workflow) are applied for routing and triage.bug, workflow) for filtering and assignment.GitHub Issues has no native awareness of your pipeline runs. Kestra's event-driven Flow trigger fires the instant an execution fails anywhere in your namespace, with no polling and no cron job to babysit. You get declarative YAML conditions, built-in retries on the issue-creation API call, and full execution lineage linking the original failure to the ticket it produced. The underlying GitHub scheduler cannot react to orchestration events, Kestra closes that gap by translating run outcomes into issues in real time.
kestra-io/kestra).GITHUB_TOKEN: GitHub personal access token (or app JWT) used for jwtToken.GITHUB_TOKEN secret to your Kestra instance.repository to the repo where incidents should be filed.ExecutionNamespace condition to match your namespace prefix.To test, create a flow that always fails:
id: failure_flow
namespace: company.team
tasks:
- id: always_fails
type: io.kestra.plugin.core.execution.Fail
body with the failed task ID, error message, or a link back to the execution.ExecutionStatus condition (for example, alert only on FAILED).create_issue for escalation.