How to use N8N to nest a loop within a loop

Hey @cdxiaodong , nesting Loops is not a good idea as it could lead to unexpected results. Also each loop has to be closed (last node of the loop has to be routed back to the beginning for the Loop node). However, if you do need to feed more than one set of items into the same Loop node you need to reset it before feeding the next set of items as explained in Loop Node Only Processes the First Item - How to Fix? - #12 by Jon.

Finally,

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


2 Likes