Advanced Approval for Selected SharePoint Item

Advanced Approval for Selected SharePoint Item

In today's fast-paced business world, it is essential to optimize all aspects of the workflow. One critical area that companies need to pay close attention to is the approval process. The approval process is essential for businesses as it enables them to make critical decisions, ensuring that all operations run smoothly. However, it is also a process that can be time-consuming and prone to errors if done manually. Therefore, automating approvals is necessary to keep up with the pace of business.

?

SharePoint and Power Automate offer several options for creating and maintaining approval processes. Let's explore them in this article.

?? Additionally, for those seeking preconfigured solutions, a link to my GitHub with one flow described in this article is available at the end.


Option 1 - Modern preconfigured templates

Microsoft recently announced this option - SharePoint lists templates, which include preconfigured list columns and pre-built Power Automate flows to handle the approval process, as well as reminder for you about due date (applicable for the Content scheduler with approvals template only).

This option is an excellent starting point, especially for those not familiar with Power Automate to build a flow from scratch. The templates are accessible in the template section during new list creation.

No alt text provided for this image

However, this feature is still rolling out (ID 100502 ). Therefore, users who cannot access the templates should seek support from their administrators.

?

Option 2 - More flexible Request sign-off for different scenarios

Two new templates are awesome. They literally allow you to launch the approval process in a few clicks for the specific business task (travels or content). But what if you have your own business case where you would like to automate approvals?

No worries! You can leverage the feature that Microsoft announced several years ago - Request sign-off. It is a ready-to-use integration with Power Automate available for any items or files.

It is a more flexible solution for automating approvals in different scenarios and can be used in any templates or SharePoint lists (or document libraries) created from scratch.

Just select an item/file, open menu, choose Request sign-off, add approvers and that's it. The approval process will be started and you will see the status in your SharePoint list.

No alt text provided for this image

?

Option 3 - Advanced Approval with collecting all metadata

The previous two options are excellent. But I'm missing in these options the ability to store approval details in the SharePoint list. Modern templates and Request sign-off are storing just status and approvers. If we are looking for approver's comments, we have to go to the Teams dashboard,?which is not always straightforward.

So, what if we want to launch approval process for any selected item and at the same time to store all information from approval process in our SharePoint list? Should we build a Power Automate flow from scratch?

Don't panic! There are several templates for you as well. And in this article I'm going to show you how in a few clicks you can adjust these templates according to your specific needs.

Step 1. Prepare your SharePoint list

No matter what kind of list you are using - created from scratch or from a template. You will need to add 3 columns where we are going to store information from an approval process:

  • Approver (Person or Group)
  • Status (Single line of text)
  • Comment (Multiple lines of text)

Step 2. Find a right template

First of all, open the portal https://make.powerautomate.com , go to Template tab, enter sharepoint in the search field and switch to the Approval tab. You will see a lot of different templates (with different actions) where both SharePoint and Approvals are in place.

No alt text provided for this image

Select a template that suits to your needs. I'm going to use Request approval in Microsoft Teams when a SharePoint item is created.

Step 3. Add a drop of magic to the flow ??

1. As you can see the trigger for this template is When an item is created. Not exactly what we wanted. Let's replace this trigger with For a selected item.

Literary delete existing trigger and add a new one.

2. Fill out Site Address and List Name fields. Add an input.

By adding an input, we configure fields that a user must fill out before starting the approval process. You can ask the user for approvals, any comments, wait a response from everyone or not, etc.

In my example I'm going to add just 1 filed to collect approvers emails.

3. Add Site Address, List Name and Id to the action Get item. For the Id please use the dynamic content.

4. Configure the Create an approval (V2) action

- Select the Approval type

- Add the Title

- In the field Assigned to select the input field you added in the trigger (in my example it is Email)

- Add Item link and Item link Description

For the Item link you can combine the static text and dynamic content. For static text copy your list URL (in my case it is https://microsoftcda.sharepoint.com/sites/PowerPlatformApps-DEV/Lists/Approvals ). Then add the static text /DispForm.aspx?ID=. Then add ID as dynamic content. By combining these three parts you will get a direct link to the item for approve.

No alt text provided for this image

- Define Enable notifications value.

If Yes - approvers will receive notifications via email, Teams Activity and Teams chat. If No - approvers will receive only notification in the Teams chat.

5. And now the last step to complete our flow - add an action to store information in the SharePoint list. Add the action Update item. Provide SharePoint site, list, item details, and add dynamic content to your custom fields Approver, Status and Comment.

No alt text provided for this image


Note that for the first time the Power Automate Approval should be installed in the environment.

Installation process is launching after the flow has been run for the first time. Provisioning could take several minutes, up to an hour.

Step 4. Save and test the flow

Once all steps are completed, save the flow and launch it for any SharePoint list item. In my example the flow name is Advanced Approval for Selected SharePoint Item.

No alt text provided for this image

In the pop-up window select approvers (1 or many) and click Run flow button.

No alt text provided for this image

The approval process will be started and approver will receive the notification message in Teams and email. In this card the approver can approve, reject or ask for more information, as well as provide a comment.

No alt text provided for this image

Once the approval process will be completed - information about status, approver and comment will be stored in the SharePoint list.

No alt text provided for this image


??Next steps

Now when you are familiar how to adjust a Power Automate template according your needs, you can go further and add any modifications you would like.

For an example I think it would be worth to see all comments in one column.

I prepare a solution with a flow that we explored above with slightly modification - this flow allows you to store all comments in one column. You can download the solution from my GitHub . It is unmanaged solution, so feel free to modify it.

Additionally, I added environment variables to store SharePoint site and list, so you don't need to fix multiple time these values in the flow, just provide these values during the import process.

?

Conclusion

In conclusion, approval processes are an integral part of today's business operations. To keep up with the pace of business, it is essential to automate approvals and keep all metadata associated with the process. By automating approvals, businesses can save time, reduce the risk of errors, and increase transparency. Keeping metadata associated with approvals helps businesses to manage data effectively, comply with regulatory requirements, and make informed decisions. Therefore, it is crucial for businesses to invest in automation tools that can streamline the approval process while keeping track of all relevant metadata.


#SharePoint #PowerAutomate #Approvals #SharingIsCaring

要查看或添加评论,请登录

社区洞察

其他会员也浏览了