Skip to content
Docs

Telegram

The Telegram node sends a message to a Telegram chat through the Telegram Bot API. Use it to deliver notifications or an agent’s reply to a user or group. You find it on the node picker’s Channels — send a reply shelf.

It has two handles: input, which takes the upstream node’s output (available in every field as $prev), and output, which passes the send result to the next node.

Store the bot token as a secret or as a saved connection to Telegram and select it in credential. An expression that resolves to the token itself still works, but a stored credential keeps it out of the flow definition.

The Telegram node's settings form, with the fields described below
The Telegram node's settings form, with the fields described below
FieldTypeDefaultDescription
Chat (chatId)string ✦ (required) — The Telegram chat id (user, group, or channel) to send the message to.
Text (text)string ✦ (required) — The text of the message to send.
Parse mode (parseMode)string ✦ (optional) — Telegram parse mode for formatting, e.g. MarkdownV2 or HTML.
Credential (credential)string ✦ (optional) — The Telegram bot token used to authenticate the send — a Secret or a saved Connection.
Attachments (attachments)string ✦ (optional) — Files to send after the text — a voice reply a Text to Speech node made, a photo, a document.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

Attachments picks stored files. Type part of a path, and the field lists the matching files of every file store in your workspace as Store › path, the newest first, 50 at most. One picked file is saved as its object id, several as a JSON array, and a list typed in before the field became a picker opens as its files. For a file another node produced, such as a spoken reply, click Insert a value ({x}) and write an expression, for example {!! $prev->object->versionId !!}. Audio goes as a voice message, an image as a photo, and anything else as a document.

On a successful send (Telegram answers with status 200) the node emits:

{ "status": "sent", "channel": "telegram" }

Any other response status, or an empty bot token, fails the node without retrying.

In Telegram, message @BotFather, send /newbot, and follow the prompts. Copy the token (form digits:letters) and save it as a secret in Publicus.

The Telegram support agent template wires the full loop: a Telegram webhook trigger, an Agent with conversation memory, and this node as the reply. Configure its reply node like this:

  1. Set credential to the secret holding your bot token.
  2. Set chatId to {{ $start->payload->message->chat->id }} (the chat that triggered the flow).
  3. Set text to {!! $prev->content !!} (the Agent node emits its reply under content; the agent’s answer may contain characters that escaping would corrupt).

When an agent calls this node as a tool, the send is approval-gated by default; see How to add human approval.

  • The node sends text (with optional MarkdownV2, HTML, or Markdown formatting through parseMode) and the files in Attachments, up to 50 MB together. It does not send inline keyboards.
  • A bot can only message chats that have started a conversation with it, a Telegram platform rule.