Connectors
Connectors are a special family of nodes that spawn child workflows. Unlike regular nodes — which hand their JSON output to the next node in a linear chain — connectors take an array or paginated source and run a sub-graph once per element or page.
Connectors live under app/Flows/Connectors/ and implement
ConnectorInterface or PagerInterface, which is why they appear
separately from regular nodes in the builder palette.
The iteration handle
Section titled “The iteration handle”Every connector exposes an iteration handle instead of a plain
output handle. You wire the sub-graph that should run per element into
this handle. The sub-graph behaves like a miniature flow with its own
entry point.
Anything downstream of the connector’s regular output handle only
runs after every iteration has finished. This lets you aggregate
or process the collected results once the fan-out is complete.
Start → [API call] → Connector ─── iteration ──→ [per-item sub-graph] └── output ──→ [runs after all iterations]

Each iteration is a full activity in the Runs view, so you can inspect inputs and outputs for every single child run.


Split / Parallel
Section titled “Split / Parallel”Class: App\Flows\Connectors\Split\Parallel
Split / Parallel splits an array into individual elements and runs
the iteration sub-graph concurrently for each one.
Configuration
Section titled “Configuration”| Field | Type | Description |
|---|---|---|
splitPath |
string | JSONPath expression pointing at the array to split. Default: $ (the entire input). |
outputMode |
enum | What the output handle emits once every item has run: combine or summary. Default: combine. |
How it works
Section titled “How it works”- The connector evaluates
splitPathagainst the upstream node’s output. - For each element in the resulting array it spawns a child workflow.
- All children run in parallel. Inside the iteration sub-graph the
current element is available as
$prev, so the first node in the sub-graph reads the split item exactly as it reads the output of any upstream node. - The connector’s
outputhandle emits an aggregated array of every child’s output once they all finish. Results are collected in split order (the order of the elements in the source array), in the same shape as a pager’s output incombinemode. WithoutputModeset tosummaryit emits{"count": n}instead. - The next node reads that result as
$prev, and any later node can read it by the connector’s name with$workflow->node(). An empty array still emits[](or{"count": 0}), so those nodes run.
Example
Section titled “Example”An API returns a list of orders:
{ "orders": [{ "id": 1 }, { "id": 2 }, { "id": 3 }] }Configure the connector with:
splitPath: $.ordersThe sub-graph wired to the iteration handle runs three times in
parallel — once for { "id": 1 }, once for { "id": 2 }, once for
{ "id": 3 }. Inside each run, the current order is $prev,
so {{ $prev->id }} resolves to 1, 2, or 3 depending on the
child. When all three children finish, the connector’s output handle
emits their results as one array in the original order of orders.
See How-to: Parallel processing for a full end-to-end walkthrough.
Pager / OffsetBased
Section titled “Pager / OffsetBased”Class: App\Flows\Connectors\Pager\OffsetBased
Pager / OffsetBased drives a paginated API using offset + size
parameters. It runs the sub-graph once per page, advances the offset
after each page, and stops when the end condition is met.
Configuration
Section titled “Configuration”| Field | Type | Description |
|---|---|---|
startPage |
int | The page number the first page requests. Default: 0. |
startSize |
int | How many records to request per page. Default: 10. |
startOffset |
int | The record offset the first page starts at. Default: 0. |
nextPage |
int | The page number for the page that is about to run. Default: $page->startData["startPage"] + $page->index. |
nextSize |
int | The page size for the page that is about to run. Default: $page->startData["startSize"]. |
nextOffset |
int | The record offset for the page that is about to run. Default: $page->index * $page->startData["startSize"]. |
endCondition |
bool | Pagination stops when this is true. Default: $page->index == 10. |
outputMode |
enum | What the output handle emits once every page has run: combine or summary. Default: summary. |
nextPageProperty |
string | Reserved. The engine does not read this field. Leave it empty. |
nextSizeProperty |
string | Reserved. The engine does not read this field. Leave it empty. |
startPage, startSize, startOffset, nextPage, nextSize and
nextOffset are integer fields and endCondition is a boolean field, so
write their expressions bare, without {{ }} braces. Echo braces
produce a string, which those fields reject.
The $page context
Section titled “The $page context”Inside the iteration sub-graph, expressions reference the current page
through $page:
| Path | Type | Description |
|---|---|---|
$page->index |
int | Zero-based page counter (0 for the first page, 1 for the second, and so on). |
$page->startData["nextPage"] |
int | The page number for the page currently running. |
$page->startData["nextSize"] |
int | The page size for the page currently running. |
$page->startData["nextOffset"] |
int | The record offset for the page currently running. |
$page->startData["startPage"] |
int | The pager’s configured start page. |
$page->startData["startSize"] |
int | The pager’s configured page size. |
$page->startData["startOffset"] |
int | The pager’s configured start offset. |
$page->prevOutput |
mixed | The output of the page that just finished. Only endCondition can read this (see below). |
Inside a @json block the same values are reached as JSONPath strings:
"$.page.startData.nextOffset" is the @json spelling of
$page->startData["nextOffset"].
Use these in a Transformer to build the request parameters for each page:
@json{ "offset": "$.page.startData.nextOffset", "limit": "$.page.startData.nextSize"}@endjsonEnd condition
Section titled “End condition”Pagination stops when endCondition evaluates to truthy. The page that
produced the truthy value has already run, so nothing is lost.
| End condition | Stops when |
|---|---|
$page->index == 10 |
After 10 pages (the default). |
count($page->prevOutput) == 0 |
The last page came back empty. |
$page->prevOutput->hasMore == false |
The API says there are no more pages. |
$page->index == 50 || count($page->prevOutput) == 0 |
Either condition, with a hard bound as a safety net. |
endCondition is the only pager field that can read $page->prevOutput.
The next* fields are frozen into the page’s start data before that
page runs, at which point the previous page’s output is not yet available
to them. This is why the pagers cannot follow a cursor returned in the
response body, and why nextPageProperty and nextSizeProperty do
nothing.
Combining page outputs
Section titled “Combining page outputs”outputMode decides what the pager’s output handle emits once every
page has run:
| Mode | Emits |
|---|---|
summary |
{"count": n}, the number of pages that ran. This is the default. |
combine |
Every page’s output, in page order, as one JSON array. |
Keep summary when the iteration sub-graph already did the work (wrote
the rows, sent the messages, embedded the documents). The combined
aggregate is stored in the run’s record, so on a long run dropping it
saves a lot of space.
Pager / PageBased
Section titled “Pager / PageBased”Class: App\Flows\Connectors\Pager\PageBased
Pager / PageBased is the page-number variant of the pager — it
advances a page parameter instead of an offset. Use it for APIs
that accept page=1, page=2, etc.


