Source
id: create-linear-issue-on-failure
namespace: system
tasks:
- id: linear
type: io.kestra.plugin.linear.issues.Create
token: your_api_token
team: MyTeamName
title: Workflow failed
description: "{{ trigger.executionId }} has failed on {{ taskrun.startDate }}.
See the link below for more details"
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
About this blueprint
Notifications System
This system flow will create an issue in Linear anytime a workflow in a
company
namespace (or any nested child namespace) fails.
Using this pattern, you can track your Kestra workflow execution incidents alongside other issues in Linear.
You can customize that system flow by modifying the task, adding more tasks to the flow or adjusting the trigger conditions. Read more about that pattern in the Administrator Guide.
Let's create a flow in the namespace with prefix company
that will always
fail.
id: failure_flow
namespace: company.team
tasks:
- id: always_fails
type: io.kestra.plugin.core.execution.Fail
Whenever you run the failure_flow
flow, it will fail. This will result in
the triggering of the create_linear_issue_on_failure
flow, and it will
create the issue in Linear describing the failed flow by its execution ID
and start date.
More Related Blueprints