# Nested loop execute arrays only once

**URL:** <https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538>\
**Category:** Questions\
**Created:** [February 19, 2025, 10:17am UTC](https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538 "2025-02-19T10:17:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EastinV](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@EastinV](https://community.n8n.io/u/EastinV)\
**Post date:** [February 19, 2025, 10:17am UTC](https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538/1 "2025-02-19T10:17:04Z")

</div>

Hello everyone,

I am working on a workflow in n8n where I have a “Loop Over Items” node that should iterate over an array of data (containing Defender information) to perform an update query.

The flow is structured as follows:

- **“Loop Machines4”** : manages the data for multiple customers (each customer has a separate array with Defender data).
- Each time the loop moves to the next customer, the **“Loop Over Items”** node should iterate over the items of the corresponding array for the new customer’s data and perform the update query.

The issue I’m encountering is that when the loop moves to the next customer, the array with Defender data is correctly loaded, but the **“Loop Over Items”** node never enters the loop to perform the update for the new customer’s items. It seems that the new array of data is not being handled correctly or passed properly to the **“Loop Over Items”** node.

 ![Screenshot 2025-02-19 110304](https://europe1.discourse-cdn.com/n8n/original/3X/a/9/a9aab448eea55e5b279a41120432e9b90666eb82.png)

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [February 19, 2025, 10:17am UTC](https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538/2 "2025-02-19T10:17:05Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![Jim\_Le](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jim_le/32/45558_2.png) [@Jim\_Le](https://community.n8n.io/u/Jim_Le)\
**Post date:** [February 22, 2025, 6:20pm UTC](https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538/3 "2025-02-22T18:20:38Z")

</div>

Hey @EastinV welcome to the community!

I’ve found the editor to struggle with rendering updates to a running workflow with nested loops so would advise checking the external output to validate rather than relying on the cached data/numbers given in the canvas.

I think it would help if you could provide a simplified version of the problem eg. strip away most of the nodes and just leave in the minimum + loops - and see if it’s reproduceable. If you can, definitely share it in this thread again.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [May 23, 2025, 6:21pm UTC](https://community.n8n.io/t/nested-loop-execute-arrays-only-once/79538/4 "2025-05-23T18:21:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
