Button from a block or connection trigger

How to create a button from a connection

Keyboard buttons can be created using connectors. To do this, drag a connector and open the editor:

To create buttons from connections:

  1. Enable this toggle.

  2. For each connection, enter the desired button text in its "Trigger" field.

Then, apply the same configuration to the other connections:

  1. Open connection settings: click on the connector to open its settings.

  2. Set the button text: in the Trigger field, enter the text you want to display on the button.

  3. Select match type: set the comparison type to "Exact match".

  4. Enable button display: activate the "Display as button" option.

  5. Save the configuration: click "Save" to apply the settings.

Line and position: buttons created from connections are stacked vertically by default. Use this field to specify a line number and control a button's vertical position in the layout.

Button color: If needed, you can specify the button color — this works in online chat and Viber.

Result:

Button from a block trigger

Now let’s look at a more advanced method for creating buttons using the "Advanced button settings" in the block editor's Buttons section.

Previously, we created buttons using connections and triggers on the connectors. An alternative method is to use dedicated trigger blocks, such as the Start Block (funnel entry point) or Trigger Block.

Step 1: Create the Block Structure

  1. Create a Start Block (the funnel entry point).

  2. Create several additional blocks below it. The number of blocks should match the number of buttons you need.

Example: In the workflow below, three blocks are created to correspond with three buttons.

Step 2. Configure the trigger conditions in the subsequent blocks (in this example, the three Start blocks).

Step 3. Navigate to the main block (the funnel entry point) and click on the Buttons tab.

Step 4. In the Buttons section of the block editor, switch to Advanced settings and insert the code for your custom button.

[{"line":0,"index_in_line":0,"text":"Go","type":"reply"},{"line":1,"index_in_line":0,"text":"No","type":"reply"},{"line":2,"index_in_line":0,"text":"Next time","type":"reply"}]

You will see an identical menu, but without the connections. If configured correctly, clicking a button will trigger the bot to send the message from the corresponding response block.

Step 5. Save the block settings and switch to the bot testing mode.

When you test the bot, it will render keyboard buttons that are functionally and visually identical to those created with the "Add button" option.

A button click will deliver the message from its linked Start block (created in Step 1).

Last updated