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 Apps / How to mark the flow a...
Power Apps
Suggested Answer

How to mark the flow as success even if an action fails inside "do until" in power automate?

(0) ShareShare
ReportReport
Posted on by
I've created a flow to send drip messages on whatsapp based on the data present in an excel sheet. In said flow, if the "Get Next Template" doesn't return a row, that means that the Drip campaign is complete for said contact. And the flow is working completely fine.
However, power automate marks the whole flow as failed when the data goes in the run after: failed side of the flow. How to prevent this from happening? I tried using terminate but it doesn't let you add terminate inside do until.


I'm adding a screenshot for more information.
Categories:
I have the same question (0)
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Sorry, I think it's not possible to use Terminate inside a Do Until.
     
    The only workaround I can think of for now is to:
     
    1. In your Do Until (you may have to use "Edit in advanced mode" for this) turn your Do Until into your original condition, OR a check for a specific boolean variable (so it checks for whether your original condition OR this other new variable condition is met.). The other condition should simply check if a new variable you define is "true" (no quotes, actually it should be specifically an expression value). You may need to use a Set variable "yourNewVariable" to "false" right before the Do Until so it knows the variable exists, and to make sure it's false as well before going into the Do Until.

    2. In the Run after (previous has Failed) branch, use a Set Variable block to make that other Do Until's condition "true" (again, no quotes, actually it should be specifically an expression value). so it gets out of the Do Until.

    3. Right after the Do Until, using an If node, do a check for that variable, and if it's true, on the If yes side, have your Terminate succeeded block there.
     
    Besides the above, I am not sure of another way.
     
    It might be a good idea to have this as a suggestion for improvement, to be able to use the Terminate block inside a Do Until. 
    You may go to https://ideas.powerapps.com/ to search and upvote similar ideas, and if it's not there, you may post it yourself.
    If you don't find any similar ones and created one, let me know so I could upvote it.
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at
    The action that may fail cannot be the last action in the loop. Add another (potentially meaningless) action after yours and configure its "run after"  for all four scenarios.  That way your failed action won't stop the flow.
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    If you want to stop it from marking it as failed, don't use parallel paths to decide baed on Run After. Use a condition.
     
    instead, since you KNOW it nots returning a row
     
    Use the Get Row in a Table
     
    Then use a Condition
    and in the Condition, check the Length(dynamic returned body/value of the Get Rows or wahtever you did)
     
    if the length is zero, it won't come across as failed so just set your condition to
    Length(XXXX) is equal to 1
     
    in the 1 aka left side, put your current Success stuff
    in the right put your current stuff
     
    Bingo now its not going to say it failed.
     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard