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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Do until with an http ...
Power Automate
Unanswered

Do until with an http loop

(0) ShareShare
ReportReport
Posted on by 85

I'm making a rest api call which takes some time to get data back.  While the data is processing, initially you get a 404 and then it changes to 200 but not all of the data is returned until about 30 seconds later.  

While getting the 200's but still waiting for the data, the "Result" array is empty.  Once the data is finally available, the Result array populates.  

I'm trying to set up a do until to loop until the Result array is populated but having trouble figuring out the condition to check for.  I initially was checking for a 200 status but after the initial 404's, it'll return 200's for awhile while the Result array is still empty so that didn't work.  I'm ultimately trying to check to see if there's at least one array member in Result before going to my Response step.  Tips?

Thanks in advance!

 

flow.png

Here's my JSON schema:
 
{
    "type""object",
    "properties": {
        "Status": {
            "type""string"
        },
        "MoreResult": {
            "type""boolean"
        },
        "Result": {
            "type""array",
            "items": {
                "type""object",
                "properties": {
                    "Title": {
                        "type""string"
                    },
                    "UpdateId": {
                        "type""string"
                    },
                    "KBArticleIDs": {
                        "type""string"
                    },
                    "SecurityBulletinIDs": {
                        "type""string"
                    },
                    "Categories": {
                        "type""string"
                    },
                    "Device": {
                        "type""string"
                    }
                },
                "required": []
            }
        }
    }
}
Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @russrimm1 ,

    I'm not sure if there's a better way to wait for the response, but looking on the flow, if the 'HTTP 4' action is the REST API call then you would repeat the call with every loop (every 2 seconds).

    Also, shouldn't the condition to check the array be the other way around, 'If empty(..) is equal to true' (the array is empty), wait another few second? As it is now, if the array is empty (the expression result = true) it'll end the 'Do until', if it's not empty (expression result = false) it'll wait 2 more seconds.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard