# Loop for x times

**URL:** <https://community.n8n.io/t/loop-for-x-times/24938>\
**Category:** Questions\
**Tags:** looping\
**Created:** [6 أبريل 2023، 10:18م UTC](https://community.n8n.io/t/loop-for-x-times/24938 "2023-04-06T22:18:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohdlatif](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Mohdlatif](https://community.n8n.io/u/Mohdlatif)\
**Post date:** [6 أبريل 2023، 10:18م UTC](https://community.n8n.io/t/loop-for-x-times/24938/1 "2023-04-06T22:18:12Z")

</div>

How I can loop for 3 times in n8n.

For example, send notification 3 times.

The suggested solution here is not working for me as Set value does not update:

> [@Loop x times when IF is false](http://community.n8n.io/t/loop-x-times-when-if-is-false/3171):
>
> WooCommerce has an order.created webhook. If the order is made inside WooCommerce Store. It’ll trigger. Then After 2 Mins of Wait. WooCommerce Node will get the Order Status. And with the help of IF Node. If the status is processing It’ll send to TRUE Branch. If the status is pending it’ll send to FALSE Branch (loop). Then Again wait for 2 mins then the same thing comes in a loop. But the problem is: If I don’t have a 3 times loop or Loop Limit. It’ll become a non-ending loop. H…

---

<div class="post-metadata">

**Author:** ![mcnaveen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mcnaveen/32/53924_2.png) [@mcnaveen](https://community.n8n.io/u/mcnaveen)\
**Post date:** [6 أبريل 2023، 10:23م UTC](https://community.n8n.io/t/loop-for-x-times/24938/2 "2023-04-06T22:23:29Z")

</div>

Hi @Mohdlatif

Check this.

> [@Getting emails of completed orders from Woocommerce](http://community.n8n.io/t/getting-emails-of-completed-orders-from-woocommerce/24251/2):
>
> You can do something like this. I even added the Product ID check too. This can be extended even further. p.s: I have shared this in my other answer as well.

---

<div class="post-metadata">

**Author:** ![Mohdlatif](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Mohdlatif](https://community.n8n.io/u/Mohdlatif)\
**Post date:** [6 أبريل 2023، 11:28م UTC](https://community.n8n.io/t/loop-for-x-times/24938/4 "2023-04-06T23:28:09Z")

</div>

Thanks for your reply. Is there a more neat way of doing that ?

---

<div class="post-metadata">

**Author:** ![Mohdlatif](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Mohdlatif](https://community.n8n.io/u/Mohdlatif)\
**Post date:** [7 أبريل 2023، 2:15ص UTC](https://community.n8n.io/t/loop-for-x-times/24938/6 "2023-04-07T02:15:18Z")

</div>

I did something like this and it works well

---

<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:** [14 أبريل 2023، 2:16ص UTC](https://community.n8n.io/t/loop-for-x-times/24938/7 "2023-04-14T02:16:14Z")

</div>

تم إغلاقه في في 14 أبريل 2023، 2:16ص UTC

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