Repeating workflow

Hello all

I have built a workflow which checks if a swiss canton entered by a customer in Woocommerce matches his postcode. If not then the canton is updated in Woocommerce and Mautic. I got the data from Swiss Post and have imported it into a mySQL-database from where I grab the data now:

This works quiete well and (at the moment) can be triggered by entering a customer id from Woocommerce manually. I will adapt the workflow to check the relation right after a customer has registered.

BUT - I have realized that we have already hundreds of customers with wrong or missing information about the canton.

So I would like to be able to run the workflow on all customers one by one automatically. I tried with a solution from the forum (with an increasing counter) but this seems not to work for my use case…
I would like to have a process which starts with given a counter value / customer id and then increases after each round until a certain counter value / customer id is reached.

Can this be done?

I would very appreciate every help on this!

Kind regards

Information on your n8n setup

  • **n8n version: 0.189.1
  • **Database you’re using : mySQL
  • **Running n8n via [Docker] / selfhosted.


Do you have a list of all customer Id’s? assuming you are doing it with the customer Id or number or somethin like that?
If so you can simply create a list and put this in front of the workflow as sorta a dummy data list the workflow it self will then just do it’s thing for every item on that list. after you can remove it and it will work are you had wanted it to.

1 Like

@BramKn - Thx fro your reply!

I may pull a list from Mautic but what element would I use to place it in front of the workflow (what kind of formatting) and how would it the start to run through all of them? I thought n8n will run once through the process and the stop …

n8n runs through all Items provided. Items are sort of records within your workflow. So if you have a list of records to go through it can do this for you.
Where you normally fill in an Id or what ever manually you can also use an expression and set it to a field value in this case the Id in a list you provide.
made a very basic example for you.

Thx again, I will try it this weekend!

1 Like

@BramKn - it worked! Thank you very much for your help!

1 Like