How to use multiple http node after loop using new page number

Hey Anyone

Need Help in running multiple http node after one another.

Suppose there is http1 , http2 and http3 . I want the workflow to first use http1 and then use http2 and then use htttp3 and then again use http1 and soo on. So I want the http1 and other http node run after completion of other http nodes. no http node should be used before running the other http node if they havent run.

I also want to update page number in the http request after every loop

![Screenshot 2024-04-15 220850|690x193](upload://8jMHoKrI27vfNeNOZeMIBhSF7aO.png)
![Screenshot 2024-04-15 220959|690x126](upload://zYGm02BY5N4SOW2K5G5jOdVFWIH.png)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Not sure I understood your requirement fully, but if you cannot use linearly connected HTTP nodes for some reason (not sure why you cannot) as in

then you could engage Merge nodes in “Choose Branch” mode as below.

With each new iteration the variable $runIndex will be incremented. Hence, you could use something like page={{ $runIndex + 1 }}.

@ihortom isn’t there a way that before the http nodes I can place a code stating to use http request once and then use another http node and then use another http node after all http nodes are done then use the first one again.

@ihortom Looking forward to have a code like this (currently the provided one is demo not working)

I have attached a video explain what I am looking for and how can I achiueve it

> Blockquote

What differentiates these HTTP nodes? It appears to be just the link. Is that correct?

there are different values in the API token in each http request

So each HTTP node has separate predefined auth? What kind of auth is it?
What do you want to do with data after each request ?

there are API keys and after I get the data i will send the data to google sheets

You can use Switch Node for that. Here is example https://n8n.io/workflows/865-gathering-tasks-in-typeform-and-send-to-clickup/

2 Likes

Love You My man I believe this is the solution will try to use this but can i using this use the first http request after using the last http request

Just count the requests, and start over after the last one, or find a trigger in your data.

I will have to make 405 request using these sort of so will have to automatically switch between 1 then 2 then 3 then 4 then 5 then 6 then again 1 then 2 and so on with changing page as well

Here is a last resort for that. :slight_smile: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/

nah this is not

@Arsh_Tyagi , you still can utilize switch combined with $runIndex variable. You have 7 HTTP Request nodes to iterate sequentially with each new iteration. In practice it means using the expression {{ $runIndex % 7 }} and switch with 7 outputs for the values from 0 to 6 (7 outputs).

Something like this

Does it make sense? No?

Here’s some live example how this logic works.

Pay attention how each new iteration engages the subsequent Switch output (to which you will have one of your HTTP Requests nodes connected).

2 Likes

Thank you my Friend I love you. Sorry was not able to understand what you were saying unless you shared this workflow thank you so much

how do I make it go from 0 to 6 after one batch again after it goes through 0-6 once

It stoped after going thorugh the 7 request but I want this to keep making request

@Arsh_Tyagi , your 7th output has to loop back as well as all of them but you left it “hanging” which breaks the circular rotation.