Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

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

Super User
Super User

Re: do until

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.

Level: Powered On

Re: do until

What would that variable look like?

Super User
Super User

Re: do until

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

Level: Powered On

Re: do until

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 Team
Community Support Team

Re: do until

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.
Level: Powered On

Re: do until

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


New Ranks and Rank Icons in April

Read the announcement for more information!


Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,902)