{"product_id":"n8n-workflow-pattern-parallel-sub-workflows-wait-all-loop","title":"n8n Workflow Pattern: Parallel Sub-Workflows + Wait-All Loop","description":"\u003ch3\u003eRun multiple sub-workflows in parallel—then wait for all of them to finish\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow pattern template lets you kick off many sub-workflow executions asynchronously (in parallel) and still prevent your main workflow from moving on until every sub-workflow has reported back as complete—using an internal callback URL approach.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eIn n8n, sub-workflows are often run synchronously in series, or—if executed asynchronously—there’s no straightforward built-in way to “merge” results or reliably wait for an arbitrary number of parallel runs. This template demonstrates a practical design pattern to solve that gap entirely within n8n.\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eParallel sub-workflow launching (asynchronous split loop):\u003c\/b\u003e The workflow shows how to split incoming data into multiple instances and start each sub-workflow concurrently.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eCallback coordination (resumeUrl + unique identifier):\u003c\/b\u003e Every sub-workflow execution receives a \u003ci\u003eresumeUrl\u003c\/i\u003e for the parent workflow and a unique identifier (e.g., a document filename) that can be counted later.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eWait-for-all loop:\u003c\/b\u003e The workflow includes a “wait-for-all” mechanism that repeatedly checks—via an \u003ci\u003eif\u003c\/i\u003e node—whether all sub-workflows have reported back finished.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eHold later steps until complete:\u003c\/b\u003e Only after the last callback is accounted for does the parent workflow continue.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eProcessing a list of documents where each item triggers the same sub-workflow, but you want true parallel execution.\u003c\/li\u003e\n  \u003cli\u003eRunning data-driven enrichment tasks concurrently, while ensuring downstream steps only run once every item is done.\u003c\/li\u003e\n  \u003cli\u003eSaaS operations workflows that need concurrent processing with a reliable “all tasks completed” gate—without external message queues or external flow managers.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cp\u003eThis template is built using n8n automation workflow nodes including: \u003cb\u003ewebhook\u003c\/b\u003e (callback endpoint), \u003cb\u003eset\u003c\/b\u003e and \u003cb\u003ecode\u003c\/b\u003e (preparing identifiers and loop logic), \u003cb\u003eno op\u003c\/b\u003e (control flow placeholder where needed), \u003cb\u003ewait\u003c\/b\u003e (polling delay), and \u003cb\u003eif\u003c\/b\u003e (the “wait-for-all” completion check).\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45732260413619,"sku":"N8N-2536","price":45.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/AXOyTaPu-5gwqdEKLOUdd_YgfJO0nq.png?v=1785143296","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-pattern-parallel-sub-workflows-wait-all-loop","provider":"N8N Commerce","version":"1.0","type":"link"}