Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Stop "Do Until" as soon as condition is met

(0) ShareShare
ReportReport
Posted on by 17

Hello,

 

I have a flow that sends an email out and starts an Approval when a form is submitted. There is a parallel branch to the Approval and email with a delay, an Item created in a SharePoint list, and a "Do Until" action to send a reminder email every 5 days until the Approval is complete. The list is for follow-ups and tracking of employees who don't respond to the Approval, and there is an action to update the list once the task is complete. 

 

I'm having two problems.

 

Once the Approval is complete the Do Until continues to run for the set interval period, sends an email, and then completes the flow. This is the opposite of what we would really like to see; we need to have the Do Until stop as soon as the Approval is complete so that it won't send another email and will immediately update the SharePoint list. 

 

Basically, is there a way to have the Do Until stopped/finished as soon as the Approval is complete, and then further have the item in that branch also updated? For clarification, this is what it looks like:

Annotation 2024-03-18 131745.png

 

I tried moving the Update Item action to the Approval branch but Power Automate won't allow me to use the ID from items created in a different branch.

 

Any help with this would be sincerely appreciated! 

  • PatBof Profile Picture
    6 on at
    Re: Stop "Do Until" as soon as condition is met

    Hello,

    I made it, creating a child flow in which I put all the actions you have in the right branch of your main flow (in the red square)

    PatBof_0-1714130836957.png

    Example : 

    PatBof_1-1714130898231.png

    This will ensure that the main flow is not blocked.

    Best Regards,

  • mbowline Profile Picture
    17 on at
    Re: Stop "Do Until" as soon as condition is met

    Thank you for the input! The "Task marked complete" action is the variable being set to true, but it doesn't immediately stop the Do Until loop. The loop continues to run until its next interval (set to 5 days), performs its action, and then stops. I've had employees come back to me telling me they're getting a reminder email even though they completed the approval and it's very frustrating. 

     

    With regards to using a variable to pass the ID, could you please explain how that might be done? I'm not very fluent with variable usage. 

     

    Thank you so much!

  • v-bofeng-msft Profile Picture
    on at
    Re: Stop "Do Until" as soon as condition is met

    Hi @mbowline ,

     

    Q1:

    Once you set the variable "approvalDone" to true after the approval is completed, the 'do until' loop should stop.

    Q2:

    You could consider initializing a variable to pass the ID, similar to how "approvalDone" is used to pass the approval result.

     

    Best Regards,

    Bof

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,601 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow