Unable to complete workflow when run on loop

Describe the issue/error/question

I’m trying to extract data by fetching the HTML of a website. Since the data is paginated, I’ve set up a loop to run the workflow multiple times with $runIndex as a variable. But the issue, the first run is completely fine but it just keeps on loading after that.

Also if I try to execute Https node twice, it won’t run the second time

Hi @Aman_Jain, I am sorry to hear you’re having trouble. Could you share your actual workflow rather than a screenshot so I and other users can reproduce and investigate the problem? When testing the example workflow below on [email protected], looping/pagination didn’t cause any problems:

Also, could you confirm which n8n version you are currently running and whether your n8n instance is still up and running when hitting this problem (no more process could suggest it has crashed, so would be good to check your server logs)?

Hi @MutedJam,
So the purpose of my workflow is to extract some data of an API which is paginated and upload it to a sheet. I’ve setup a loop for pagination but it won’t run the second time. I’m attaching one screenshot where you can see the error in my browser console.

I’m running version [email protected] on the cloud.Here is the workflow JSON for you to reproduce it
I’m not sure why is it happening. Please help me out

There is definitely some issue with looping. I’ve tried with other APIs as well. Doesn’t seem to be working

Hi Aman

I may be reading this wrong but in your http request node you have the page=1 variable, and is not using the run index so no pagination is happening

Setting the expression to
https://www.purplle.com/neo/merch/items?list_type=brand&custom=&list_type_value=sanfe&page={{$runIndex}}&sort_by=rel&elite=0&mode_device=desktop

Looks to be working for me

1 Like

Hi @dakota2gen , even if I use runIndex, it is still running into an issue. Also I don’t think runIndex should make a difference here. It should work even if I’m trying to call the same API multiple APIs?