How to create a loop and restard a workflow

Hello, im french i would try to be precise and to be understood.
So i try to restart a workflow and i suppose that i need api workflow. I don’t know how it is work for this use case.

Here the steps :

When the user click on the Blue Button it sets state on my page. Go = Yes (it serves only to trigger the “Do when” workflow)

  1. The “set states” workflow

  2. The “Do When” Workflow

The “Do When” Workflow is the Workflow i would like to play and replay automatically when my custom state go is yes (Its facultative by the way) and API scrap searh’s meta has more page is yes (thats the most important thing, and My Api give me automatically the information “yes or no” if there is more page to extract). The point is that i don’t know how to restart the workflow…i thought that the “Do when” would works for that but no, its not the case…

My objective is to cumulate datas from the API on my database in order to create a condensed excel. I need to do that because the Scrap API i use only allow me to extract datas 50 by 50 maximum but I would like to make an excel with 50,000 pieces of information if necessary, and not create 1000 excels with 50 lines of data. You understand me ?

I really need help, so I will be very grateful to whoever helps me. Love