Collection nodes
Operate on arrays. Every collection node takes a source (a JSON value, usually
{{ nodes.<id>.result }}) and, where relevant, a field written as an
{{ item.* }} expression that is evaluated per element as the node iterates.
item is deferred —
leave the field blank to compare each element itself.
If source doesn't resolve to an array, the node fails.
Filter collection
@wf::collections:filter · CollectionFilterNode
Keeps elements where field <operator> value holds.
| Field | Type | Default | Notes |
|---|---|---|---|
source | json | — | Required. |
field | text | — | An {{ item.path }} expression. Blank compares the element itself. |
operator | select | == | See below. |
value | text | — | Supports {{ }}. Hidden for the is_* operators. |
Operators: ==, ===, !=, >, >=, <, <=, contains, not_contains,
starts_with, ends_with, in, not_in, is_null, is_not_null,
is_empty, is_not_empty.
Output: { "result": [ ...kept elements ], "count": <n> }
Map collection
@wf::collections:map · CollectionMapNode
Transforms each element.
| Field | Type | Notes |
|---|---|---|
source | json | Required. |
fields | json | A single {{ item.path }} expression → one value per element; or a JSON object of output keys → expressions to reshape each element; or blank to pass elements through. |
Output: { "result": [ ...mapped elements ] }
['fields' => ['name' => '{{ item.name }}', 'email' => '{{ item.email }}']]
Reduce collection
@wf::collections:reduce · CollectionReduceNode
Collapses the array to a single value.
| Field | Type | Default | Notes |
|---|---|---|---|
source | json | — | Required. |
operation | select | sum | sum, avg, min, max, count, concat. |
field | text | — | {{ item.path }} to reduce over. Blank uses elements as-is. |
separator | text | '' | (when operation is concat) Joins the values. |
sum / avg / min / max ignore non-numeric values. count counts the
whole source.
Output: { "result": <value> }
Sort collection
@wf::collections:sort · CollectionSortNode
| Field | Type | Default | Notes |
|---|---|---|---|
source | json | — | Required. |
field | text | — | {{ item.path }} to sort by. Blank sorts elements as-is. |
direction | select | asc | asc or desc. |
Output: { "result": [ ...sorted elements ] }
Collection contains
@wf::collections:contains · CollectionContainsNode
Returns whether any element satisfies field <operator> value.
| Field | Type | Default | Notes |
|---|---|---|---|
source | json | — | Required. |
field | text | — | {{ item.path }}. Blank compares the element itself. |
operator | select | == | Same set as Filter (minus in / not_in). |
value | text | — | Supports {{ }}. |
Output: { "result": true }
Count collection
@wf::collections:count · CollectionCountNode
| Field | Type | Notes |
|---|---|---|
source | json | Required. |
Output: { "count": <n> }