Math Variables

random

Returns a floating-point, pseudo-random number in the range [01) (inclusive of 0, but not 1).

Use the following formula to generate an integer pseudo-random number in the range [minmax] (inclusive of both, min and max):

mceclip0.png

You may copy and paste the formula's code into a field:

{{floor(random * (1.max - 1.min + 1)) + 1.min}}

Examples

Rolling the Dice

Let's say chatbot enthusiasts and such would like to create a dice game. They can employ the random variable to randomly pick a number, say between 1 and 6, and then message that number to a user in the respective Chatbot platform as a response.

  1. In the mapping panel, head over to the Math functions tab:
    mceclip2.png
  2. Under the Math functions tab, select the floor function.
  3. Insert the random variable in between the brackets followed by * (multiplication operator) and number 6.
  4. Add + (addition operator) after the bracket and number 1.
  5. Alternatively, you may copy and paste the formula's code into a field:
    {{floor(random * 6) + 1}}

Random String/Text

This template demonstrates how to generate a string (text) of a given length composed of characters chosen randomly from a predefined set.

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.