Block Types
Text Block
Sends a text message to the user. Supports Markdown formatting:
"bold" → bold "italics" → italics "" "code" "" "{{variable}}" — variable substitution
Automatic splitting of long messages
Telegram limits a single text message to 4096 characters. If the block's resulting text exceeds this limit (e.g., an AI response), the bot automatically splits it into multiple messages:
- The text is split by paragraphs, then by sentences and words—naturally, without breaking in the middle of a word.
- All parts are sent sequentially as a single block.
- Buttons (inline or keyboard) and message effects are attached only to the last message so the user sees them below the final part of the text.
- "Reply to message" settings apply only to the first part; "Send to another chat" and "Forum thread" settings apply to all parts.
No configuration is required—splitting works automatically for the "Text" block.
Media Blocks
The Image, Video, Audio, Voice Message, and Document blocks send the corresponding file.
You can upload a file from your computer or select one from the bot's library (using the "Files" button).
Telegram caches files: if the same file is sent again, it is not re-uploaded.
Voice Message
The Voice Message block sends a file using the "sendVoice" method—Telegram displays it as a playable voice message (with a waveform).
Supported formats: OGG/OPUS (recommended), MP3, M4A. Maximum size: 50 MB. Unlike the "Audio" block, a voice message does not have "Artist" or "Track Title" fields—Telegram does not support these tags for voice messages.
Buttons
There are two types of buttons:
- Inline buttons — attached to the message; clicking one navigates to another node.
- Keyboard buttons — appear below the input field and function as commands.
A link to another node is set by selecting the node from a drop-down list.
Condition
The Condition block allows you to build branching scenarios based on the "if / elseif / … / else" principle:
- Add one or more conditions (using the "New condition" button). Each condition represents a separate branch.
- In each branch, specify a set of rules combined by AND logic, as well as a match action (where the bot goes if the branch condition is met).
- The bot checks the branches in order: the first branch that evaluates to true is executed, and the others are skipped.
- If no branch condition is met, the bot proceeds to the "No condition met" command (equivalent to "else").
Data source (shared across all branches):
| Value | What is checked |
|---|---|
| Text (message) | The user's last text message |
| Message type | Type of incoming message (command, text, photo, video, etc.) |
| File | Attached file metadata (size, format, dimensions) |
| Variable | Value of the specified variable "{{name}}" |
| Deeplink (/start) | Parameter from a link like t.me/bot?start=... (available after the /start command) |
| Connected resource | User status in connected channels and groups |
Supported operators for text and variables: equals, does not equal, contains, does not contain, starts with, ends with, greater than/less than (numbers), exists/does not exist.
On the canvas, each branch is displayed as a separate edge labeled "Condition N met", while the "else" branch is labeled "No conditions met".
Action upon meeting the condition
For each branch, you can select one of two actions:
| Action | Description |
|---|---|
| Go to command | Execute another command (node). Subsequent blocks of the current command are not executed. |
| Set variables | Set one or more variables and continue executing the remaining blocks of the current command. |
The "Set variables" mode is useful for converting system values into readable strings without creating additional nodes. For example: check "user.sex = male" → set "sex_label = Male" → continue and send the text "Your gender: {{sex_label}}".
When adding variables, specify:
- Variable name — the name without curly braces (e.g., "sex_label").
- Value — supports substitution of "{{variables}}" and mathematical expressions ("{{price}} * 1.2").
You can add multiple pairs by clicking "Add variable". All variables are set sequentially before execution continues.
"Deeplink (/start)" source
Allows you to check a parameter passed by the user when following a link like https://t.me/bot?start=s_tg_1_2.
The deeplink is available only to users who followed a link with the
/startparameter. The value is stored in the session within the system variable{{DEEPLINK}}and remains available in subsequent blocks.
Settings:
| Field | Description |
|---|---|
| Save to variable | The name of the variable where the deep link will be stored. If splitting is enabled, an array of parts is saved and accessible via index: {{varName.0}}, {{varName.1}}… |
| Split by delimiter | If the deep link consists of multiple parameters, enable splitting to access each part by its index. |
| Delimiter | The delimiter character (default is _). Each part is accessible by index, starting at 0. |
| Conditional property | Select which fragment (index) to check the condition against after splitting. "None" — the condition applies to the entire string. |
Example: link https://t.me/bot?start=param1_param2, delimiter _:
| Index | Value |
|---|---|
| 0 | param1 |
| 1 | param2 |
Supported operators — the same as for the "Variable" source: equals, does not equal, contains, starts with, ends with, greater than/less than, exists/does not exist.
Typical scenario:
- A user follows the link
https://t.me/bot?start=s_tg_1_2. - A "Condition" block with the "Deeplink" source—split by _, index 1, operator "Equals", value tg—checks the acquisition channel.
- If there is a match, the flow proceeds to a command where notifications are sent to the relevant people using {{prefix.2}} (referrer ID) and {{prefix.3}} (new user ID).
"Message Type" Source
Allows you to check the type of incoming message from the user: command, plain text, photo, video, audio, voice message, or document.
Available operators:
| Operator | Condition | Value field |
|---|---|---|
| Command [/name] | Message starts with "/" | ✅ Optional — command name (e.g., "/start" or "start"). If not specified — any command |
| Text | Plain text message (not a command) | — |
| Photo | User sent a photo | — |
| Video | User sent a video | — |
| Audio | User sent an audio file | — |
| Voice message | User sent a voice message | — |
| Document | User sent a document/file | — |
💡 For types without a value field, the condition triggers if the message is of that specific type—regardless of its content.
"Connected Resource" Source
Allows you to check whether the user is a subscriber or administrator, or has performed a specific action in one or more of your channels/groups. Settings:
- Resources to check — select one or more connected channels/groups. The condition is considered met only if it is satisfied in all selected resources simultaneously (AND logic).
- Telegram User ID — the ID to check. Defaults to "{{CHAT_ID}}" (current user). A different variable can be used.
Available operators:
| Operator | Description | Channels | Groups |
|---|---|---|---|
| Subscription/Membership | User is a member | ✅ | ✅ |
| Is administrator | Has administrator rights | ✅ | ✅ |
| Is owner | Is the chat creator | ✅ | ✅ |
| Banned | Blocked/removed from the chat | ✅ | ✅ |
| Read-only | Sending rights restricted | ✅ | ✅ |
| Can send messages | "can_send_messages" permission | — | ✅ |
| Can invite | "can_invite_users" permission | — | ✅ |
| Can send media | Permission for media files | — | ✅ |
| Title | Custom admin title matches the value | ✅ | ✅ |
| Premium | User has Telegram Premium | ✅ | ✅ |
| Boosted | User boosted this channel/group | ✅ | ✅ |
| Sent a message | User posted in the group (logged by the bot) | — | ✅ |
| Tenure < / > days | First logged message appeared less/more than N days ago | — | ✅ |
| Members > / < | Chat audience size | ✅ | ✅ |
| Has a gift | User has at least one Telegram gift | ✅ | ✅ |
| Gift by ID | User has a gift with a specific "sticker_id" | ✅ | ✅ |
⚠️ Important: The "Left a message" and "Tenure" operators work only based on messages the bot recorded after the resource was connected. Historical data is not available.
The permissions "can_send_messages", "can_invite", and "can_send_media" apply only to groups and are ignored (without error) for channels.
Data Input
The Data Input block waits for a user response and saves it to a variable. After the input is received, the bot proceeds to the next node.
You can configure validation: type (text, number, email, phone) and an error message.
Inline Form Buttons
Instead of text input, you can offer the user the option to click one of the inline buttons. When clicked, the button's value is instantly saved to the variable—without sending a message. Three suffixes are available: {var} and {var.value} (the saved value), and {var.key} (the button text).
Allow Multiple Options (Multi-select)
Enable the Allow multiple options checkbox in the inline form buttons section to let the user select multiple buttons before confirming.
How it works:
- The bot displays a keyboard with option buttons and a confirmation button.
- Clicking an option toggles its selection (a ✅ appears/disappears)—no message is sent; only the keyboard updates.
- Clicking the confirmation button finalizes the selection. If the user hasn't selected anything, a toast notification appears displaying the text from the block's "Error text" field (if filled); otherwise, a standard prompt appears.
Saved variables (where var is the block's variable name):
| Variable | Value |
|---|---|
{var} |
Values of all selected buttons separated by commas: val1,val2,val3 |
{перем.0.key} |
Text of the first selected button (in list order) |
{перем.0.value} |
Value of the first selected button |
{перем.1.key} |
Text of the second selected button |
{перем.1.value} |
Value of the second selected button |
| … | And so on |
Settings:
| Field | Description |
|---|---|
| Allow multiple options | Enables multi-select mode |
| Confirm button text | Label for the "confirm selection" button (default: "Send") |
⚠️ Multi-select is incompatible with "Skip" and "Interrupt" buttons within the same block. The interrupt button will close the form without saving the result.
- Go to node — unconditional jump.
- Go to command — jump based on the command value (useful for loops).
Video message (circular)
Sends a video in "circular" format—a short video displayed in a round frame (up to 1 minute). It is uploaded and used just like a standard video block.
Media group (album)
Sends multiple images or videos as a single album message (up to 10 files). The recipient sees all files displayed as a gallery.
JavaScript
Executes custom JavaScript code on the server side within an isolated, secure environment. This allows for the implementation of complex data processing logic directly within the bot scenario.
Block settings
| Field | Description |
|---|---|
| Result variable | The name of the variable where the value returned via return will be stored. |
| Error variable | If the script terminates with an error (syntax, timeout, exception), the error text is stored here. On success, it remains an empty string. If an error occurs but this field is not set, the scenario continues execution. |
| JavaScript code | The script itself, with syntax highlighting. |
Available variables
All current bot variables are passed to the script via the botContext object:
"""javascript // Get a bot variable value const price = Number(botContext['price']); const userName = botContext['user_name'];
// Return the result (stored in the "Result variable") return price * 1.2; """
Example: text formatting
"""javascript const raw = botContext['api_response_text'] || ''; // Truncate to 200 characters and add an ellipsis return raw.length > 200 ? raw.slice(0, 200) + '…' : raw; """
Example: Working with a JSON string
"""javascript const json = botContext['webhook_body'] || '{}'; const data = JSON.parse(json); return data.items ? data.items.length : 0; """
Security limitations
- No network access — "fetch", "XMLHttpRequest", and any HTTP calls are unavailable.
- No file system access — "require", "fs", and "process" are undefined.
- 1-second timeout — the script is forcibly terminated if the limit is exceeded.
- 32 MiB memory limit — the isolate is destroyed if the limit is exceeded.
Paid Content (Telegram Stars)
A block for selling media files in exchange for Telegram Stars. The user sees a blurred preview and an "Unlock for X Stars" button. The file becomes accessible after payment.
Location
Sends a geolocation—a point on the map with specific coordinates. Coordinates (latitude, longitude) are set manually or via variables.
Contact
Sends a contact card containing a name and phone number. Useful for sharing support or manager contact details.
Delay (Pause)
Pauses execution before the next block. During the pause, Telegram displays a "typing..." status to the user.
| Field | Description |
|---|---|
| Duration | Delay in seconds |
Use delays to create a more natural conversation flow, especially before long messages.
"Set Variables" Block
Explicitly sets variable values without requiring user input. Supports variable substitution and mathematical operations ("+ - * /", parentheses). The result is calculated automatically and rounded to two decimal places.
For more details on variables and examples, see the Variables section.
"Integration" Block
Calls third-party services (OpenAI, Google Sheets, etc.) and saves the result to variables.
Learn more in the Integrations section.
"API Request" Block
Sends an HTTP request to any external service with custom headers and a request body.
Learn more in the [API Requests](API Requests) section.
"Poll" Block
Launches a poll campaign—a series of Telegram questions with answer options.
Learn more in the Polls section.
"Invoice" Block
Sends a payment invoice to the user via Telegram Payments.
Learn more in the Payments section.
"Button Response" Block (answerCallbackQuery)
Sends a silent notification or an alert dialog to the user without posting a message in the chat. It triggers only if the command was initiated by pressing an inline button; otherwise, the block is silently skipped.
Typical scenario: checking for channel subscription.
- Create a command with a Condition block (to check for channel subscription).
- In the "not met" branch, add a Button Response block with the text: "You are not subscribed. Subscribe and check again!"
- Link the "Check Subscription" button to this command.
The user presses the button → if not subscribed, they receive a notification overlaying the chat, while the original message containing the list remains unchanged.
Parameters:
| Field | Description |
|---|---|
| Notification text | Text for the pop-up notification (0–200 characters). Supports "{{variables}}". |
| Show as dialog (alert) | If enabled, the user sees a modal dialog that must be closed. Otherwise, a brief notification appears. |
| URL (optional) | Opens the specified URL for the user (used for games or "t.me/your_bot?start=..." links). |
| Cache time | The number of seconds the Telegram client caches the response. 0 = no caching. |
Gallery
The Gallery block allows you to send a series of photos or videos with navigation between them using the ← / → buttons. Pressing these buttons edits the message (using the Telegram editMessageMedia method) — the bot does not send new messages but updates the existing one.
Appearance in the chat:
[ ← ] [ 1 / 10 ] [ → ]
[ Select ] ← optional
The [1 / 10] button resets navigation to the first item. Navigation is circular: pressing → on the last item returns you to the first one.
Operation Modes
Upload Files
Upload photos or videos manually. All files must be of the same type: either all photos or all videos (mixing is not allowed). There are no minimum or maximum limits on the number of files.
You can specify a description (caption) for each file, which will be displayed below the media.
Files can be uploaded from your computer or selected from the bot's file library.
From Variable
The media source is a variable containing an array. This is useful when the list of images/videos is obtained dynamically (e.g., from an API request or a database).
| Field | Description |
|---|---|
| Array variable | The name of the variable containing the array of photos or videos. |
| Description element | The path to the description field within the array element. Optional. Example: item.caption |
Selection Button
Enable the "Display selection button" option to add a button below the gallery.
| Field | Description |
|---|---|
| Label | The button text. Default is "Select". |
| Variable prefix | The name of the variable where the entire array element object will be stored upon clicking. You can then access it using {{variable.field}}. |
| Navigation command | The command to be executed after clicking the "Select" button. |
| Remove buttons after selection | If enabled, all buttons in the message disappear when an item is selected. |
