Enable content approval flows and assign approval tasks
If you’re looking to automate, standardize, and streamline your processes – workflows are just what you need. Power Automate (part of the Power Platform) is a service that allows you to do just that – automate. You have the ability to create automated workflows between your favourite apps and services. If you used it before, you may have noticed that in a Power Automate Flow the “start an approval” action is limited. It does not allow you to select Microsoft 365 or Active Directory Groups in the “assigned to” field so that multiple people can take on the approval task. Don’t worry – we’re here to help. This post will guide you through enabling Power Automate content approval Flows in a SharePoint Online Page Library and assigning approval tasks to users in an Azure AD Group, all using the “Valo Intranet” digital workplace solution software.
Steps to enable Power Automate content approval Flows
This may seem like an overwhelming task to accomplish, but we’ve broken it up into a list of easy steps for you to follow.
1. Enable page approval flow
First, we are going to enable page approval in the “site pages” library. To do that, go to the site pages library. Click on Automate> Power Automate> Configure page approval flow.
2. Create a Flow
On the right corner of your browser, you will notice a tab appear. Click on “create flow” to continue the wizard. The wizard is a built-in custom connector that allows you to connect functions in Power Automate.
3. Create the connections
The wizard will automatically create the necessary connections for the flow. Click on “Continue” to create these connections.
Note: By default, these connections will use the current user’s credentials to connect. It is recommended that you go ahead and change these connections to use a service account.
4. Name your content approval Flow and set approvers
In this next step, give your content approval flow an appropriate name (e.g. “Intranet Page Approval”). In the “approvers” section, if you try to select an AD (active directory) group it will not allow you. So, let’s just select any user as a temporary approver. Don’t worry, we are going to change it later. For now, just set a temporary user as an approver. Click “create” to create the flow.
5. Open the new flow
Now if you log in to https://flow.microsoft.com, you should find the newly created flow in the “my flows” section. Click on the flow and open it.
6. Edit the approval task
We need to modify the flow to set members of an AD group to receive the approval task. Here we have an Active Directory group called “Valo approvers” and we are going to assign the approval task to all the members of this group. Click on “edit”.
7. Edit your content approval Flow
Here, we have an example of a Flow. The first step (“for a selected item”) of the flow is the trigger. Add a new step after this step.
8. Initialize a string variable
In this step, we are going to initialize a string variable to store the approvers and separate them by a semicolon. Select “initialize variable” in the action.
9. Edit the “Initialize Variable” step
Set the variable name to “approvers”, type as a “string” and leave the value blank.
10. Add members to the initialized variable
We are then going to fetch the members from our Valo approvers AD group and store them in the variable that we just initialized. To keep the flow tidy, we are going to define and add all these related actions in a Scope. In case you’re wondering, a scope is an action that groups other actions inside of it. Note, that we have kept the “initialize variable” action out of the scope so that we can access this variable anywhere in the flow. Let’s add a new Scope, by adding a new action after the “initialize variable” step.
11. Add group members
Inside of this newly added scope, add a new action and select “get group members” in Azure AD. Note: if you have not used Azure AD action before, you will have to provide the credentials that have read/write access in Azure AD. If you do not have this credential, you can ask your tenant administrator to create a new connection for you.
12. Enter Group ID
In this action, you will have to provide the object Id of the “Valo approvers” group. If you have access to Azure AD, you can find the object Id by opening the group. If you do not have access, ask your Azure AD administrator to provide you with the object Id. Once you have the object Id of the group enter it in the “group Id” field.
13. Add a loop
Next, we are going to add a loop. A loop will allow your software to repeat one or more actions multiple times. Add a new action and select “apply to each”.
14. Change the output
In this action, select “group members” in the output.
15. Add a new action
Within the “apply to each” action that we previously created, add a new action and select “append to string variable”.
16. Edit the approvers variable
Select the “approvers” variable that we initialized in step 9 and in the value section select “group members mail” and add “;” in the end.
17. Enter a formula into the value section
Below is the exact formula that you want to enter. In the end, your screen should look similar to the image shown below:
18. Add approvers to the “assigned to” section
Now, that we have all the approvers stored in the “approvers” variable, the last thing left is to set this variable in the “assigned to” field. To do this, expand the Scope, find the action that says, “start an approval” and change the “assigned to” value to the “approvers” variable.
19. Save your workflow
Your final workflow should look like this. The highlighted section shows the new steps that we added. Save the workflow and test it out to make sure it’s running fine.
By following these steps, you will be able to enable your Power Automate content approval flows and assign approval tasks to users. With Power Automate you are capable of consistently bettering the way your organization runs by automating tasks and taking some of the work off of your plate. Need a hand getting started with Power Platform? Book us for a free Power Apps conversion assessment and receive the plan to automate one of your annoying tasks, no engagement required!
Fill the form below to be added to our mailing list. We will send you our monthly (we promise) newsletter, filled with trending technology information, productivity tips, articles and the scoop on our events.