Overview
The node "Random Picker" randomly selects a single item from the input array of items it receives. It is useful in scenarios where you want to pick one random element from a list, such as selecting a random user, choosing a random task, or sampling data points for testing.
For example, if you have an array of customer records and want to randomly select one for a special offer, this node will output exactly one randomly chosen record from the input.
Properties
| Name | Meaning |
|---|---|
| Items | A collection of multiple values (items) from which one will be randomly selected |
Output
The output contains a single JSON object representing one randomly picked item from the input array. The structure of the output JSON matches the structure of the selected input item.
No binary data is produced by this node.
Dependencies
- No external services or API keys are required.
- No special n8n configurations or environment variables are needed.
Troubleshooting
- If the input array is empty, the node may throw an error or produce no output because there is no item to select.
- Ensure that the input data is correctly passed as an array; otherwise, the random selection logic will fail.
- Common error: "Cannot read property 'length' of undefined" — indicates that the input data was not provided or is not an array. Verify upstream nodes provide valid input.