How To Get Approval Comments In Power Automate
How To Get Approval Comments In Power Automate Posted by - Matthew Devaney on - August 18, 2024 18 Comments Power Automate approval comments can retrieved fr...
- 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/how-to-get-approval-comments-in-power-automate/. Author: Matthew Devaney.
How To Get Approval Comments In Power Automate Posted by - Matthew Devaney on - August 18, 2024 18 Comments
Power Automate approval comments can retrieved from an approval action and copied into a SharePoint list or document library. The tricky part is comments are stored inside of an array due to approvals having multiple potential approvers. We must convert the the array of of comments into multiple lines of text and then it is possible to write the comments back to SharePoint. Table of Contents
Introduction: The Approval Flow With Comments Setup The SharePoint Document Library
Build A Power Automate Flow To Get Approval Comments
Run The Power Automate Flow To Get Approval Comments
Introduction: The Approval Flow With Comments
Managers at a food distribution company use Power Automate to obtain invoice approvals. They can leave comments on an approval to ask for more details.
When comments added are to an approval Power Automate updates metadata for the file in SharePoint to include the comments. 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) Comments (multiple lines of text)
Build A Power Automate Flow To Get Approval Comments
Open Power Automate and create a new automated flow. Trigger the flow when a file is created in SharePoint and add an action to start and wait for an approval . Once the approval is accepted or rejected by the approver(s), the approval comments will be returned to Power Automate as a property of the start and wait for approval action.
Approval comments are stored in an array because one or more approvers can respond to an approval. We want to convert the array to multiple lines of text. To do this, we add a Compose action with the Responses Comments as an Input. Then Power Automate places it inside an Apply To Each action to operate on the array of comments values.
Then we add a SharePoint – Update File Properties action and use this code in the comments field to convert the comments array into multiple lines of text. The decodeURIComponent function is used to add each comment on a new line.
join(outputs( 'Compose:_Comments' ),decodeUriComponent( '%0A' )) Code language: JavaScript ( javascript )
Run The Power Automate Flow To Get Approval Comments
It’s time to test the flow we’ve built. Turn the flow on and place a new file into the SharePoint document library.
The approval is sent the approver in Microsoft Teams. The approver writes a comment and selects approve.
Then the Power Automate flow updates the approver comments alongside the document in SharePoint. 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 How To Get Approval Comments In Power Automate 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
Have a Microsoft 365 topic idea?
Share article suggestions, community session ideas, corrections, or real-world scenarios for future nextM365 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