Skip to main content
The Random number block (Calculations) returns a random number between a minimum and a maximum value each time a workflow runs. Use it to split records across paths by chance. That fits A/B experiments or weighted routing. When you instead need every member to get an even, ordered share of records, reach for Round robin.

Inputs

Outputs

Reference the drawn value in a later block as {{ steps.random_number.random_number }}.

Behavior

The block draws one value each time the workflow runs and exposes it as a single output. Each run is independent. The block holds no memory of earlier draws, so it cannot guarantee an even spread across runs the way Round robin does. Over a small number of runs, the split between branches can look lopsided. The distribution evens out only across many runs. Feed the output into a downstream If or Switch block to turn the number into a branch decision. To bias the split, set the threshold in that condition rather than in the range here. A 0 to 1 range compared against 0.7 sends roughly 70 percent of runs down one path.

Gotchas

  • The split looks uneven at low volume. Each draw is independent, so ten runs can land nine-to-one by chance. Treat the percentages as long-run averages. Use Round robin when you need an exact, fair share per member.
  • The same record can land on a different path on re-run. A retried or re-triggered run draws a fresh number. A record routed to one rep on the first attempt may route elsewhere on the second. Write the drawn value or the resulting assignment to the record if you need the decision to stick.
  • Minimum and maximum are both required. The block has no default range, so leaving either bound empty blocks configuration. Set both bounds before publishing the workflow.

Examples

Splitting new leads between two reps

Draw a number in the 0 to 1 range, then branch on it to assign roughly half of new leads to each rep. Wire the output into an If block with the condition {{ steps.random_number.random_number }} is greater than 0.5. Leads above the threshold route to Priya Sharma. The rest route to Jordan Lee, giving an even split over time.

Sampling one in ten records for a manual review

Draw a number in the 1 to 10 range to flag a 10 percent sample for a human to check. Send {{ steps.random_number.random_number }} into an If block with the condition equals 1. Matching records route to a Create task block. The task asks a reviewer to check that the auto-filled company details look right. The other nine in ten skip the review.

Source

Attio Workflows block library. Last reviewed against the Attio Help Center, June 2026.

See also