The random helper generates a random string or numeric sequence. Use it to produce tokens, temporary identifiers, or unique values within a flow. The first argument specifies the generation method and the second controls the output length.
Syntax
{{random "method" length}}
method -- The generation method. Required. Accepted values:
-
"crypto"-- returns a random alphanumeric string using a cryptographic approach. Use for tokens or IDs that require higher randomness. -
"uuid"-- returns a shorter alphanumeric string suitable for unique but less structured identifiers. Note: this is not a standard RFC 4122 UUID. -
"number"-- returns a numeric-only string. Use when the identifier must contain digits only.
length -- The number of characters or digits to generate. Optional. Defaults to 32 if omitted.
Examples
Generate a short cryptographic string
{{random "crypto" 8}}
Example output: 9b72abf5
Generate a short alphanumeric token
{{random "uuid" 5}}
Example output: 47c1a
Generate a numeric string
{{random "number" 9}}
Example output: 738495210
Usage notes
- Output values are dynamic -- example outputs in this article are illustrative and will differ each time the helper runs.
- If
lengthis omitted, the helper returns a 32-character result by default. -
"uuid"does not produce a standard RFC 4122 UUID. Use a dedicated UUID library if standard UUID format is required.