Building a Modern SharePoint Solution: Part 7 – Creating a Multiple Approver Microsoft Flow

In my previous post I showed how to set up a flow to execute manually and not on an add or change event. I have a reason for that we will get to in a future post, but for today I am going to cover creating a multiple approver Microsoft Flow. In our requirements we have both a project\event approver as well as a manager approver. One thing you don’t see on the form, but was mentioned in the requirements is the need for communications to also approve. This will be going to a generic account (for now) that anyone in the communications team can deal with. The process is the flow will request approval from the project approver first, then the manager and finally communications cause they are not checking for content just grammar and such. No sense including them until the other approvers are ok with the message.

Creating a Multiple Approver Microsoft Flow

You can create this as an automatically starting workflow when an item is added to a list or any other trigger for that matter that works for your needs. In my case I am actually going to have it kick off manually. You can view how to do that in my previous post. From this point on I am going to assume you have already started to create a workflow. I am just going to discuss the part around setting up the approval process. Since I am going to be using data from that item. The first thing I want to do is gather data from that item.

Click on Add Action.

Select SharePoint from the category and choose Get item.

Enter in the site, list and ID (from the Dynamic Content again). This is because we want to read the data from our current item into the flow.

Next we are going to add another action. In the search, type Approval. As of the writing of this post, you will get two options. You want to choose one that is called Approvals

Next you are going to select the type of approval you want. You can allow it to complete if any one approves it (from the approval list of course) or you can set it to wait until everyone approves it. With that option, if one person rejects it rejects the entire flow. I am going to select the option that states everyone has to approve it. This allows me to put multiple approvals into one action on the Flow. Because there isn’t any discerning factor to have the project approver complete it before the manager we can cut down on the number of actions in the flow. I still want to separate out the communications group because we don’t want them doing any work on it until the “Powers that Be” agree the message is ok.

Select “Everyone from the assigned list”.

The action will now expand with further details to be entered.

Now let’s build the title. What’s great is we can use details from the list item to build this out. So I create the following (italicised text is a value from dynamic content): “Created by DisplayName is requesting approval to create a tweet” (make sure you add a space after the value).

Next I want to add the two approvers. So from my content (notice how it automatically filters allowable values for you) I am going to select Approving Manager Email and Project Approver Email.

I am going to add details about the request to the approval action. You can add any variables you want as needed. I am going to include the summary in my message.

I will also provide a link to the item (from dynamic content again) in the item link field. You can provide a description for the link as well. Like: “Click here to view the item being reviewed.”

Next add a condition to the flow.

Select Response -> is equal to -> Approve.

Next we want to add the items for the response being granted. In the “Yes” branch (green on the left) we want to start another approval for the communications team this time since the managers have approved it. Click on Add an action

This is going to go to one account (Communications) so you can use any option for the approval type.

Basically you are going to perform the same steps of adding an approval within the yes branch as you did before, but this time assign to the communications team. Repeat steps 3-8. Change the assigned to” to the communications team. I also selected anyone can approve from the assigned list this time.

We have one final step to accomplish in this flow and this is to let the initiator know their tweet was rejected.

On the right hand side of the condition in the red branch we are going to create an email action to send to the user letting them know. Click on Add an action in the branch. If you type “email” in the search you will get a lot of options. The option we want is Office 365 Outlook – Send an email.

Fill in the fields as required. There are advanced options if you want, but the basic is all I needed for this demo.

Some Parting Thoughts

In this flow, I chose to do the initial approval step as one action instead of multiple. While this streamlines the process a bit, it actually makes things much harder to track and report (automatically). You could go into the flow itself and see the responses, but if there are multiple, it would be harder to update a field with comments from a single task. This is why you may want to separate the approvals out into their own actions. You can do it in sequence or in parallel. The choice is yours.

In the next post, we will finish up our flow by sending out our tweets, updating the list and sending notifications out.