Create icon
Flow icon
ExecutionStatus icon
ExecutionNamespace icon

Create Linear Issues Automatically for Incident Management

Automatically create a Linear issue whenever a Kestra workflow fails or warns. A declarative incident management and monitoring blueprint for instance-wide pipeline reliability.

Categories
InfrastructureSystem

Turn every failed Kestra workflow into a tracked Linear issue automatically. This system blueprint wires Kestra's orchestration layer to Linear so that whenever an execution fails or finishes with a warning, a structured incident is created in your team's Linear workspace. It closes the gap between pipeline monitoring and incident management: instead of fishing through logs or waiting for someone to notice a broken job, your on-call and engineering teams get failures surfaced in the same tool they already use for product and bug tracking. This is a reusable, declarative pattern for operational monitoring, platform reliability, and incident response across an entire Kestra instance.

How it works

  1. A system-level io.kestra.plugin.core.trigger.Flow trigger watches executions across the instance instead of being tied to a single flow.
  2. Two conditions filter what counts as an incident: io.kestra.plugin.core.condition.ExecutionStatus fires only on FAILED and WARNING outcomes, and io.kestra.plugin.core.condition.ExecutionNamespace narrows scope to executions whose namespace starts with the configured PREFIX.
  3. When both conditions match, the linear task (io.kestra.plugin.linear.issues.Create) creates a new issue on the configured team, titled Workflow failed, with a description that interpolates {{ trigger.executionId }} and {{ taskrun.startDate }} for traceability.
  4. The issue is tagged with labels (Bug, Workflow) so it routes and filters cleanly inside Linear.

What you get

  • Zero-touch incident creation the moment a workflow fails or warns.
  • One Linear issue per failed execution, carrying the execution ID and failure timestamp.
  • Instance-wide coverage from a single flow, scoped by namespace prefix.
  • Workflow incidents centralized next to engineering and product work in Linear.

Who it's for

  • Platform and data engineers responsible for pipeline reliability.
  • On-call and SRE teams that triage incidents in Linear.
  • Engineering managers who want failure visibility without custom alerting glue.

Why orchestrate this with Kestra

Linear has no awareness of your data pipelines, and most schedulers stop at running a job, they cannot react to another workflow's outcome. Kestra's event-driven Flow trigger fills that gap: it reacts to execution status across every namespace, applies declarative conditions, and benefits from retries, full execution lineage, and version-controlled YAML. You get a single, auditable source of truth for what failed, when, and why it was escalated, all defined as code rather than scattered scripts.

Prerequisites

  • A Kestra instance (this is a system namespace flow).
  • A Linear account with API access and a team to receive issues.

Secrets

This blueprint uses the Linear API token from a secret ({{ secret('LINEAR_API_TOKEN') }}) and a team (MyTeamName) as inline placeholders. Replace them with your real Linear API token and team. For production, store the token as a Kestra secret and reference it with {{ secret('LINEAR_API_TOKEN') }} rather than hardcoding it in the flow.

Quick start

  1. Copy this blueprint into your Kestra instance.
  2. Set token to your Linear API token (ideally via a secret) and team to your target team.
  3. Update the ExecutionNamespace namespace prefix to match the workflows you want monitored.
  4. Save the flow, then run any flow in scope and let it fail to confirm an issue appears in Linear.

How to extend

  • Add more tasks after linear to post to Slack, send an email, or page on-call.
  • Enrich the issue description with the failed task ID, error message, or a direct execution URL.
  • Adjust labels or set issue priority and assignee per team conventions.
  • Broaden or split the trigger conditions to route different namespaces to different Linear teams.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.