Telegram TelegramExecution

Telegram TelegramExecution

Certified

Notify Telegram about execution result

Sends a templated Telegram message with execution link, identifiers, timing, status, and failing task when applicable. Use with a Flow trigger; for errors handlers prefer TelegramSend.

yaml
type: io.kestra.plugin.telegram.TelegramExecution

Send a Telegram notification on a failed flow execution.

yaml
id: failure_alert
namespace: company.team

tasks:
  - id: send_alert
    type: io.kestra.plugin.telegram.TelegramExecution
    token: "{{ secret('TELEGRAM_TOKEN') }}" # format: 6090305634:xyz
    channel: "2072728690"
    executionId: "{{ trigger.executionId }}"

triggers:
  - id: failed_prod_workflows
    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: prod
        prefix: true
Properties

Chat ID or channel ID

Target chat identifier for the user or channel; supports expressions.

Bot access token

Telegram Bot API token; store as a secret and avoid hardcoding.

Custom fields to be added on notification

Custom message to be added on notification

Custom Telegram API base URL

Override the Telegram API endpoint for local testing; defaults to https://api.telegram.org.

Default{{ execution.id }}

The execution id to use

Default is the current execution, change it to {{ trigger.executionId }} if you use this task with a Flow trigger to use the original execution.

Configure Telegram HTTP client

Optional HTTP client overrides for Telegram calls. Leave unset to use defaults: 10s read timeout, 5m read idle timeout, 10 MB max response, UTF-8 charset.

Definitions
connectTimeoutstring

Maximum time to establish the connection before failing; unset uses the client default.

connectionPoolIdleTimeoutstring
DefaultPT0S

Idle timeout for pooled connections; defaults to 0s.

defaultCharsetstring
DefaultUTF-8

Request charset; defaults to UTF-8.

headersobject

HTTP headers

HTTP headers to include in the request

maxContentLengthintegerstring
Default10485760

Maximum response size; defaults to 10 MB.

readIdleTimeoutstring
DefaultPT5M

Idle time allowed while reading before closing the connection; defaults to 5m.

readTimeoutstring
DefaultPT10S

Maximum read duration before failing; defaults to 10s.

Possible Values
HTMLMARKDOWNV2

Telegram Bot parse-Mode

Optional text formatting mode (HTML or MarkdownV2); default sends plain text.

Message payload

Rendered JSON body passed to Telegram sendMessage (must include text).

Reference (ref) of the pluginDefaults to apply to this task.

Template variables

Map of variables rendered and passed to the Pebble template; defaults to an empty map when not provided.