Take control of your Microsoft Teams environment part 5

In part 4, we integrated our request form with the SharePoint list, using Microsoft Flow. In this post I’ll cover how to add an approval flow.

approvals.png

We’ll start up by navigating to flow.microsoft.com, and search for something like “SharePoint list”. We’re looking for a template called Start approval when a new item is added.

Since the SharePoint list is connected to the request form, this will allow us to start an approval process as soon as someone requests a team using the form.

approval template.png

The flow will need to connect to a few services, preferably using a licensed service account.

connect to services.png

The template looks quite advanced, but don’t worry, we’ll go through it step by step.

original template.png

Let’s start out by specifying the SharePoint list we created in part 3.

when a new item is created.png

Next up we’ll need customize the template by adding a few variables and gather some information.

Let’s first click the + sign below the first action to add a new step…

new step 2.png

…choose add an action, search for variable, and then choose Initialize variable from the list.

initialize variables.png

Repeat the above step until you have three variables, the type should be String, other than that we’ll leave these for later.

We’ll also add two new actions, one called Get user profile (V2) and one called Get manager (V2).

 

variables and more.png

We’ll choose dynamic content from the SharePoint list, specifically the email address of the user who filled out the request form, which we stored in the Requestor/Owner Email column.

Next up we’ll customize the Start an approval action by adding the Mail attribute gathered from the Get manager (V2) action. We’ll also in Details specify the display name of the requester, previously stored in the Requestor/Owner DisplayName column of the SharePoint list.

start approval action.png

At this point in the flow, an email will be sent to the users manager.

If you prefer that ie. IT handle these requests, just skip the Get manager (V2) action and add an email address manually.

please review.png

You can see above that the manager has the option to either approve or reject, right from within the email.

Going back to flow, a condition action is used to allow for a different result based on whether the request is approved or not.

yes no.png

There’s no need to change anything in the condition action, so let’s move on to what will happen if  the request is rejected.

rejected.png

Since we don’t want the rejection mail going to a service account, we’ll pull dynamic content from the Requestor/Owner Email column in the SharePoint list.

inform rejection.png

You might remember that we created a column called Status in the SharePoint list back in part 3? If you would like the list to reflect the current status of the request, add the SharePoint action called Update item.

update item.png

Specify the appropriate site and list, and the item will pull the available columns from the list. Since this request was rejected, we’ll update the status with that.

update item.png

That’s it for now, an email is sent to the requester, specifying that the request was rejected, and the SharePoint list item updated with the current status.

full rejection flow

Rejection flow illustration

Next up we’ll cover the fun part, which is whatever happens when the request is approved!

3 thoughts on “Take control of your Microsoft Teams environment part 5

  1. Pingback: Take control of your Microsoft Teams environment part 4 | Teams.rocks

  2. Pingback: Take control of your teams environment part 6 | Teams.rocks

  3. Pingback: Take control of your Microsoft Teams environment part 7 | Teams.rocks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s