Skip to content

Random Number and String Generator

How to generate a random number or string in a chat bot

Auto-substitution has been expanded with new random number and string generator functions. To generate a random number, add the following function to the bot text:

{{ rand() }}

Examples:

{{ rand(5, 100) }} — Generate a random number from 5 to 100

{{ strRandom() }} — Generate a random string

{{ strRandom(20) }} — Generate a random string 20 characters long

{{ strRandom(20, true) }} — Generate a random string 20 characters long in uppercase

🎁 Free course on chat bot and MiniApp development for all users with an active PRO subscription is already on LEADTEX.

10 detailed lessons from A to Z.

Start learning right now - Start learning.