GetMyBot Knowledge Base

Messages and Buttons

Response builder: blocks, inline buttons, dynamic keyboards, and dialog steps.

On this page

The "Send message" action assembles the bot's response from blocks and adds inline buttons, a main menu, and dialog steps. It is the richest action in the builder: substitutions and button referral parameters are configured here as well.

Message blocks

A message is a sequence of blocks (the Add block button):

  • Text: formatted text (up to 4096 characters) with substitutions and buttons.
  • Photo: an image with a caption.
  • File: a document with a caption.
  • Voice: audio (OGG/OPUS, MP3, M4A, up to 50 MB) that Telegram shows as a voice message (sendVoice).
  • GIF: an animation or a silent MP4, up to 50 MB (sendAnimation).
  • Video note: a square MP4 up to 60 seconds (sendVideoNote). It has no caption field, and, unlike photo and file, its file_id is never cached: Telegram rejects a file_id obtained from a different method in sendVoice/sendAnimation/sendVideoNote, so the media-library file is re-uploaded with the right method on every send.
  • Carousel: 2 to 10 cards, each a "photo + caption + its own buttons". In Telegram it is a single message paged with «‹ ›» buttons (the bot re-renders the media in place via editMessageMedia). On channels without a native carousel (VK, for example) the cards go out as a series of separate messages.
  • Delay: a pause in seconds before the next block.
  • AI: a response generated by a model from a prompt.
  • Reaction: calls another reaction (optionally waiting for it to finish).

Voice, GIF, video note, and carousel blocks work in reactions the same way as every other block, and are included in the quick reaction broadcast (see Broadcasts).

Blocks can be reordered by drag-and-drop. Display mode: "In order" or "Random" (for varied responses). The bot's main menu can be left unchanged, set to a new one, or hidden.

Block options

Text and media blocks have flags: pin, silent, no-forward protection, spoiler, no link preview, auto-delete after N seconds.

Inline buttons

Buttons are configured in the block (Button text + Type):

  • Text (callback): a button with press handling on the bot's side.
  • Link: opens a URL.
  • Web app: opens a Telegram Mini App. See Mini App.
  • Call reaction: pressing triggers another reaction.
  • Copy text: pressing copies a given text (1–256 characters) to the clipboard, sending nothing (copy_text).
  • Inline query: inserts "@bot query" into the current chat's input field, or lets the user pick a chat (switch_inline_query/switch_inline_query_current_chat). Available only on Telegram and requires the bot's inline mode to be enabled (@BotFather → /setinline); MyBot does not answer inline queries (answerInlineQuery is not implemented), so this is only a way to pre-fill a query, not a working inline search.
  • Prefilled text: a link button to https://t.me/<bot>?text=… that opens the chat with the bot and puts the text into the input field, sending nothing (prefill).
  • Accept payment and Notification: marked as "coming soon".

Copy text, Inline query, and Prefilled text never open a callback, so they carry neither an answerCallbackQuery reply nor Carry.

Any button can carry an icon: a premium emoji before the label (icon_custom_emoji_id), which must parse as a positive 64-bit integer emoji document ID (leading zeros are fine — 007 parses as 7); anything that doesn't parse that way (letters, zero, a negative number, a number too large for a 64-bit ID) is dropped silently and the button saves without an icon. Telegram shows the icon only for bots with the required rights (an additional name through Fragment, or Telegram Premium on the bot owner when the bot sends directly to a private chat or a group); for every other bot the field is sent but Telegram itself ignores it, with no fallback emoji shown instead. Style: "Default" (no color), "Primary" (blue), "Success" (green), or "Danger" (red) — sent to Telegram as style. The "One-time" flag burns the button after the first press.

On-press behavior

For callback buttons you configure what happens when pressed: replace button text, replace message (with text or the content of a linked reaction), delete message, skip answerCallbackQuery. A press can also set labels and assign parameters.

Callback buttons can also carry text on press (up to 200 characters, substitutions work) and a "Show as a popup" flag: without it the text shows as a brief toast, with it as a modal alert (answerCallbackQuery with show_alert). Empty text just clears the loading indicator with no notification. When "Skip answerCallbackQuery" is on, neither the text nor the alert is sent.

Button parameters (Carry)

The "Carry: data snapshot on button press" block attaches a set of values to the button, captured at the moment of sending. When the button is pressed, these values are placed into the context: so each button carries its own parameters (per-invocation), even when there are many buttons. A payload TTL in seconds is configurable. This is the foundation of "choose a product → order exactly that one" scenarios.

Dynamic buttons

The "Dynamic buttons from list" block expands an array from ctx into buttons: one per element. Configure: the list key in ctx, an element alias, number of buttons per row, and a button template (supports {{alias.field}}). This is how you build catalogs, record lists, and menus from collection data. See Dynamic Buttons and Parameters.

Premium emoji in text

In a text block, the formatting button "Premium emoji" inserts <tg-emoji emoji-id="…">🙂</tg-emoji>: Telegram Premium users see the custom emoji instead of the fallback one inside the tag, everyone else sees the fallback emoji itself. Works in both the HTML and Markdown format of the block. The emoji ID is a number up to 32 digits; find it via getCustomEmojiStickers or by forwarding a message with the emoji to a bot like @idstickerbot.

A t.me/<bot>?start=<param> link always makes the Telegram client send /start <param>: the Bot API does not let you open a chat via deep link "silently" — with a parameter but without the command itself. Working alternatives:

  • Silent /start: for a reaction on the "Command /start" trigger with the required Payload value, the "Send message" action can be left without blocks — there is no visible reply to /start itself, and the payload value is already available in the event context, ready to use in conditions and other actions of the same reaction.
  • Prefilled text: a https://t.me/<bot>?text=<text> link (a "Prefilled text" button or a regular link button) opens the chat and puts the text into the input field, sending nothing; /start is not triggered, and the user sends the message themselves.
  • An "on behalf of the user" auto-message on open is something the Bot API does not allow at all: a bot cannot send a message as the user. The closest substitute is a ?start= deep link plus a reaction that replies with the needed text from the bot.

Expected reply (dialog steps)

A text block can await a user reply: this turns the message into a dialog step and pauses the scenario until a reply is received. Multiple steps in a row form a survey or wizard directly in the chat.

Expected content type

The bot can wait for a specific kind of reply: text, choice from options (option buttons), photo, video, video note, audio, document, voice, location, contact, calendar, or dice. If the user sends the wrong type, the step considers the reply unsuitable.

Text validation

For a text reply you can enable format validation: phone, e-mail, link, date, time, or formula match (regular expression). A reply that fails validation is rejected and the bot shows an error message.

Saving the reply

The user's reply can be saved to a parameter: after which it is available in substitutions as {{param.key}} and in conditions. This is how dialog steps build up a mini-profile of the customer.

Errors, reminder, and timeout

  • Error message: what to show if the reply fails validation.
  • Reminder: what to send if the user is silent.
  • Cancel waiting on timeout: how long to wait before giving up; on timeout you can trigger a reaction (e.g., to gracefully end the survey). This reaction appears in links as "Wait timeout", and the reaction for the reply itself appears as "Expected reply".

Substitutions

The "Substitutions" button inserts variables: sender data ({{first_name}}, {{username}}, {{user_id}}), event data ({{text}}, {{chat_id}}, {{datetime}}), and parameters ({{param.key}}). Full list and formulas: Substitutions and Formulas.

What's next