{"product_id":"merge-n8n-runs-into-one-list-after-loops-code-node","title":"Merge n8n Runs Into One List After Loops (Code Node)","description":"\u003ch3\u003eMerge items from multiple n8n “runs” into one clean list after loops\u003c\/h3\u003e\n\u003cp\u003eIf your n8n automations use \u003cstrong\u003eloops\u003c\/strong\u003e, you may end up with the same task’s output scattered across different \u003cstrong\u003eruns\u003c\/strong\u003e. This workflow uses a \u003cstrong\u003eCode\u003c\/strong\u003e node to \u003cstrong\u003emerge those items into a single list\u003c\/strong\u003e, so you can continue processing everything as one cohesive dataset.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eThe workflow is designed for the common post-loop problem: loop executions often leave you with items spread across separate runs. Instead of manually stitching outputs together, this workflow consolidates them automatically.\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003eRuns a loop-based flow (where outputs may be separated into multiple executions\/runs).\u003c\/li\u003e\n  \u003cli\u003eUses a \u003cstrong\u003eCode node\u003c\/strong\u003e to combine the items from those different runs.\u003c\/li\u003e\n  \u003cli\u003eOutputs a \u003cstrong\u003esingle run with one unified list\u003c\/strong\u003e, making downstream steps easier to manage.\u003c\/li\u003e\n  \u003cli\u003eIncludes a note to \u003cstrong\u003eadjust the node name inside the Code node\u003c\/strong\u003e as needed for your setup.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eThis idea is based on an older n8n workflow template focused on merging data across multiple executions.\u003c\/p\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eBatch processing workflows:\u003c\/strong\u003e When you split work into batches and need one final list of results.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoop-driven enrichment:\u003c\/strong\u003e If each loop iteration produces items in different runs, merge them for a single export or database write.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS operations reporting:\u003c\/strong\u003e Consolidate loop outputs before calculating metrics or generating a combined response payload.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003cstrong\u003eManual Trigger\u003c\/strong\u003e\u003c\/li\u003e\n  \u003cli\u003e\u003cstrong\u003eSplit in Batches\u003c\/strong\u003e\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWait\u003c\/strong\u003e and \u003cstrong\u003eNo Op\u003c\/strong\u003e (for loop orchestration)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eif\u003c\/strong\u003e (conditional logic)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCode node\u003c\/strong\u003e (merges items into a single list after loops)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eCategory: \u003cstrong\u003en8n automation workflow\u003c\/strong\u003e. Built for \u003cstrong\u003en8n users\u003c\/strong\u003e, \u003cstrong\u003eautomation engineers\u003c\/strong\u003e, and \u003cstrong\u003eSaaS operators\u003c\/strong\u003e who want cleaner data flow after loop executions.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45742835007667,"sku":"N8N-1814","price":3.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/nJBvRWA-dOhS-7XK_MDow_2ybzbDsw.png?v=1785402984","url":"https:\/\/buyflowscripts.com\/products\/merge-n8n-runs-into-one-list-after-loops-code-node","provider":"N8N Commerce","version":"1.0","type":"link"}