How-to: Process items in parallel
The Split / Parallel connector takes an array, splits it into individual elements, and runs the iteration sub-graph concurrently for each one. Use it to process batch API responses, enrich a list of records, or fan out any array-shaped data.
How it works
Section titled “How it works”Upstream (array) → Split/Parallel ─── iteration ──→ [per-element sub-graph] └── output ──→ [runs after all elements complete]Each element runs as its own child run, visible in the parent
run’s tree in Runs. The output handle emits an
aggregated array of all children’s outputs after every element is
processed, or only {"count": n} when outputMode is summary.


Step 1 — Fetch the source array
Section titled “Step 1 — Fetch the source array”Wire any node that outputs an array into the connector.
For example, a Database / Select that returns a list of records or a
Rest / Operation that returns a JSON array.
Step 2 — Place the Split / Parallel connector
Section titled “Step 2 — Place the Split / Parallel connector”- Drag a Split / Parallel connector onto the canvas.
- Connect the upstream node’s
outputto the connector’sinput.
Step 3 — Configure splitPath
Section titled “Step 3 — Configure splitPath”The splitPath is a JSONPath resolved against the upstream node’s
output. It tells the connector which part of that output to split:
| Upstream output shape | splitPath |
|---|---|
[{...}, {...}] (the output is already an array) |
$ (the default: the whole output) |
{ "items": [{...}, {...}] } (array under a key) |
$.items |
{ "data": { "records": [{...}] } } (nested) |
$.data.records |
If the value at splitPath is an object, the connector splits over its
values. An empty array produces zero child runs and an empty []
aggregate on the output handle (this is not an error). Any other
non-array value fails the node.
Step 4 — Build the per-element sub-graph
Section titled “Step 4 — Build the per-element sub-graph”Wire nodes into the connector’s iteration handle. Inside this
sub-graph, $prev holds the single element for this iteration,
and it reads exactly like any other node’s output: {{ $prev->userId }},
{{ $prev['userId'] }}, or {{ jsonpath($prev, '$.userId') }}. The
same element is also available as $page->startData, so expressions
written for a Pager sub-graph work here unchanged. See
Use expressions for the full surface.


Example: enrich each record
Section titled “Example: enrich each record”OpenApi/Operation → Split/Parallel ─── iteration ──→ Rest/Operation → TableStore/UpsertThe Rest / Operation in the sub-graph uses:
uri: https://api.example.com/users/{{ $prev->userId }}/detailsEach element gets its own API call and the result is upserted.
Step 5 — Post-aggregation steps
Section titled “Step 5 — Post-aggregation steps”Wire nodes to the connector’s output handle. They run once, after
all parallel elements complete. The first of them receives an array of
every element’s final output as $prev, in the order of the source
array. Any node further down reads the same array by the connector’s
name, for example $workflow->node('Split / Parallel').
Use a ConditionalExit after the output handle to stop the flow when no elements were processed. The condition is the exit predicate, so make it truthy for the empty case; the flow continues only when at least one element succeeded:
condition: count($prev) == 0message: No elements were processed.- Keep per-element sub-graphs short. Long-running sub-graphs multiply: 100 elements × 10-second sub-graph = 1000 seconds of wall time if the queue is constrained.
- Use
TableStore / UpsertorDatabase / Upsertinside the sub-graph to be safe against retries. - Monitor the Runs view: each element shows as a child run under the parent run, with its own input/output pair, making it easy to spot failures.
- On the canvas, show the run with Show on the canvas in the Runs rail, and the split counts its elements under its own state, for example “40 done · 4 running · 1 failed”.
Related
Section titled “Related”- Connectors — Split/Parallel full reference.
- How-to: Pagination — combine Pager with per-element processing.
- Data mapping — expression syntax.