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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,348)