Telegram Action

Sends to Telegram from a flow: text, photos, documents, voice notes and polls. One of its eleven operations is unlike the rest — send and wait for response pauses the pipeline until a human answers, which turns a chat into an approval step.

Setup

A Telegram bot token, from BotFather. The bot has to have been started by the user, or be a member of the group, before it can message them — Telegram does not let bots open conversations.


Mode — action or AI toolkit

The Mode selector decides who drives the node. In Action mode you pick one operation and fill its fields, and the node does that every time it runs. In AI toolkit mode the operations become tools an AI Node can call, and the model chooses which one and with what arguments.

ℹToolkit mode is opt-in per node, and it is what makes this node show up in an AI Node's tool picker. A node left in Action mode is invisible to agents.

Operations

The Operation dropdown decides what the node does and which fields appear under it. These are the exact values the API validates against:

ValueIn the dropdownWhat it does
sendMessageSend messageText reply with optional inline keyboard
replyToMessageReply to messageQuote-reply with the threaded indicator above the bot's message
sendPhotoSend photoImage by URL or _file ref
sendDocumentSend documentFile of any type by URL
sendVoiceSend voiceSend a voice bubble — pass a URL / file_id (or chain from the AI Node synthesize_voice tool)
sendAndWaitForResponseSend & wait for responseSends a message with Approve / Disapprove buttons (and optional free-text reply) — pipeline pauses until the user responds
editMessageTextEdit messageReplace text of a previously-sent message
deleteMessageDelete messageRemove a message from a chat
answerCallbackQueryAnswer callbackAcknowledge an inline-button press (REQUIRED after callback_query)
forwardMessageForward messageForward an existing message to another chat
sendPollSend pollMulti-option poll (regular or quiz)

Send and wait for response

Posts a message with Approve and Disapprove buttons — and, optionally, a free-text reply — and then stops the pipeline until someone presses one. The answer arrives as the node's payload, so the branch after it can act on the decision.

ℹThis is the same shape as the Approval Gate, with Telegram as the surface instead of a dashboard page. Use it when the person deciding lives in a chat and will not open the dashboard.
⚠It needs an active Telegram trigger on the same bot. A button press reaches HostWebhook through that bot's webhook, which the trigger registers — without one, pressing does nothing and the wait can only time out. The trigger doesn't have to listen to button presses itself: the bot always asks Telegram for them.

With Allow free-text reply on, a plain text message in the same chat also answers — and it counts as approved: _waitResponse.approved is true and _waitResponse.responseText carries what they wrote. To say no, they press Disapprove. Only a message to this bot counts; the same person writing to another bot of yours doesn't.

If nobody answers before Timeout (minutes) — 24 hours by default — the wait resolves itself and the pipeline goes on as rejected: _waitResponse.approved is false. Turn on Approve if nobody answers to go on as approved instead. Either way _waitResponse.timedOut is true (and false when someone presses a button), so the branch after it can tell the two apart. A button pressed after that changes nothing: the bot only answers that the request expired.

From Run Test the message goes out for real, but the answer only shows up in the node's output: testing one node never runs the rest of the canvas, and answering the test doesn't either.

With Include disapprove button off nobody could say no, so the timeout doesn't invent a rejection: unless Approve if nobody answers is on, the request just expires and the pipeline stops there, as it always did. The option is set on the node and only works when it runs this one operation; in AI toolkit mode a request nobody answers never ends approved.

Inline keyboard and chat action

The Advanced tab carries two extras: an inline keyboard — the buttons under a message, which you define as rows — and a pre-send chat action, the “typing…” indicator shown briefly before the message lands. The second is cosmetic, and it is what makes a bot feel less abrupt.


Gotchas

  • answerCallbackQuery is required after an inline-button press. Skip it and the user's client keeps showing a spinner on the button.
  • Bots cannot start conversations. The user must have messaged the bot first, or the bot must be in the group.
  • Voice notes want a URL or a file_id — the natural source is the AI Node's voice synthesis tool, chained into this node.
  • Photos, documents and voice notes take any public URL in Single operation (Telegram fetches it; files from the trigger, like {{payload.attachment._file.downloadUrl}}, are re-signed when sent, so a long Delay doesn't break them). In AI toolkit mode they only take a Telegram file_id or a _file.downloadUrl from a tool or from the user — never a URL the model made up.
  • Reply to message: from a Telegram trigger use {{payload.messageId}} — it is there for messages, button presses and edits alike. In AI toolkit mode the reply quotes the message that started the run on its own.
  • Forward message in AI toolkit mode only forwards messages of the same conversation. Whoever chats with your bot can't make it forward messages from other chats.
  • Editing only works on the bot's own messages, and only while Telegram still allows it.