Hi friends, in my Power Automate – Request Manager Approval for a Selected File Part I post we saw how to use the default approval template from Microsoft and also, how to setup the template to make it work with our document library. In this post, let us see how we can enahance the default out-of-box template with more automation and actions.
Focus on the flow
Below are some of the enhancements
Changing the Trigger: Default template has For a selected file trigger which will allow the user to manually trigger the flow. What if there is a requirement such that whenever the users uploads a file to a document library, it should automatically trigger the flow to send the approvals? The option is to use the trigger named When a file is created (properties only). We cannot change the trigger in an existing flow, so we need to create a new flow using the Automated trigger When a file is created (properties only).
Note: Changing the trigger will make you to redesign the flow from the scratch but it should worth since we are automating our approvals instead of manual selection. By doing this we are clubbing two actions into one.
Posting the approval or message via Teams: If the Get manager action is successful, the template is using the action Start an approval to start the approval process and also automatically sends an email. We can also send a message or a task to the user via Teams using the action Post your own adaptive card as the Flow bot to a user. Now the users are able to take action via both in teams as well as from Outlook. How cool is it?
Note: In order to use the Teams for approval, you should change the action Start an approval to Create an approval combined with Wait for an approval.
Response: Once the response is submitted, the default template is sending only an email. You can use the action named Post your own adaptive card as the Flow bot to a user to send the response as an Adaptive Card to the creator and also even as an acknowledgement to the approver.
Reminder: The most important part of the approval is the reminder. Users mostly forget the tasks which is waiting for their approval in which we have to remind them of the duration. We can implement the Reminder feature using the actions like Delay, Do untill, and Wait to check whether the response is submitted or not. If not and if the date is due then send the reminder to the users and we also need to fix the recurrence of how long we need to send the reminders.
Auto Approval: Sometimes there might be case where specific documents doesn’t need to go through any approvals and it can be auto approved once it is uploaded. We can also implement the Auto approval feature based on the document type, content type or document metadata since we have lot of options to choose from.
If someone has ideas please add your suggestions to the comments so that others can make use of it too.