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

Announcements

News and Announcements icon
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:
  • eric-cheng Profile Picture
    5,171 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard