cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sbgoh
Helper V
Helper V

Capture error from flow

Hi,

My flow fail and is there a way to capture the error and email to the recipient?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jcook
Super User III
Super User III

@sbgoh 

 

Ops sorry you have to use the expression result( )

 

this expression does not show up in the list of expressions but works the same as the actions( ) expression. See below:

Jcook_0-1597680015802.png

 

Here is the outputs from this expression in Compose 2

Jcook_1-1597680072497.png

 

 

 


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

Jcook
Super User III
Super User III

Hi @sbgoh 

 

You want to put the Action name in the result expression. In my example I am using a scope to put all my actions inside. This is because if any errors happen inside the scope, my result() expression will pick up the error.

 

Using the actions() expression will only give you the generic error message ie:

“An action failed, no dependent actions succeeded.“

 

Where using the result() expression you get the actual error code ie:

“The variable of type Boolean cannot be evaluated because the value being passed is of type integer.”

 


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

5 REPLIES 5
Jcook
Super User III
Super User III

Hello @sbgoh 

 

You can use the expression called actions( )

You will want to put all actions into a Scope, like a Try Catch Finally structure.

 

Here is an example:

Jcook_0-1597679107062.png

.

Some context:

Scope - Try = Where all my actions that will run normally with success

 

Scope - Catch = Will only get triggered on a failure from the scope - try. This is done by enabling configure run after. Click the 3 dots on the Scope - Catch action and click configure run after and check failure

 

Jcook_1-1597679232378.png

 

Here is the outputs of my Compose action:

Jcook_2-1597679392136.png

 


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





Jcook
Super User III
Super User III

@sbgoh 

 

Ops sorry you have to use the expression result( )

 

this expression does not show up in the list of expressions but works the same as the actions( ) expression. See below:

Jcook_0-1597680015802.png

 

Here is the outputs from this expression in Compose 2

Jcook_1-1597680072497.png

 

 

 


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

Hi Jcook, what should I input in the "result" expression and why I cannot use action?

Jcook
Super User III
Super User III

Hi @sbgoh 

 

You want to put the Action name in the result expression. In my example I am using a scope to put all my actions inside. This is because if any errors happen inside the scope, my result() expression will pick up the error.

 

Using the actions() expression will only give you the generic error message ie:

“An action failed, no dependent actions succeeded.“

 

Where using the result() expression you get the actual error code ie:

“The variable of type Boolean cannot be evaluated because the value being passed is of type integer.”

 


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

That is really a big chunk of error message if I get the result from try scope.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (18,776)