All nodes/Integrations/Telegram

Send Telegram Message

Sends a message to a Telegram chat. Uses the bot this workflow is deployed to; set 'Connection source' to 'External connection' to pick a different bot through the 'telegram_config' port. Chat ID and text come from the config (templates are supported); a blank Chat ID means the chat of the running Telegram turn. Files wired into the 'files' port are delivered after the text, one message each (document/photo/audio). Sending neither text nor files is an error, not a silent no-op.

Send Telegram Message
Telegram ConfigSuccess
FilesError

Type in the graph: send_telegram_message

Exec

An error branch can be enabled (expose_error_output) to handle failures on their own path.

Try it

Minimal working workflow

Entry
Send Telegram Message
Exit
  • Execute
  • Execute + Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

Reach for this node when a message has to go somewhere the run’s own answer does not: another chat or channel, a notification from a scheduled or webhook run, or an extra message alongside the reply.

In a turn started from Telegram the workflow’s answer already returns to the same chat — the platform streams the text from the Exit node and delivers the files attached to it. Adding a send node for that same text makes the bot answer twice.

How it works

Chat ID and Message are template fields, so graph data can be substituted into them ({{ nodes.entry.output }}, {{ variables.chat }}). A blank Chat ID means the chat of the running Telegram turn; a run started from web chat, the API or a schedule stops with an error when the field is blank — there is no chat to infer. Besides a numeric id, @channelusername works when the bot is an administrator there.

A blank Topic ID means the forum topic the message arrived in. When Chat ID explicitly names a different chat, the message goes to that chat’s root rather than into a topic.

Files wired into the files port are sent after the text, one message each; the message kind (photo, audio or document) follows the file type.

Common mistakes

  • Long text is truncated. Telegram accepts at most 4096 characters, so the rest is cut and an ellipsis is appended. The node does not split text across several messages — split it yourself.
  • Formatting is not applied. The node sends plain text. The workflow’s Telegram parse-mode setting applies to the bot’s own reply, not to this node, so Markdown from a model arrives with its asterisks showing.
  • Sending nothing is an error. With neither text nor files the node stops instead of quietly doing nothing — watch for a template that renders to an empty string.
  • File delivery is best-effort. A file that cannot be read, or that Telegram rejects, is skipped with a log line while the node still reports success. A refused text send (the bot was removed from the chat, blocked, or lacks rights) does stop the node.
  • The wrong bot. By default the node uses the bot this workflow is deployed to. For another one, switch “Connection source” to “External connection” and wire in a Telegram Config node.

Inputs

PortWirePayloadNotes
Telegram Configtelegram_configDatadata

shown when connection_source ≠ "auto"

FilesfilesDatadatafile

File attachments sent after the text, one message each

Outputs

PortWirePayloadNotes
SuccessoutputExecute + Dataexecute_dataobject
Erroron_errorExecute + Dataexecute_data

shown when expose_error_output = true

Configuration

FieldTypeDefaultDescription
Connection sourceconnection_sourcestringauto

Where this node gets its connection. 'From the run context' uses what the platform already knows (the Telegram bot this workflow is deployed to / this workspace's own file store) and needs no wiring. 'External connection' shows the resource port so a config node can be wired into it.

Options: auto — From the run context, external — External connection (wire a config node)

Chat IDchat_idstring""

Target chat: numeric chat_id or @channelusername. Templates are supported, e.g. {{ nodes.entry.data.telegram.chat_id }}. Blank = the chat of the running Telegram turn (a run started anywhere else then fails: there is no chat to infer).

supports templates

Messagetextstring""

Message text (plain text, up to 4096 characters; templates are supported). Optional when attachments are wired into the 'files' port — but the node needs one of the two: sending nothing at all is an error, not a no-op.

supports templates

Advanced
Topic IDmessage_thread_idstring""

Forum topic (message_thread_id) to post into. Blank = auto: the same topic the question arrived in, or the chat root.

supports templates

Shared fields

Every node has these three — the platform adds them, not the node author.

  • expose_error_output — When enabled, show an execution output to connect nodes that run if this step fails.