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

Community site session details

Session Id :
Power Automate - Using Flows
Suggested Answer

"Do Until" loop until user submits correct email through an approval -

(0) ShareShare
ReportReport
Posted on by
Goal: If the user submits an invalid email address into the form, they will be asked to re-submit through an approval. The loop will re-check after each submission until a correct email is sent.
 
Current Process: Set variable to false > Do Until variable is set to true > get user profile using email address on sharepoint list > if succeeds > set variable to true > if fails > send approval to user to re-submit email address > resubmitted address updates the list

Issue: The Do Until doesn't wait for the the approval to be submitted before re-trying
 
How do I make it so the Do Until only restarts after the approval has been completed and the item has been updated in the sharepoint list?
 
 
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    52,851 Super User 2025 Season 2 on at
    "Do Until" loop until user submits correct email through an approval -
     
    Unfortunately, images are not working, and attachments almost never work either.
     
    If you have a Do Until and you set the Time Out and you set the Value to wait for, and if you have an Approval that is going, it will wait, so I would have to see the flow (can you please share it via some public link with pictures).
     
    So if you go
     
    Do Until X is true, and you start it as false, and the Timeout is set to 30 days(the max) and the amount of loops set to like 60, and you want it to continue (the do until an approval is done or it times out totally as in 30 days later). So you have 3 times TimeOut, 60 loops max and your True/False
     
     
    then you have to do something like the below
     
    Initialize a Variable that is like WorkingState = Started
     
    Do Until
      Add a Condition, the check is WorkingStatus does not equal Completed
     
        Inside the Yes side add a Switch and the Switch will work on WorkingStating
                      The No side, should Exit the Loop (set to True and Completed respective variables)
     
          Case 1 = Started 
                --- Here validate their email
                            Condition, Is email valid
                                Yes, set your variable to True and WorkingStatus = Completed and let do until exit
                                No, set the WorkingStatus to NeedsApproval
                                     Let it exit this action and the Do Until will loop again
     
        Case 2 = NeedsApproval
            Use the Approval Action to Start and Wait (Make sure you use Start and WAIT, not just start or it won't block)
                   Condition is the Outcome Approved
                      Yes, do whatever with email and set variable to True and WorkingStatus = Completed and let loop exit
                      No, it was not approved, either leave all as is and it will send ANOTHER approval or do something else
    loop
     
    This is how you can do what you said. Just read and put in exactly what I said, it will make sense :-)
     
    Cheers

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

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

Coming soon: forum hierarchy changes

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
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow