databeginner10 min setupby Mantle
Fan out a list to an API
Receive a list of items by webhook and call an API once per item, five in parallel, continuing past individual failures.
Drag to pan, pinch to zoom. This is the real graph the template installs.
How it works
What it does
- Webhook
batch-inreceives{items: [...]}. - For each item iterates the list five at a time (
parallel,max_concurrency: 5); a failed item does not stop the others (on_error: continue). - POST item — the loop body — sends each element as the JSON body, with exponential-backoff retry.
Setup
- Change the destination
urlon POST item (or use an HTTP connection +path). - Tune
max_concurrencyandmax_itemsfor the downstream API's limits.
Nodes 3
- 01Batch intrigger.webhookTrigger
- 02For each itemcontrol.for_eachLogic
- 03POST itemhttp.requestHTTP
View template JSON
{
"format": "mantle-workflow/v1",
"id": "data-fan-out-http",
"name": "Fan out a list to an API",
"graph": {
"nodes": [
{
"id": "webhook",
"type": "trigger.webhook",
"label": "Batch in",
"config": {
"slug": "batch-in",
"input_schema": {
"required": [
"items"
],
"properties": {
"items": {
"type": "array"
}
}
}
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 60,
"y": 220
}
},
{
"id": "for_each_item",
"type": "control.for_each",
"label": "For each item",
"config": {
"items": "items",
"item_as": "item",
"index_as": "i",
"parallel": true,
"max_concurrency": 5,
"on_error": "continue",
"empty_collection": "skip",
"max_items": 1000
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 380,
"y": 220
}
},
{
"id": "post_item",
"type": "http.request",
"label": "POST item",
"config": {
"method": "POST",
"url": "https://example.com/items",
"headers": {
"Content-Type": "application/json"
},
"body_from_input": true,
"timeout_seconds": 15
},
"connection_id": null,
"worker_type": "generic-worker",
"position": {
"x": 700,
"y": 220
},
"retry": {
"max_attempts": 3,
"backoff": "exp",
"initial_ms": 500,
"max_ms": 8000
},
"parent_id": "for_each_item"
}
],
"edges": [
{
"from": "webhook",
"to": "for_each_item"
},
{
"from": "for_each_item",
"to": "post_item"
}
]
}
}Use it, then make it yours.
Templates install as drafts. Change anything, and Workflow Health re-checks the graph on every save.