Generates a random integer within a range, or selects a random item from a list. Useful for A/B testing, random routing, sampling, and load distribution.
randomThe Random node introduces controlled non-determinism into your workflows. You can use it in two modes:
The result is available as a variable and can be passed to a Switch node to route execution based on which variant was selected, or used directly in a template.
| Field | Status | Description |
|---|---|---|
| Mode | Required | number โ generate a random integer; choice โ pick one item from a defined list. |
| Min | Conditional | Required when Mode is number. The minimum value (inclusive). Supports {{ variable }} references. |
| Max | Conditional | Required when Mode is number. The maximum value (inclusive). Must be greater than or equal to Min. Supports {{ variable }} references. |
| Choices | Conditional | Required when Mode is choice. An array of values to select from. Each entry can be a static string, number, or a {{ variable }} reference. All items have equal probability. |
| Seed | Optional | A fixed integer seed for the random number generator. When set, the same seed always produces the same result. Useful for testing workflows reproducibly without changing the node configuration. |
| Variable | Type | Description |
|---|---|---|
value |
integer or string | The generated number (in number mode) or the selected item (in choice mode). |
mode |
string | The mode that was used: "number" or "choice". |
index |
integer | In choice mode: the zero-based position of the selected item in the Choices list. Always null in number mode. |
ab_picker). Set Mode to
choice and add two choices: variant_a and variant_b.
variant_a and variant_b.