New to Kestra?
Use blueprints to kickstart your first workflows.
Send a Twilio notification when any Kestra workflow fails or warns. A namespace-wide system flow for on-call escalation and pipeline monitoring.
id: failure-alert-twilio
namespace: company.team
tasks:
- id: send_twilio_notification
type: io.kestra.plugin.twilio.notify.TwilioExecution
url: "{{ secret('TWILIO_ALERT_URL') }}"
identity: "0000001"
executionId: "{{ trigger.executionId }}"
accountSID: "{{ secret('TWILIO_ACCOUNT_SID') }}"
authToken: "{{ secret('TWILIO_AUTH_TOKEN') }}"
body: "Kestra Workflow Failure: {{ trigger.executionId }} has failed on {{
taskrun.startDate }}"
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
Get a Twilio notification the instant any workflow in your namespace fails. This system flow watches every execution under a namespace prefix and fires a Twilio message on FAILED or WARNING status, so on-call engineers learn about broken pipelines from their phone instead of from a downstream stakeholder. It solves the classic monitoring gap: failures that happen overnight, on weekends, or in pipelines nobody is actively watching go unnoticed until the damage spreads.
io.kestra.plugin.core.trigger.Flow trigger listens to executions across all flows in the instance.io.kestra.plugin.core.condition.ExecutionStatus matches FAILED and WARNING, and io.kestra.plugin.core.condition.ExecutionNamespace matches the company prefix so every nested child namespace is covered.send_twilio_notification task of type io.kestra.plugin.twilio.notify.TwilioExecution sends the alert.body includes the failed {{ trigger.executionId }} and the {{ taskrun.startDate }}, and authentication is read from secrets via accountSID, authToken, and the notification url.executionId for fast triage.A tool like Twilio sends messages but has no idea what your pipelines are doing. Kestra's event-driven Flow trigger reacts to execution state across your whole platform, applies declarative status and namespace conditions in plain YAML, and adds retries, full execution lineage, and a searchable audit trail. A standalone scheduler or cron job cannot observe other workflows' outcomes and fan out alerts on failure: that cross-flow, status-aware reactivity is exactly the gap Kestra fills.
TWILIO_ALERT_URL: the Twilio notification URL.TWILIO_ACCOUNT_SID: your Twilio account SID.TWILIO_AUTH_TOKEN: your Twilio auth token.ExecutionNamespace prefix to match your own namespace.io.kestra.plugin.core.execution.Fail task) and confirm the alert arrives.ExecutionStatus values or a label condition to narrow what triggers alerts.body with the flow id, namespace, or a direct execution link.