cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lliu_western
Resolver II
Resolver II

Send an e-mail notification if the flow fails

Hi community,

 

I am building a flow, which it starts with 

 

-when a new row is generated in SharePoint then a triggers the flow in PowerAutomate 

(Side note: PowerApps is the user interface for this whole process, user submits a form through PowerApps and then it generates the row in SharePoint)

 

-Then flow then gets all the information that is required and convert it into JSON form then talks to a web page to submit the form using API

 

there are times when the flow is triggered (haven't had any failure in this part) but for some reasons, the flow sometimes could fail in the part at the step of talking to the website through API and the error would say "bad request". 

 

when it happens (so at the step where http fails) then all the actions after that would stop. I set the e-mail notification action after http, which it doesn't work since the flow stops when the http action fails. 

 

Is there anyway that I can set an action within that flow to send me an e-mail (or I would put the error message within the e-mail action) so I can capture when someone tries to submit a form but the form doesn't actually reach the website. 

 

Thank you in advance for your help, any guidance would be appreciated! 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
Super User III
Super User III

Hello

You can use configure run after setting.

What you can do is have you email action under the part that fails.
Now on the email action click the 3 dots and click Configure run after.
Check the box for failure
And leave all other boxes unchecked.

Now under your send email action( the action below your email) you will want to do the same thing.
Except you will want to check Has skipped.
And leave all other boxes un checked.
Done!

Basically this is saying that your send email action Neill only run if the action above it has failed.
But just doing that will cause nothing under the email action to run unless the email action runs.
So that is why we configure run after as well on the action below the email which we say to run if the send email action is skipped.




—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

4 REPLIES 4
Jcook
Super User III
Super User III

Hello

You can use configure run after setting.

What you can do is have you email action under the part that fails.
Now on the email action click the 3 dots and click Configure run after.
Check the box for failure
And leave all other boxes unchecked.

Now under your send email action( the action below your email) you will want to do the same thing.
Except you will want to check Has skipped.
And leave all other boxes un checked.
Done!

Basically this is saying that your send email action Neill only run if the action above it has failed.
But just doing that will cause nothing under the email action to run unless the email action runs.
So that is why we configure run after as well on the action below the email which we say to run if the send email action is skipped.




—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

Is there a way to add the Error Details to the email? 

StewardsIPP
Frequent Visitor

I'm also wondering if there is a way to include the Error Details in the automated email. It seems that with the addition of sending an email upon a flow failing, that flow is then marked as successful overall, so I'm not sure an easy way to track down the original failed flow and error if I want to utilize the email notification, other than maybe matching the run time with the email time.

this will help your solution

https://youtu.be/byfvtX6yl8k

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (37,655)