Skip to content

Node reference

For Each

Execute an inline subworkflow once for each upstream record.

Use forEach when every record needs its own fetch-and-process graph, for example visiting each company’s website and extracting a contact record.

Connect a node producing records. Each item supplies values to the entry node’s configuration through bind, whose keys are config fields and values are dotted record paths. Missing, empty-string, or empty-list bindings skip that item.

The node emits combined records in llm_result.data and extraction_result.data, with _foreach_index and _foreach_key provenance. foreach_result reports item counts, failures, skipped items, record count, and truncation when max_items cuts the input.

FieldDefault / requirement
flowRequired inline engine graph: nodes with config, and edges
entryRequired id of a node with no incoming edge in that graph
bindRequired nonempty map, for example {"url":"website"}
concurrency4; from 1 to 8
max_items500; from 1 to 5000
item_timeout_seconds300; from 10 to 3600
on_errorcontinue or stop; default continue
keyOptional record path for item identification

This config visits each upstream website and returns an answer. The inner graph uses engine config, even when the outer For Each node is saved as canvas data. Its placeholder URL makes the inner graph valid before execution; bind replaces it for each item.

forEach configuration
{
"entry": "fetch",
"bind": {"url": "website"},
"max_items": 8,
"concurrency": 2,
"flow": {
"nodes": [
{"id": "fetch", "type": "urlFetcher", "config": {"url": "https://example.com", "depth": 0, "max_pages": 1}},
{"id": "markdown", "type": "markdownConverter", "config": {"content_filter": "none"}},
{"id": "answer", "type": "llmProcessor", "config": {"prompt": "What does this company do?", "output_format": "json"}}
],
"edges": [
{"source": "fetch", "target": "markdown"},
{"source": "markdown", "target": "answer"}
]
}
}

Item timeouts count as failures. With continue, failed items are reported and successful output is retained; if every taken item fails, the node raises an error. Results are assembled in input order, regardless of completion order.

Subflows use the run’s shared model/page/byte limits. Inspect foreach_result before trusting a partial result.

For cross-branch enrichment, see Combine. For reusing stored URLs, see Query.