How to output a variable to text

The question on how to use variables in the text often arises. For example, how to address a person by name or how to output already existing values.

The rule is quite simple - when we create a variable, we write it as var, when we output a variable or write it to another variable, we write it as {{var}}.

In other words, to output a variable, you need to specify the variable name in double curly brackets, for example: {{var}}. Instead of var, we substitute the desired variable name.

According to this rule, it is necessary to use double curly brackets in order to display in your bot the text that was sent by the user and saved in variables through the User Input or Fork components. That’s how you do it: {{variable to output}}.

There are no special components for variables output. Variables can be output in any component where a message is sent to the user. These can be Message, Buttons, Alert components, etc.

In this example, we made it look like the user had already left his data in aud, toDo and usEmail variables. After that, we sent the user his information back for verification.

If there are several values in the variable, for example, the this_user variable, we add a clarification of the value separated by a dot: this_user.full_name