n8n - 💡(How to fix) Fix Nested Looping not supported

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Expected behavior, you should not be able to create nested loops (interface should throw up an error) or it should just support them like every development language out there from the beginning of time.

  • error: all
RAW_BUFFERClick to expand / collapse

Bug Description

The below community post sums it up rather elegantly. Nested looping not supported.

https://community.n8n.io/t/n8n-nested-loop-tutorial-complete-end-to-end-guide/220142/3

To Reproduce

Scenario You have a list of 3 customers, and for each customer you need to process 2 orders. This requires nested loops.

Expected Result: Process 6 items total (3 customers × 2 orders each)

Solution 1: Using Sub-Workflow (RECOMMENDED) MAIN WORKFLOW Step 1: Create the Main Workflow Node 1: Manual Trigger

Add a “Manual” trigger node

This starts your workflow

Node 2: Create Sample Data (Code Node)

Add a “Code” node named “Create Customers”

Use this code:

const customers = [ { id: 1, name: "John Doe", email: "[email protected]" }, { id: 2, name: "Jane Smith", email: "[email protected]" }, { id: 3, name: "Bob Johnson", email: "[email protected]" } ];

return customers.map(customer => ({ json: customer }));

Node 3: Loop Over Items

Add “Loop Over Items” node

Name it “Loop Customers”

Connect it to “Create Customers”

Settings:

Mode: “Run Once for All Items” Node 4: Execute Workflow

Add “Execute Workflow” node

Name it “Process Customer Orders”

Settings:

Source: “Database”

Workflow: Select “Process Orders Sub-Workflow” (we’ll create this next)

Workflow Parameters: Leave empty or pass customer data as needed

Connect from “Loop Customers”

Node 5: Loop Complete

Connect “Execute Workflow” back to “Loop Customers” (creates the loop) Node 6: NoOp (Final Step)

Add a “NoOp” node named “All Done”

Connect from “Loop Customers” when loop completes

See the link above in the description.

Expected behavior

Expected behavior, you should not be able to create nested loops (interface should throw up an error) or it should just support them like every development language out there from the beginning of time.

Debug Info

Debug info

core

  • n8nVersion: 2.20.7-exp.0
  • platform: npm
  • nodeJsVersion: 22.22.2
  • nodeEnv: undefined
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/148.0.0.0 safari/537.36
  • isTouchDevice: false

cluster

  • instanceCount: 1
  • versions: 2.20.7-exp.0
  • instances:
    • instanceKey: , hostId: , instanceType: main, instanceRole: leader, version: 2.20.7-exp.0
  • checks:
    • check: hostid-clash, status: succeeded, warnings: -
    • check: lifecycle, status: succeeded, warnings: -
    • check: split-brain, status: succeeded, warnings: -
    • check: version-mismatch, status: succeeded, warnings: -

Generated at: 2026-05-18T17:57:58.743Z

Operating System

Ubuntu 24.4

n8n Version

2.20.7-exp.0

Node.js Version

22.22.2

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Expected behavior, you should not be able to create nested loops (interface should throw up an error) or it should just support them like every development language out there from the beginning of time.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING