Built-in tool
Pick random array items
Choose one or more random items from an array.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| itemsrepeating-group · required | repeating-group | required | Add one or more data sources. Supports variable references and expressions. |
| pickCountnumber · optional | number | optional | How many items to randomly pick. Must be a whole number (e.g. 1, 2, 3). Default is 1. When set to 1, output is a single object instead of an array. Example: |
| outputFieldsstring · optional | string | optional | Comma-separated `item`-rooted references to include (e.g. `item.id, item.name`). Leave blank to return full picked objects. Use `item` for the element itself. Example: |
Response schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"success"
],
"properties": {
"count": {
"type": "number",
"description": "Number of items in the result (populated for array results and the count action)."
},
"error": {
"type": "string"
},
"result": {
"description": "Transformed result. Type depends on the action: array, object, scalar, or number."
},
"success": {
"type": "boolean"
}
},
"additionalProperties": false
}