Use this block to send simple text messages, or messages with a picture, to a user in a chat.
Message text has built-in support for text formatting using the Mustache syntax.
Macros for text formatting
Example | Result | Support |
---|---|---|
{{#b}}test{{/b}} | test | |
{{#i}}test{{/i}} | test | |
{{#s}}strikethrough{{/s}} | ||
{{#c}}code{{/c}} | code |
If the formatting is not supported by the messenger, then the text will be displayed unchanged.
Displaying Variables in Text
User variables are also available in the text (for example, if earlier in the input request blocks you specified the name of the variable, then in this block you can display the value entered by the subscriber).
For convenience, there are a number of built-in variables that can be used, for example, when compiling external links.
Parameter | Description | Additionally |
---|---|---|
{{lang}} | Current Bot language (in customer chat) | english, czech, etc... |
{{program}} | Messenger | 2 characters: WA, TL, VB |
{{customer.id}} | (Chat ID) | |
{{customer.tel}} | Customer phone number | WhatsApp only |
{{customer.nickname.raw}} | Customer name from profile | Please, use {{customer.nickname.encoded}}, to obtain URL-encoded version of the customer name |
{{customer.login.raw}} | Customer login | For Telegram. Also refer to {{customer.login.encoded}} macros |
formdata.* | User fields | Indicate the name of the variable in the blocks to get the value entered in the block earlier in this array. |
rpc.result.data.* | RPC Call Result Data | You can return arbitrary data from the server and use it in a template. |
Dynamic links
With variables from the table above, you can compose links with dynamic parameters, for example:
https://example.com/?tel={{customer.tel}}&name={{customer.nickname.encoded}}
a message will be sent to the chat:
https://example.com/?tel=1234567890&name=Alex
Pause between messages
You can postpone the execution of the next block in the script, to do this, select the required period of time in the drop-down list. From 3 seconds to 2 hours.