cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BRubble
Frequent Visitor

Flow fails at Move Email action on Outlook.com

Hi,

Sorry if this has been answered but I've searched extensively and not been able to resolve.  I have a flow which is intended to delete superfluous junk mail that has keywords in the Subject or From fields without frequently editing Outlook rules.  The flow steps through a list of keywords in a .txt file on Dropbox and moves the message to Deleted folder if one these words is found.  The flow runs and produces the intended result but, most of the time, I get a failed run with error "An action failed. No dependent actions succeeded."  I checked inputs and outputs and Message ID appears to be the same.  Any idea why or how to resolve?  [You can disregard the fact that I have no idea how get "Do Until" to work despite many tries.]

email flow1.jpg

email flow2.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
VictorIvanidze
Community Champion
Community Champion

My bad, sorry. Place a single space in Value.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

View solution in original post

20 REPLIES 20
BRubble
Frequent Visitor

Hi, Just bubbling this up - any ideas? Thx!

VictorIvanidze
Community Champion
Community Champion

Could you show the error message itself?

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Hi Victor,

Here's a screenshot from a "failed" run.  Thx!

failedrun.jpg

VictorIvanidze
Community Champion
Community Champion

Try to delete instead of moving to "Deleted items" folder.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Thanks, I think I've tried this in the past and found that using Delete Email action results in permanent deletion, does it not?  I'd like to have a failsafe in case I need to find or recover a deleted message.

Understood. It seems you have to fix "Do until" then.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Recreated the flow without the whole "Do Until" loop.  Still works like a charm and throws an error every time on "Action 'Move_email_2' failed".

VictorIvanidze
Community Champion
Community Champion

Make sure that action 'Move_email_2' is executed only once for each message.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

That takes me back to the version with the "Do Until" loop, which is illustrated above.  Anyone have specific suggestions for how to get this loop to operate correctly?

VictorIvanidze
Community Champion
Community Champion

Show your flow without "Do until".

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Thanks, here it is.

flow1 - no do until.jpg

flow2 - no do until.jpg

VictorIvanidze
Community Champion
Community Champion

Dirty fix: Place the action "Terminate" with the status "Succeeded" after move.

Clean fix: Check if the message exists before moving. If exists then move.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Hi Victor.  Tried the "dirty fix" but you apparently can't put a Terminate control inside of an Apply to Each loop (you get error message: "The operation 'terminate' cannot be used inside a for each").  So I attempted the "clean fix" by inserting another condition before the Move action.  I used Message ID to verify that the message exists but the flow still shows as a fail 1 out of every 6-7 runs even though it is working

flow with if exists check.jpg

Would anyone have perhaps more explicit detailed advice on how to fix?  Thanks!!.

VictorIvanidze
Community Champion
Community Champion

Hi @BRubble,

 

sorry I forgot you are moving email inside a for each.

 

Well, place an empty "Set variable" action after "move email". Click on three dots of "Set variable" action.

Select "Configure Run After" and mark all 4 checkboxes.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Set Variable requires a name (of a variable that has been initialized) and it requires a value, i.e. can't be empty.

VictorIvanidze
Community Champion
Community Champion

Semi-correct. Initialize a string variable and name it. Then in the "Set variable" action you can leave a value empty.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

I must be doing something wrong!

 

flow error.jpg

VictorIvanidze
Community Champion
Community Champion

My bad, sorry. Place a single space in Value.

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

Thanks again, Victor!!  So far, this appears to have done the trick.  If I understand correctly, what I've done with this suggested fix is suppress reported failures by using the "run after" step to keep the flow going after Move Email is executed, right?  Wonder why it fails in the first place.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

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