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 / How to write the error...
Power Automate
Answered

How to write the error details into the database?

(0) ShareShare
ReportReport
Posted on by 2

What I need is for anytime a process fails, the actual error details data to be written into a SQL table.

vinit_598_0-1665121965111.png

How should this be done?

 

Categories:
I have the same question (0)
  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    Hey @vinit_598 

    You can add the particular action where you are getting the error in a scope action.

    Then make a parallel branch after the scope action.

    So on the left side, the flow will go normally and on the right side, add a compose and add the result of the scope to it. Syntax of expression: result('Scopename')   [Note: Default->   result('Scope')]

    Then after this go to settings of the right hand side compose and change its run after property to failed.

    After this use parse json and pass the outputs of the above compose in the generate for sample of parse json action. After that you can add the status that you are getting from in the sql action and save it to your database.

     

    From result function, you get many important things like action name, inputs and outputs of the action. Final status successful or failed. And many other things as well.

     

    Sundeep_Malik_0-1665142045436.png

    Sundeep_Malik_1-1665142096809.png

     

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 785

#2
Valantis Profile Picture

Valantis 669

#3
Haque Profile Picture

Haque 563

Last 30 days Overall leaderboard