Configuration
Section titled “Configuration”Identical to Pager / OffsetBased, minus startOffset and nextOffset:
| Field | Type | Description |
|---|---|---|
startPage |
int | The page number the first page requests. Default: 0. |
startSize |
int | How many records to request per page. Default: 10. |
nextPage |
int | The page number for the page that is about to run. Default: $page->startData["startPage"] + $page->index. |
nextSize |
int | The page size for the page that is about to run. Default: $page->startData["startSize"]. |
endCondition |
bool | Pagination stops when this is true. Default: $page->index == 10. |
outputMode |
enum | combine or summary. Default: summary. |
nextPageProperty |
string | Reserved. The engine does not read this field. Leave it empty. |
nextSizeProperty |
string | Reserved. The engine does not read this field. Leave it empty. |
The $page context
Section titled “The $page context”Same as Pager / OffsetBased above, with the offset entries omitted:
| Path | Description |
|---|---|
$page->index |
Zero-based page counter. |
$page->startData["nextPage"] |
The page number for the page currently running. |
$page->startData["nextSize"] |
The page size for the page currently running. |
$page->prevOutput |
The previous page’s output, readable only from endCondition. |
Example: fetch all records 50 at a time
Section titled “Example: fetch all records 50 at a time”startPage: 1startSize: 50endCondition: $page->index == 100 || count($page->prevOutput->data) == 0The pager stops when the data array in the response is empty, with a
100-page bound so a misbehaving API cannot page forever. The iteration
sub-graph reads $page->startData["nextPage"] and
$page->startData["nextSize"] each round to build the request.
Choosing between connectors
Section titled “Choosing between connectors”| Connector | Use when |
|---|---|
Split / Parallel |
You already have a complete array and want to process elements concurrently. |
Pager / OffsetBased |
The API paginates by offset + limit. |
Pager / PageBased |
The API paginates by page number + size. |
Connectors inside connectors
Section titled “Connectors inside connectors”A connector’s iteration sub-graph can hold another connector. Each combination works:
- A split inside a pager: fetch a page, then process each record on it in parallel.
- A pager inside a pager: page through customers, then page through each customer’s orders.
- A pager inside a split: for each account in a list, page through that account’s records.
The inner connector runs once per outer page or element, and an inner
pager walks its own pages each time, starting again from its
startPage or startOffset. Inside the inner pager’s sub-graph,
$page is the inner pager’s current page.
Related
Section titled “Related”- Nodes — the full node catalogue.
- How-to: Pagination — end-to-end pagination walkthrough.
- How-to: Parallel processing — fan-out patterns.
- Expressions — expression syntax, including the
$pageroot.