Skip to content
Docs

Parallel

The Parallel connector splits the upstream node’s output at a JSONPath and runs the sub-graph wired to its iteration handle once per element, concurrently, each as its own child run. Use it to process batch API responses, enrich a list of records, or fan out any array-shaped data. You find it on the node picker’s Connectors shelf.

The node has three handles: input accepts the upstream node’s output, iteration holds the sub-graph that runs once per element, and output activates after every element has finished, emitting the result chosen by outputMode.

The Parallel node's settings form, with the fields described below
The Parallel node's settings form, with the fields described below
FieldTypeDefaultDescription
Split path (splitPath)string (optional) $ A JSONPath into the previous output selecting the array to fan out over — one child run per element.
Output mode (outputMode)one of combine, summary ✦ (optional) combine What this node outputs once every item has run: “combine” (default) emits each child’s output in iteration order; “summary” emits only {“count”: n}.
At most at once (maxConcurrent)integer (optional) — How many items run at once. Leave empty to start them all together.
On item error (onItemError)string ✦ (optional) — What to do when one item fails: fail the whole split, or continue with the rest.

Fields marked ✦ accept expressions.

Try this node — run it once against your own workspace, with your credentials, without building a flow first.

splitPath is a JSONPath resolved against the upstream node’s output:

Upstream output shape splitPath
The output is already an array $ (the default: the whole output)
An array under a key $.items
A nested array $.data.records

If the value at splitPath is an object, the connector splits over its values. An empty array at a path such as $ or $.items produces zero child runs, which is not an error: the output handle still emits an empty aggregate ([], or {"count": 0} in summary mode) and the nodes after it run as usual. A path such as $.items[*] that selects nothing fails the node, naming the path and what it searched, so a typo does not fan out over nothing in silence. Any other non-array value fails the node too.

outputMode decides what the output handle emits once every element has run:

Mode Emits
combine Every child’s output, in split order, as one JSON array. This is the default.
summary {"count": n}, the number of children that ran.

The node wired to the output handle receives this result as $prev. Any node further down can read the same result by the connector’s name, for example $workflow->node('Split orders'), which returns the aggregate rather than one element’s output.

Note the default is the opposite of a pager’s: a pager defaults to summary, Parallel defaults to combine. Choose summary when the branch ends inside the iteration body (it wrote the rows, sent the messages) and nothing downstream reads the results; a wide fan-out’s combined aggregate is stored in the run log, so dropping it is a real saving.

By default every element starts at the same moment. Set At most at once (maxConcurrent) to run them in waves instead: that many start, all of them finish, then the next wave starts. Use 1 to run the elements one after another, in order, for example when they write rows another element may also write, or call an API that cannot take them all at once. One slow element holds up its wave.

By default the first element that fails fails the whole run, and the other elements’ results are thrown away even though they finish. Set On item error (onItemError) to continue to keep them: the failed element’s place in the combine output holds {"error": true, "item": <position>, "message": "…"} instead of a result, so a later step can tell which ones failed. The run then reports how many failures it continued past.

Each element runs as its own child run, visible under the parent in the run view. Inside the sub-graph, $prev holds the single element for this iteration and reads exactly like any other node’s output: {{ $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. $page->startData is an array, so read a field with brackets, {{ $page->startData['userId'] }}; the arrow form reads nothing there.

A run report for Print a label per pallet: the Each pallet Parallel step with its combined output, and its three child runs, Each pallet (1) to (3), nested under it, each with its own Label the pallet step
A run report for Print a label per pallet: the Each pallet Parallel step with its combined output, and its three child runs, Each pallet (1) to (3), nested under it, each with its own Label the pallet step

An API returns a list of orders:

{ "orders": [{ "id": 1 }, { "id": 2 }, { "id": 3 }] }
  1. Wire the API node’s output to the connector’s input and set splitPath to $.orders.
  2. Wire a REST Request into the iteration handle, with a URI such as https://api.example.com/orders/{{ $prev->id }}.
  3. Follow it with a Table Store Upsert so a retried element overwrites instead of duplicating.

The sub-graph runs three times in parallel, once per order. When all three children finish, the output handle emits their results as one array in the original order of orders.

  • Elements run concurrently unless At most at once says otherwise, so the sub-graph must not depend on another element’s result. For iteration where each round decides the next, use a pager: Page Based or Offset Based.
  • Keep per-element sub-graphs short: a wide fan-out multiplied by a slow sub-graph queues a lot of work at once.
  • A pager inside the sub-graph pages through its API once per element, and without At most at once every element starts its pager at the same moment. Set maxConcurrent to a small number so a wide split does not run hundreds of paginations together. See Connectors inside connectors.