Skip to main content
Power Automate
    • Connectors
    • Templates
    • Take a guided tour
    • Digital process automation
    • Robotic process automation
    • Business process automation
    • Process advisor
    • AI Builder
  • Pricing
  • Partners
    • Blog
    • Documentation
    • Roadmap
    • Self-paced learning
    • Webinar
    • Business process and workflow automation topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Microsoft Power Automate Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Automate
    • General Power Automate Discussion
    • Using Connectors
    • Building Flows
    • Using Flows
    • Power Automate Desktop
    • Process Advisor
    • AI Builder
    • Power Automate Mobile App
    • Translation Quality Feedback
    • Connector Development
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Galleries
    • Community Connections & How-To Videos
    • Webinars and Video Gallery
    • Power Automate Cookbook
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community AMA
    • Community Blog
    • Power Automate Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power Automate Community
    • Galleries
    • Power Automate Cookbook
    • Logging of Actions in Sharepoint. [Inputs, Outputs...

    Logging of Actions in Sharepoint. [Inputs, Outputs, Final Status, Start Time, End Time], Log Errors.

    10-11-2022 01:49 AM

    Multi Super User Sundeep_Malik
    Multi Super User
    488 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    Sundeep_Malik
    Multi Super User Sundeep_Malik
    Multi Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Logging of Actions in Sharepoint. [Inputs, Outputs, Final Status, Start Time, End Time], Log Errors.

    ‎10-11-2022 01:49 AM

    Hello Everyone.

    Do you want to log different actions, inputs, outputs, final status like successful, failed. Or store the start time and end time. Then this is cookbook for you.

     

    • To get the above things for a particular action, you can use the function called Result.
    • Just add a scope action. Inside that scope action put the action you want to know information about.
    • Then after the scope action. Add another compose, and write in it: result('ScopeName'). [Default: result('Scope')]
    • After this run the flow once. Then copy the output you are getting in the latest compose.
    • After this add a parse json action in your flow. In it add the output of compose and in generate for sample just copy what you copied from the flow run.
    • After this use create item to just save the data in sharepoint.

     

          Things to not here:

     

    • You can use the above to log errors to, just make a parallel branch, on left side continue the flow normally and on right hand side, go to configure run after of compose, and set it as when flow has failed.
    • And follow the same steps after that.

     

    Flow:

     

    Sundeep_Malik_0-1665477064239.png

    Formula below:

    result('Scope')

     

    Sundeep_Malik_1-1665477080238.png

    Sundeep_Malik_2-1665477154884.png

     

    In case of logging error:

     

    Sundeep_Malik_3-1665477282245.png

    And set it to has failed.

    Sundeep_Malik_4-1665477309305.png

     

    Output in Sharepoint:

     

    Sundeep_Malik_5-1665477415582.png

     

     

    Benefits:

     

     

    Logging is a good technique to do because the run history is only available till 28 days. You can download the run history on regular basis but you can do this too. You can analyze later, at what output you were getting successful results and at what output you were getting a failed result.

     

    You can add multiple actions in the scope and get information about all the actions that are inside it.

     

     

    I hope you guys will find this cookbook helpful.

    Do comment if you find any difficulty in the above method or have any doubts.

    And if you like it kudos are appreciated. 🙂

     

    Logging.zip
    Labels:
    • Labels:
    • AI Builder
    • Automated Flows
    • Business Process Flows
    • Button flows
    • Desktop flows
    • Scheduled flows
    • Solutions
    Message 1 of 1
    488 Views
    1 Kudo
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign up free
    • Sign in

    Browse

    • Templates
    • Connectors
    • Partners

    Downloads

    • Mobile
    • Gateway

    Learn

    • Documentation
    • Learn
    • Support
    • Community
    • Give feedback
    • Blog
    • Pricing

    • © 2023 Microsoft
    • Contact us
    • Trademarks
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Terms & conditions
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices