Make request for each Bundle

Hello,

I would like to have a simple scenario where I do a POST request for several IDs.

My endpoint is, i.e https://api.com/open/<id>/

I want to run the same request for different IDs:
123
456
789
000

Currently, scenario runs and it makes first request correctly, but fails on the second because value passed to the HTTP module is now empty.

First execution → POST https://api.com/open/123/
Second execution → POST https://api.com/open//

I have tried basic trigger, array aggregator, iterator etc but cannot do it anyhow…

Hey there, this is easily possible if you iterate through the IDs properly. Use the ID from the iterator module in the http module.

  1. Module that gives the ids as results
  2. Iterator
  3. HTTP

You would have to post screenshots if you want more detailed help, otherwise I don’t know what’s going wrong.

Thank you, here is what Im trying:

Input data:

  1. Basic approach, since Basic trigger can provide separate bundles:


    Second execution is empty.

  2. Second approch, building an array and iterating:



    Only first bundle has value.

I have found out!
Easiest way is to make 1 item with separate entries in Basic Trigger.
After this, Iterator and a function to produce an array from items:
{{add(emptyarray; 1.1; 1.2; 1.3; 1.4)}}

Hello @Tyburek_Dawid,

You really shouldn’t even need Basic Trigger. Just start with an Iterator and use the same add() function, like this:

Or like this:

Here split() creates an array and Iterator creates a bundle from each element of the array.

Comes down to preference I guess!

This is just perfect, thank you!

1 Like