# Messages and buttons

The blocks in this group are the backbone of a scenario: they send messages, show buttons, wait for a reply and ask for contact details. This page also describes the sections of the "Block settings" panel that many blocks share: ["Menu"](https://support.watbot.org/chatbots/blocks/messages#menu), ["Validation"](https://support.watbot.org/chatbots/blocks/messages#validation) and ["Advanced"](https://support.watbot.org/chatbots/blocks/messages#advanced).

How to add blocks and connect them is covered on the [Blocks](https://support.watbot.org/chatbots/blocks) page.

## Menu

The "Menu" section holds the block's buttons. Each button becomes a separate output of the block on the scheme: connect it to the next block, and the bot will go there when the person presses the button.

### How to add a button

1. Click "Add answer". Once there are buttons, this button is called "Add more".
2. Enter the button name — up to 255 characters. It is saved automatically.

To change the order of buttons, drag a button by the number to the left of its name.

The bot recognises a button not only by a press. If the person types its name themselves, the same output fires — upper and lower case make no difference.

[Templates](https://support.watbot.org/chatbots/templates/where) work in a button name, but only with simple functions.

### Icons in the button row

- **Arrow** — opens quick connections. "Start" connects the button's output to the start block of the scenario. "Back" connects it to the block a connection leads from into this block; if there are several such blocks, the connection is made to one of them. The start block has no quick connections.
- **Gear** — opens the "Menu item settings" window.
- **Smiley** — adds an emoji to the name.
- **Trash can** — deletes the button.

![The "Menu" section: numbered buttons, icons in the button row, "Any other phrase" and where new buttons go](https://support.watbot.org/_media/en/01-chatbots/03-blocks/01-messages/_images/menu.webp?v=1791781230)

### Menu item setting

The window sets the button's type and colour. Changes are applied with the "Save" button; if you close the window without saving, the button stays as it was.

![The "Menu item settings" window: command type, button colour and command](https://support.watbot.org/_media/en/01-chatbots/03-blocks/01-messages/_images/menu-item-settings.webp?v=1791781230)

**"Command type":**

- **"Text"** — a regular button: the person presses it, and the bot follows its output. The "Command" field holds the button name.
- **"Link"** — the button opens a website. Fill in "Link Name" and "Link". The "Track link clicks" switch counts clicks in the button's analytics, and if the button's output is connected to a block, the bot sends that block after the click. Place a link button under the message: under the input field in Telegram and Viber it works as a regular button.
- **"Open inline bot Telegram"** — the button starts a search in the inline bot, which is set up with the "Inline Telegram bot" block. The "Search text" field holds the query the search opens with. Works only in Telegram and only under the message.
- **"Web App"** — the button opens a mini app or another page at the address from the "URL" field. In Telegram the app opens inside the messenger. In MAX only a mini app of the platform connected to this bot opens this way; any other address opens as a regular link. In VK and Viber such a button works as a regular one.

**"Button color":** "Default", "Blue", "Green" or "Red". A coloured button is marked with a stripe on the left, both on the scheme and in the settings. The colour is visible in Telegram, VK, Viber and the web chat. In MAX only green and red buttons are coloured, while links and the mini app button stay regular. In VK link buttons are not coloured.

### "Any other phrase" and "Continue"

Besides buttons, a block has two more outputs.

- **"Any other phrase"** — the last row of the "Menu" section. It fires when the reply matched none of the buttons: the person typed something of their own or sent a file. If this output is not connected to anything, the bot repeats the question — see the "Repeat question" switch in the ["Advanced"](https://support.watbot.org/chatbots/blocks/messages#advanced) section.
- **"Continue"** — visible only on the scheme. If it is connected to the next block, the bot goes there right after sending the message.

> [!IMPORTANT]
> For the bot to wait for a button press or a reply, leave the "Continue" output unconnected. Otherwise the bot will move on without waiting for the person.

### Where to add new buttons

The switch above the add button decides where a new button appears:

- **"Under the message"** — the button is attached to the bot's message. This is how buttons are added by default.
- **"Under the input field"** — the button goes into the keyboard under the input field.

The choice is remembered in your browser and applies to all blocks. MAX has no keyboard under the input field — there such buttons go under the message.

### Button layout

The "Button layout" subsection shows how the buttons will line up in the chat: in rows within the "Under the message" and "Under the input field" zones. A new button takes a row of its own.

- Drag a button to another row to put several buttons side by side.
- "Add row" creates an empty row labelled "Drop a button here". An empty row is removed with the cross.
- A whole row can be dragged by the icon on its left — to another zone as well.
- The "Same in all messengers" switch is on by default: the layout is shared. Turn it off to set up the layout for each channel separately — channel tabs appear.

![The "Button layout" subsection: "Under the message" and "Under the input field" zones, rows of buttons](https://support.watbot.org/_media/en/01-chatbots/03-blocks/01-messages/_images/layout.webp?v=1791781230)

The layout is saved automatically. Each messenger has its own limit of buttons per row: the bot shows the buttons that did not fit at the end, in separate rows. What buttons can do in each channel is on the [Telegram](https://support.watbot.org/chatbots/channels/telegram), [VK](https://support.watbot.org/chatbots/channels/vk), [MAX](https://support.watbot.org/chatbots/channels/max), [Viber](https://support.watbot.org/chatbots/channels/viber) and [web chat](https://support.watbot.org/chatbots/channels/web) pages.

### Text menu

The "Text menu" subsection has the "Start numbering from zero" switch. With it, button numbers in the "Menu" section start from 0 instead of 1. The numbers are needed for replying with a digit — see "Answer in numbers" in the ["Advanced"](https://support.watbot.org/chatbots/blocks/messages#advanced) section.

## Validation

Validation checks the person's reply when it matched none of the buttons. It is needed when the bot asks a question and expects the reply in a particular form: a number, a date, a photo.

Choose the check type in the list. "No" — the reply is not checked.

| Type | Which reply passes the check |
|---|---|
| "Text" | Any text message. A photo or a file will not do |
| "Numbers" | A number, for example `25` or `3.5` |
| "Letters" | Letters only, without spaces, digits or symbols |
| "Letters and numbers" | Letters and digits only, without spaces or symbols |
| "Range of numbers" | A number no less than the "From" value and no greater than the "To" value |
| "Date and time" | A date that exactly follows the pattern from the "Date/Time Format" field. For example, `31.12.2025` matches the `d.m.Y` pattern, and `31.12.2025 23:59` matches `d.m.Y H:i`. If the field is empty, the `Y-m-d H:i:s` pattern applies |
| "Phone number" | A number in international format: the "+" sign and digits, 9 to 16 characters in total. For example, `+70001234567` |
| "Email" | An email address |
| "URL" | A full link, for example `https://example.com` |
| "Image", "Audio", "Video" | A file of the corresponding kind |
| "File" | Any file, photo, video or audio |
| "Regular expression" | Text that matches the expression from the field of the same name, for example `^\d+$`. Letter case is ignored |

### Settings

- **"Characters"** — the "Limit number of characters" switch adds a check of the reply's length. Set "Minimum number of characters" and "Maximum number of characters". The "Character Count Error Message" field holds what the bot replies if the length does not fit. This check is not available for images, audio, video and files.
- **"Validation Error Message"** — what the bot replies if the reply failed the check, up to 255 characters. If you leave the field empty, the bot sends a standard message in the bot's language.

![The "Validation" section: number range from 1 to 20, character limit and error messages](https://support.watbot.org/_media/en/01-chatbots/03-blocks/01-messages/_images/validation.webp?v=1791781230)

### What happens to the reply

- **The reply failed the check** — the bot sends the error message and stays in this block waiting for a new reply.
- **The reply passed the check** — the bot follows the "Any other phrase" output. Connect it to the next block.

To save the reply, turn on "Write the answer to the user variable" in the ["Advanced"](https://support.watbot.org/chatbots/blocks/messages#advanced) section.

> [!NOTE]
> The start block of a scenario has no "Validation" section.

> [!TIP]
> For a phone number and email, the dedicated blocks are more convenient — "Phone number request" and "Email request". They check the reply themselves and save it to the contact's data.

## Advanced

The "Advanced" section holds switches that change how the block behaves. The set of switches depends on the block.

![The "Advanced" section: answer with numbers, saving the answer to a variable, repeat question and other switches](https://support.watbot.org/_media/en/01-chatbots/03-blocks/01-messages/_images/additional.webp?v=1791781230)

- **"Answer in numbers"** — the person can reply with a button's number instead of pressing it. The numbers are to the left of the buttons in the "Menu" section. If there is no button with that number, the bot looks for a button with that name. On by default.
- **"Write the answer to the user variable"** — the person's reply in this block is saved to a contact variable. The name is set in the "Variable name" field: letters, digits, spaces and the underscore. If the person pressed a button or replied with its number, the variable gets the button name. If they sent a photo, video, audio or file — a link to it. You can insert the variable into messages: `{{ $city }}`, or, if the name contains spaces, `{{ var("Client city") }}`. See the [Data you can insert](https://support.watbot.org/chatbots/templates/data) page for details. Contact variables also go into the request created by the "Request" block.
- **"Delete the variable after order creation"** — appears together with the "Variable name" field. The variable is deleted after the request notification is sent and does not get into later requests.
- **"Repeat question"** — if the reply matched none of the buttons and the "Any other phrase" output leads nowhere, the bot sends the block's message once more. If you turn it off, the bot stays silent. On by default.
- **"Disable link preview"** — no website card appears under a message with a link. Works only in Telegram.
- **"Deliver silently"** — the message arrives without a notification sound. Handy for night-time and non-urgent messages. Works in Telegram and MAX.
- **"Protected Content"** — the person cannot forward or copy the message. Works only in Telegram.
- **"Replace previous chat message"** — when the person presses a button under a message, the bot does not send a new message but replaces the previous one with this block's message. Turn it on in the block whose message should take the place of the earlier one. Works in Telegram and MAX. Available in the "Simple message", "Message chain" and "AI Agent" blocks.
