Source
id: create-zendesk-ticket-on-failure
namespace: company.team
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
triggers:
- id: on_failure
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatusCondition
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespaceCondition
namespace: company
comparison: PREFIX
About this blueprint
System Notifications
This system flow will create a ticket in Zendesk 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 tickets in Zendesk.
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.
tasks:
- id: always_fails
type: io.kestra.plugin.core.execution.Fail
Whenever you run the failure_flow
, it will trigger an execution of the create_zendesk_ticket_on_failure
flow. As a result, a new ticket will be created in Zendesk helping you track failed workflows interacting with customer data alongside other customer tickets.
More Related Blueprints