All nodes/Integrations/Telegram

Telegram Inline Keyboard

Sends a message carrying inline buttons, or attaches buttons to an existing message. Buttons carry command/args — tapping one re-runs the workflow with data.telegram.command / args / message_id. Uses the bot this workflow is deployed to; set 'Connection source' to 'External connection' to pick a different bot through the 'telegram_config' port. Target 'reply_message' attaches the buttons to the bot's reply for this turn, which is delivered at the end of the turn.

Telegram Inline Keyboard
Telegram ConfigSuccess
Error

Type in the graph: telegram_inline_keyboard

Exec

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

Try it

Minimal working workflow

Entry
Telegram Inline Keyboard
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 you need a choice from a few options rather than free text: a confirmation, a menu, “yes / no / later”. An ordinary reply is sent by Send Telegram Message — what matters here is the buttons under the message and what happens when one is tapped.

How it works

A button carries a command plus arguments. The tap arrives as its own update and the workflow starts again: the entry text becomes the command, and data.telegram carries command, args and the message_id of the message the button sat on. This is a new turn, not a continuation of the previous one — read state from memory or variables rather than from “the previous step”. A URL button behaves differently: it simply opens the link and starts no run at all.

“Attach to” offers three targets: a new message carrying the text and the buttons, the bot’s reply for this turn (the buttons are attached at the end of the turn, once the reply exists), and a specific message by id.

Common mistakes

  • Taps never arrive. By default the bot is subscribed to messages only. Tick “Inline button taps” under “Updates to receive” in the deploy panel — otherwise the buttons are visible and the workflow stays silent.
  • 64 bytes for command and arguments together. Telegram accepts no more, and long arguments fail the node. Pass a short key and keep the payload in a variable or a document.
  • Buttons can only be attached to the bot’s own message. Telegram does not let a bot edit anyone else’s.
  • The “bot’s reply” target only works on a Telegram turn and returns an empty message_id: the message does not exist yet while the node runs.
  • Non-Latin characters cost two bytes each. “64 characters” and “64 bytes” are different limits, and the second one arrives first.
  • Blank text does not stop the node. Neither an empty Message field nor an empty button caption counts as an error: a single space is sent instead, and the chat gets a message that looks empty. A template that rendered to nothing has to be spotted by eye.

Inputs

PortWirePayloadNotes
Telegram Configtelegram_configDatadata

shown when connection_source ≠ "auto"

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)

Buttonsbuttonsarray<array>

Rows of inline buttons (outer list = rows, inner list = buttons in the row). A button carries a caption (text) plus either a command and args, or a url. Tapping one re-runs the workflow with data.telegram.command / args and data.telegram.message_id (the message the button sits on). callback_data = 'command|args', limited to 64 bytes.

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

shown when target = new_message | message_id

Message IDmessage_idstring""

Numeric id of the message to act on. Templates are supported, e.g. {{ nodes.send_message_1.message_id }}.

supports templates

shown when target = message_id

Attach totargetstringnew_message

Where the buttons go. new_message — send a new message carrying the text and the buttons; reply_message — attach them to the bot's streamed reply of this turn (its id may not exist yet when this node runs, so the attachment is deferred to the end of the turn); message_id — attach to a specific message.

Options: new_message — Send a new message with the buttons, reply_message — Attach to the bot's reply of this turn, message_id — Attach to an existing message by id

Messagetextstring""

Text of the new message (target=new_message only; templates are supported).

supports templates

shown when target = new_message

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.