
Telegram TelegramExecution
CertifiedNotify Telegram about execution result
Telegram TelegramExecution
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.
type: io.kestra.plugin.telegram.TelegramExecutionExamples
Send a Telegram notification on a failed flow execution.
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
channel *string
Chat ID or channel ID
Target chat identifier for the user or channel; supports expressions.
token *string
Bot access token
Telegram Bot API token; store as a secret and avoid hardcoding.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150caption string
Document caption
Optional caption for the uploaded file when from is set. Ignored for text messages. Supports expressions and the formatting specified by parseMode. Telegram allows up to 1024 characters after entities parsing.
customFields object
Custom fields
Added to the message as one key: value line each, after the customMessage if it is set. Telegram limits a message to 4096 characters, so a longer message is shortened and ends with ....
customMessage string
Custom message
Added to the message after the execution summary, separated by a blank line. Telegram limits a message to 4096 characters, so a longer message is shortened and ends with ....
endpointOverride string
Custom Telegram API base URL
Override the Telegram API endpoint for local testing; defaults to https://api.telegram.org.
executionId string
{{ 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.
from string
File to send
URI of the file to upload as a Telegram document, for example {{ outputs.report.uri }}. Accepts Kestra internal storage (kestra://), namespace files (nsfile://) and local files (file://). Supports expressions. The file is read through Kestra and uploaded with the filename from the URI; the URI itself is not sent to Telegram. When set, payload is unused and caption is optional.
options
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.
io.kestra.plugin.telegram.AbstractTelegramConnection-RequestOptions
Maximum time to establish the connection before failing; unset uses the client default.
PT0SIdle timeout for pooled connections; defaults to 0s.
UTF-8Request charset; defaults to UTF-8.
java.nio.charset.Charset
HTTP headers
HTTP headers to include in the request
10485760Maximum response size; defaults to 10 MB.
PT5MIdle time allowed while reading before closing the connection; defaults to 5m.
PT10SMaximum read duration before failing; defaults to 10s.
parseMode string
HTMLMARKDOWNV2Telegram Bot parse-Mode
Optional formatting mode for message text or a document caption. Use the case-sensitive enum names HTML or MARKDOWNV2 (values sent to Telegram are HTML and MarkdownV2). Default sends plain text.
payload string
Message payload
Message text sent as Telegram sendMessage text when from is absent. Required for text messages. Do not wrap the value in a JSON object. For file uploads, use caption instead.
templateRenderMap object
Template variables
Map of variables rendered and passed to the Pebble template; defaults to an empty map when not provided.