New to Kestra?
Use blueprints to kickstart your first workflows.
Send Telegram notifications when any Kestra workflow in your namespace fails or warns. Centralized failure alerting for production data pipelines.
id: telegram-notify-on-failure
namespace: company.team
tasks:
- id: send_notification
type: io.kestra.plugin.telegram.TelegramExecution
token: "{{ secret('TELEGRAM_TOKEN') }}"
channel: "2072728690"
payload: "Kestra Workflow Failure: {{ trigger.executionId }} has failed on {{
taskrun.startDate }}"
executionId: "{{ trigger.executionId }}"
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
Catch every Kestra workflow failure with an instant Telegram alert. This system flow listens for FAILED and WARNING executions across the company namespace and all of its nested child namespaces, then pushes a message to a Telegram channel so on-call engineers can react before stakeholders notice. It is the simplest way to centralize pipeline incident alerting without instrumenting each individual flow with notification tasks.
io.kestra.plugin.core.trigger.Flow trigger named on_failure listens to every execution in the instance.io.kestra.plugin.core.condition.ExecutionStatus keeps only FAILED and WARNING outcomes, and io.kestra.plugin.core.condition.ExecutionNamespace with comparison: PREFIX restricts to the company namespace and its children.send_notification task of type io.kestra.plugin.telegram.TelegramExecution posts a message to the configured channel, including the failed executionId and the taskrun.startDate.Telegram has no native concept of pipeline executions, namespaces, or retries. Kestra provides the event source: a Flow trigger evaluates every execution in the instance, applies declarative conditions, and fires the notifier without polling. You get retries on transient Telegram API errors, full lineage on which execution caused the alert, declarative YAML stored in Git, and a single system flow that scales to thousands of monitored workflows. No cron, no glue scripts, no per-flow boilerplate.
company (adjust the prefix to match your tenancy).TELEGRAM_TOKEN: the Telegram Bot API token used by the TelegramExecution task.channel ID.TELEGRAM_TOKEN.channel in the send_notification task to your own ID.ExecutionNamespace prefix if your workflows live under a different root.ExecutionStatus condition to alert on KILLED or long-running RUNNING executions.payload with a link to the execution UI, the flow ID, and the owning team label.TelegramExecution tasks, one per severity.io.kestra.plugin.core.flow.Switch to route critical namespaces to PagerDuty and informational ones to Telegram only.