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

do until

Hi everybody,


I am trying to set up a flow with a "do-until" loop.

The flow starts with a HTTPS-Get request, which gets replied.

I want do repeat the Request till "orderstate" in the body becomes "201"


    "objectname""NFH 1",
    "destination""Wien, Gasse 11",
    "orderstate_time""14.03.2018 08:37",
    "orderstate_postext""Wien, AT",
    "orderstate_msgtext""Auftrag : erledigt",
    "street""Gasse 11",


How do I have to put it in the "Do until" Loop.

At the moment I have @equals(body('HTTP')['orderstate'], 201) - which doesn´t work


Thx for your help


Why Don't you initilize a variable and then inside your loop set the varibale to the order state. Then in you do until condition you just need to add the condition depending on the variable.

What would that variable look like?

Please add an action called initialize variable near the top of your flow


then use a Set Variable  action to set the variable to the bit of data that you want using the Dynamic content

I followed your advice an got a variable with the data i wanted:



The "do-until is:
@equals(variables('OST'), 201)
But it still doesn´t work...
Community Support
Community Support

Hi @Matt_Vie,


Could you please share a screenshot of your flow's configuration?

Could you please show more details about the error message?


I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:7.JPG

Within "Do Until" action, click "Edit in advanced mode", type the following formula:

@equals(body('HTTP')?['orderstate'], 201)

Click "Change limits", Count property set to empty (default value of it is 60).


The flow works successfully as below:8.JPG



When the value of "orderstate" key changes into 201, the flow works well as below:9.JPG




If you could provide more details about your scenario, we would provide a proper workaround for you.


Best regards,




Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey Kris,

I created a new Flow following your instructions and get this error message:


InvalidTemplate. Vorlagensprachausdrücke für Aktion "Wiederholen_bis" in Zeile "1" und Spalte "878" können nicht verarbeitet werden: Der Vorlagensprachausdruck "equals(body('HTTP')?['orderstate'], 201)" kann nicht ausgewertet werden, weil die Eigenschaft "orderstate" nicht ausgewählt werden kann. Arrayelemente können nur mit einem Ganzzahlindex ausgewählt werden. Weitere Informationen zur Verwendung finden Sie unter
The Flow looks like this:


Sorry, but I can´t attach pictures in this post and don´t know why...

Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,161)