web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding Error Handling ...
Power Automate
Answered

Adding Error Handling Mechanism in Flow

(0) ShareShare
ReportReport
Posted on by 2

Hi Everyone,

 

I am building a flow with Error Handling Mechanism by referring to Reza's tutorial here: (16) Error Handling in Power Automate flows | Try Catch Scope Action - YouTube

 

I have created a scope where group of actions gets performed and in next step I have created another scope where i have added actions as below 'Filter Array', 'Create HTML Table' and 'Send Email' to send email when the flow fails. Below some of the snaps for reference.

1.JPG

 

 

Below the snap where i have configured the error handling part.

2.JPG

 

But in the email i am getting the error message at the scope level and not the action level. I mean i want the error message of the specific action which has failed and not the scope. Below the email presently i am getting.

Email.JPG

 

Can anyone please help that how can i get the action error message in the third column instead of the scope error message?

 

Thanks in advance.

 

Akshay

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    You can add error handling both at a scope level or inside the scope. You must have added it at a scope level.

    SudeepGhatakNZ_0-1679517937066.pngSudeepGhatakNZ_1-1679517972081.png

     

     

  • AkshayManke Profile Picture
    2 on at

    Hi @SudeepGhatakNZ,

     

    In case if i add it inside the scope then also it is showing the same error message which is at the scope level. 

     

    If i add inside the 'Apply to Each' action then it is sending number of emails regardless of actually failed items, because it is looping for every item in the 'Apply to Each' action.

     

    I need a solution where the error handling mechanism should stay out of the scope, but it should precisely mention the error message from the scope or inside any specific 'Apply to Each' loop.

     

    Thanks and Regards,

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Place the email action below the the action that errors out and then set the Run after condition on the email action to "On failure".

    Doing so, the email action will only run when the action failed and you can capture the exact error from the body of the failed action.

     

  • AkshayManke Profile Picture
    2 on at

    Tried this as well just now but not working out as expected.

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Is it sending multiple emails or is the error message not accurate?

     

  • AkshayManke Profile Picture
    2 on at

    I have both observations.

  • AkshayManke Profile Picture
    2 on at

    I am still looking for the solution on this please. can someone please help?

     

    Thanks and Regards,

  • Chriddle Profile Picture
    8,691 Super User 2026 Season 1 on at

    I think you are looking for the result function.

    https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#result

  • AkshayManke Profile Picture
    2 on at

    Hi @Chriddle, thanks for the help however i am using the same result expression to get the details. However i have 'Apply to Each' loop and the error i am getting inside the loop. When i am using the result expression it is giving the error at the scope level and not at the 'Apply to Each' level, hence i am not able to get the exact error details. I have specified the case in my first message in the thread. Is there any way using i can get the error details which are there in side a specific 'Apply to Each' action which is inside a scope.

     

    Appreciate your help.

     

    Warm Regards,

  • Chriddle Profile Picture
    8,691 Super User 2026 Season 1 on at

    Not in a generalized way addressing the Fetch scope.

    However, addressing the Apply to each works:

    result('Apply_to_each')

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,005

#2
Valantis Profile Picture

Valantis 825

#3
Haque Profile Picture

Haque 619

Last 30 days Overall leaderboard