Power Automate Approval History For SharePoint Files & Items
Power Automate Approval History For SharePoint Files & Items Posted by - Matthew Devaney on - August 25, 2024 2 Comments Logging the Power Automate approval ...
- Published
- Reading time
- 3 min read
Before you start
Is this guide for you?
- Best entry point
- Power Automate
- Time investment
- 3 min read
Imported reference from Matthew Devaney's blog for learning purposes. Original: https://www.matthewdevaney.com/power-automate-approval-history-for-sharepoint-files-items/. Author: Matthew Devaney.
Power Automate Approval History For SharePoint Files & Items Posted by - Matthew Devaney on - August 25, 2024 2 Comments
Logging the Power Automate approval history for a specific SharePoint file or list item is helpful for auditing purposes. We can show a timeline of events for the document, who approved the document and when they approved it. Then we can record the Approval ID to refer back to the Dataverse Approvals table for more information and also create a hyperlink back to the original flow fun. Table of Contents
Introduction: The SharePoint Document Approval History Setup The SharePoint Document Library
Build A Power Automate Flow To Capture The Approval History
Run The Power Automate Flow To Record The Approval History Introduction:
The SharePoint Document Approval History
Managers at a pharmacy use Power Automate to get approval for invoice payments. Once the approval is completed the approval history is logged alongside the document in SharePoint including a timeline of events. Setup The SharePoint Document Library
Create a new SharePoint document library named Invoice Approvals with the following columns Name Approval Outcome (single line of text) Request Date (date only) Completion Date (date only)
Approval History (multiple lines of text) Approval ID (single line of text) Flow Run (single line of text)
Build A Power Automate Flow To Capture The Approval History
Open Power Automate and create a new automated flow. Trigger the flow when a file is created in the Invoice Approvals document library. Add an Approvals – Start and Wait For An Approval action to ask for an invoice approval and collect the response. Then insert a SharePoint – Update File Properties action to write the approval history information to the document properties.
The Approval History is output as multiple lines of text value that includes approver names, the approver response, the request date and the response date.
An Approval ID that holds the unique identifier for the Dataverse Approvals table record is also stored in the file metadata.
Use this expression in the Flow Run field to create a URL that navigates back to the original flow run. Keep in mind the flow run history in Power Automate is only retained for 30 days .
The flow run field is a single line text type but we could also create a clickable hyperlink field in Power Automate with a few extra steps.
https: //make.powerautomate.com/environments/@{workflow()?['tags']?['environmentName']}/flows/@{workflow()?['name']
}/runs/@{workflow()?[ 'run' ]?[ 'name' ] } Code language: JavaScript ( javascript )
Run The Power Automate Flow To Record The Approval History
We’re done. Add a new file to the SharePoint document library to test the flow.
Once the invoice is approved or rejected the approval history is written back to the SharePoint document library metadata.
And the Approval ID can be used to lookup more information about the approval in the Dataverse Approvals table. Did You Enjoy This Article? 😺
Subscribe to get new Copilot Studio articles sent to your inbox each week for FREE Enter your email address Sign Me Up Questions?
If you have any questions or feedback about Power Automate Approval History For SharePoint Files & Items please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion. Matthew Devaney Power Automate
Save Docusign Document To SharePoint With Power Automate
Tagged
Approvals · Power Automate · SharePoint
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nxtM365 learning notes.
Keep learning Microsoft 365
Explore more practical guides for SharePoint, Power Platform, Copilot Studio, migration, automation, governance, and security.
Continue learning
Related tutorials
Related questions
Related comparisons
Next action