Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Creating a new variable with output of HTTP API call in each loop in Do Until loop



I am trying to fetch a data from API in Do Until step. The idea is to run the loop n times, n can reach up to high numbers like 3000, each time the HTTP API query would fetch an output which I would like to save in a new variable, then increment n by 1. I was thinking about initializing a variable before the Do Until with blank value and make the name of the variable depend on n but apparently I cannot use expressions in the name field:




The outputs are in json. While I am stuck at this part already, my next goal would be to merge them all together into one json as they have the same schema. I believe union() expression can help me achieve that but then another issue might occur - how to list all outputs in the union() expression if their number might vary.




If it is possible to avoid any additional loops that would be great.


Appreciate if I could get some ideas from you all. 

Solution Sage
Solution Sage

Hi @Radek1 ,


You can look into appending each response into an array variable.  


The Do Until action allows you to set the iterations without incrementing a counter manually.


If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up


Helpful resources

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,730)