As Microsoft recently announced the upcoming retirement of SharePoint 2010 workflows we have seen a lot of questions about how to transition away from them before November.
In this post I will configure the Power Automate template “Request approval in Teams for a selected item in SharePoint” as a replacement for the SharePoint 2010 Approval workflow to manage Approvals in a SharePoint list or library. This is all being done in SharePoint Online inside a Microsoft 365 (Office 365) tenant.
The template will allow a user to Request approval for a specific item in a list or library. This approval will be requested via a Teams chat message, and the recipient can do the entire approval within the Teams chat.
Please be aware that this is just our preferred option for Approval using Power Automate. If you are not yet using Teams or Power Automate yet, please contact us for further information.
You should note that Power Automate will run the flow as the account which configured it, so if you have the ability to log in to a Shared Admin or Service Admin Account to configure shared workflows, then it may make more sense to do so. The account used will need to have Approval permissions on all content to be approved by the flow.
Important: Before implementing this in your Microsoft 365 environment, please ensure the SharePoint Online list or library has been configured for Approval.
Prerequisites: Microsoft 365 (Office 365) tenant access with licenses (such as M365 E3 or E5) providing access to use SharePoint Online and Power Automate.
Click Automate in the library menu, then under Power Automate choose Create a flow:
This will open a panel on the right of the page which lets you choose a Template. Choose the Request approval in Teams for a selected item in SharePoint template from this panel. This will open a new tab and take you to the Power Automate portal and load the template you clicked. Scroll down a bit to see the services this flow needs to connect to - in this case they are all Office 365 services so you should only have to wait a second to be authenticated to these services. Once each service shows the green tick icon, click Continue at the bottom to start configuring the flow:
When you first see the workflow steps it may appear a little complex, but there are only a few sections that we need to look at. If you click on the coloured header of each box you can minimise them all to see the overall structure of the flow:
Each step has a name in the coloured bar so that we can easily refer to them in this guide. First, open up the steps For a selected item and Get item and ensure that the Site Address and List Name have been populated - this should be automatic as long as you started from the Library menu - if these are not shown you can enter them manually, or create the flow again from the correct library. Note that the "List Name" in this case will usually display a GUID when auto-populated - this is fine:
The steps provided by the template are now configured, but there are some important additional steps to control SharePoint approval that are not included in the template, so we need to add them.
- Choose the Action "Approve",
- In the Comments field add the Responses Comments Dynamic Content,
- In the ETag field add the ETag Dynamic Content from the Get file metadata step:
If you followed the steps above, you have now configured a flow to request the approval in Teams, and added steps to the flow to manage the SharePoint Content Approval status based on the outcome. You can now start testing!
If you need to add more steps to your flow, such as customising the messages shown to approvers during the process, creating SharePoint list items to store auditing information, or performing other custom actions or calls to Web Services, this is entirely possible using Power Automate and may be covered in future articles, for example adding a Send email step and creating a custom message using data from the dynamic content supplied by the other steps in the flow.
If you have a large number of document libraries that require approval you could configure the above flow using parameters to allow it to be called using a simple trigger flow in each library, however this will require some additional steps which are not covered here.
A brief description which highlights the value of the offer and how it addresses the visitor's needs, interests or problems. Bullet points are a great way to show what they will be getting from the offer whilst italics and bold text can emphasize key points.