New to Kestra?
Use blueprints to kickstart your first workflows.
Automatically create a high-priority HubSpot ticket whenever a Kestra workflow fails or warns, enriched with the execution ID and failure timestamp for fast triage.
id: create-hubspot-ticket-on-failure
namespace: system
tasks:
- id: create_ticket
type: io.kestra.plugin.hubspot.tickets.Create
apiKey: "{{ secret('HUBSPOT_API_KEY') }}"
subject: Workflow failed
content: "{{ trigger.executionId }} has failed on {{ taskrun.startDate }}"
stage: 3
priority: HIGH
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 workflow failures into tracked support tickets automatically. This system blueprint watches every execution across your Kestra instance and, the moment a flow fails or finishes with a warning, opens a high-priority HubSpot ticket enriched with the failing execution ID and timestamp. Instead of failures hiding in logs, they land in HubSpot alongside your other support tickets so customer support, operations, and platform teams get immediate visibility into incidents that touch customer data or business-critical processes.
on_failure trigger of type io.kestra.plugin.core.trigger.Flow listens to executions across the instance.io.kestra.plugin.core.condition.ExecutionStatus condition filters for executions in the FAILED or WARNING state.io.kestra.plugin.core.condition.ExecutionNamespace condition (comparison: PREFIX) limits the trigger to flows whose namespace starts with company, so only the relevant teams generate tickets.create_ticket task of type io.kestra.plugin.hubspot.tickets.Create opens a ticket with subject: Workflow failed, content carrying {{ trigger.executionId }} and {{ taskrun.startDate }}, stage: 3, and priority: HIGH.HubSpot has no awareness of your data pipelines, and your scheduler cannot file a support ticket. Kestra bridges the gap with an event-driven Flow trigger that reacts to the outcome of any execution in real time, no polling required. Declarative YAML keeps the whole incident rule in one readable file, conditions scope it precisely, and built-in retries and execution lineage give you a reliable, auditable trail of which run produced which ticket.
This blueprint reads the HubSpot credential from a Kestra secret (apiKey: {{ secret('HUBSPOT_API_KEY') }}). Create that secret in your backend with a HubSpot private-app token that has ticket write scope.
system namespace (or your equivalent) on your Kestra instance.apiKey to your token, ideally via a secret.ExecutionNamespace prefix from company to the namespace your team uses.stage and priority to match your HubSpot ticket pipeline.content with more context such as the flow ID, namespace, or a link to the execution.ExecutionStatus conditions.