web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating a new variabl...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 12

Hello,

 

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:

 

Radek1_0-1626869621157.png

 

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.

 

Radek1_1-1626869982484.png

 

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

 

Appreciate if I could get some ideas from you all. 

Categories:
I have the same question (0)
  • eric-cheng Profile Picture
    5,171 on at
    Re: Creating a new variable with output of HTTP API call in each loop in Do Until loop

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard