i’m having an input
[
{“id”: 1}, {“id”: 2}… 998 more
]
im trying to use option batching, to basically send 10 requests (each with 100 ids) in a single call (basically im doing batch get with 100 ids inside a json body).
I was able to solve this by using “Loop Over Items” with batching 100 and then using Run only once on the http node and $input.all in a request body.
Im trying to solve this without using Loop Over Items… is this even possible?
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!
I tried batching option and all seem to work as expected. Below is the demo workflow and the screenshot showing the result of such operation.
There are 5 items for simplicity. The batch is 2 items with 1 min delay.
You do not need Loop for that either. I do not know what ID1 and ID2 imply but they could be added to your items before you feed them into HTTP Request.
Though, it you want the batch number to be included with each item POSTEed with HTTP Request node then yes, using the Loop makes sense as looping that way implies many iterations and each one could be labeled by means of $runIndex variable.