Skip to main content

text to $var

The text to $var block is used to receive some text from the client and save it to a variable.

To add the block, select Add blockMore blockstext to $var.

The values of the variable received by the bot can be used in subsequent steps of the script (for example, to address the client by name), exported to .csv or submitted to an external system (such as your database).

Parameters

For this block, you will need to specify the text the bot should display to the client to prompt him or her for text input, as well as the name of the variable that would store the text entered by the client.

The bot will display Enter the text to the client and will wait for the client to input some free-form text. After the client enters some text, the bot will save it to the “text” variable and switch to the next screen of the script.

The bot will not try to parse the text and will simply store the entire client input to the variable. Use the Intents block if you need to bot to respond to certain phrases.

HTML markup

You can use HTML markup in the bot messages. To do this, activate the Use HTML markup in the message toggle.

caution
Not all channels support HTML markup. Learn more about this in the HTML markup article.