# Loop stops after running twice

**URL:** <https://community.n8n.io/t/loop-stops-after-running-twice/96341>\
**Category:** Questions\
**Tags:** loop-over-items\
**Created:** [April 3, 2025, 10:22am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341 "2025-04-03T10:22:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_Yasir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohammed_yasir/32/70169_2.png) [@Mohammed\_Yasir](https://community.n8n.io/u/Mohammed_Yasir)\
**Post date:** [April 3, 2025, 10:22am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/1 "2025-04-03T10:22:38Z")

</div>

My work flow stops after successfully runing twice i am unable to find out the reason

Here is my work flow

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [April 3, 2025, 11:38am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/2 "2025-04-03T11:38:19Z")

</div>

hello @Mohammed_Yasir

That’s because nested loops won’t work this way. Better to not use it as it’s too complicated. Instead, use a sub-workflow.

But in your case I would simply remove the nested two loop nodes as they do nothing.

---

<div class="post-metadata">

**Author:** ![Mohammed\_Yasir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohammed_yasir/32/70169_2.png) [@Mohammed\_Yasir](https://community.n8n.io/u/Mohammed_Yasir)\
**Post date:** [April 3, 2025, 3:31pm UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/3 "2025-04-03T15:31:06Z")

</div>

I did what you said, same reasult it runs 2 time successfully then stops

---

<div class="post-metadata">

**Author:** ![Olek](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/olek/32/59619_2.png) [@Olek](https://community.n8n.io/u/Olek)\
**Post date:** [April 3, 2025, 4:02pm UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/4 "2025-04-03T16:02:27Z")

</div>

I tried your workflow. With the very first input **Filter** has discarded all items and workflow stopped as no output was produced. This is a documented feature.

One thing is that this

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/0/5/05ba9d08dd907316ea675cc3de2882001d88cf4e.png)  
is a pretty unconventional usage of the second condition to match.

Just in case you need to proceed despite no data available you can turn this option on.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/c/0/c05f5947995b5bd5ea76d2620b63023c7a7dd61d.png)

This will produce an empty item so that workflow doesn’t get terminated.  
Obviously you may want to handle this situation so that it doesn’t break your process.

Your workflow may contain other logical mistakes. Use workflow executions tab to see what’s going on in your workflow.

If this resolves your question , please mark this post as a ✅ Solution.

---

<div class="post-metadata">

**Author:** ![Mohammed\_Yasir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohammed_yasir/32/70169_2.png) [@Mohammed\_Yasir](https://community.n8n.io/u/Mohammed_Yasir)\
**Post date:** [April 4, 2025, 9:43am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/5 "2025-04-04T09:43:46Z")

</div>

Your recommandation didnt resolve the issue

---

<div class="post-metadata">

**Author:** ![Olek](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/olek/32/59619_2.png) [@Olek](https://community.n8n.io/u/Olek)\
**Post date:** [April 4, 2025, 9:50am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/6 "2025-04-04T09:50:49Z")

</div>

I am sorry about that.

Although you need to provide more information than that, if you need help from the community meaning peer n8n enthusiasts. There is no way for e.g. me to see what’s going on in your workflow and what the executions log tells.

---

<div class="post-metadata">

**Author:** ![barn4k](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/barn4k/32/8170_2.png) [@barn4k](https://community.n8n.io/u/barn4k)\
**Post date:** [April 4, 2025, 9:55am UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/7 "2025-04-04T09:55:42Z")

</div>

@Mohammed_Yasir

try this one

as @Olek mentioned, it’s hard to say what’s wrong exactly without the samples or outputs

---

<div class="post-metadata">

**Author:** ![Mohammed\_Yasir](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohammed_yasir/32/70169_2.png) [@Mohammed\_Yasir](https://community.n8n.io/u/Mohammed_Yasir)\
**Post date:** [April 5, 2025, 12:06pm UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/8 "2025-04-05T12:06:36Z")

</div>

Thanks for the solution it was the nested loop issue. So i used your provided workflow and it worked like a charm.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 12, 2025, 12:06pm UTC](https://community.n8n.io/t/loop-stops-after-running-twice/96341/9 "2025-04-12T12:06:48Z")

</div>

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