Automate work while on-the-go

Back to Blog Index
Share:

Automate work while on-the-goIntelligent Workplace & Workforce: Part of the series

Create parallel approval workflows with Microsoft Flow
In today’s, matrix management structure of the global workforce especially in newer industries, there is a need to inform and get approval of your absence (eg. vacation) so that your project managers are part of your scheduling decisions.

We have used an example here of a Parallel Approval workflow, multiple persons are required to approve items, in this case vacation requests. Each person’s approval is independent of all other approvers. The same logic applies to Payables, Quality Assurance, Project/Service quotations, etc.

This flow automates an employee vacation request process that requires approval from all persons (or teams) that the employee supports regularly. Employees use a SharePoint list to request vacation. Vacation approvals are required from the employee’s direct manager, the Sales team, and the Human Resources team. Each vacation request is routed to each approver for a decision. The flow sends email with status changes and then updates SharePoint with the decisions.

Before you create the flow, create a SharePoint Online list; later, we’ll use this list to request approval for vacations.

The SharePoint Online list you create must include the following columns:
SharePoint Online list
Make note of the name and URL of the SharePoint Online list. We use these items later to configure the SharePoint – When an item is created trigger.

Create your flow from the blank template

1. Sign in to Microsoft Flow.
Sign in to Microsoft Flow
2. Select the My flows tab.
Select the My flows tab
3. Select Create from blank.
Create from blank
4. Select the Create from blank button.

Add a trigger

1. Enter SharePoint into the search box.
SharePoint into the search box
2. Find, and then select the SharePoint – When an item is created trigger.
select the SharePoint
3. Select the Site Address and the List Name for the SharePoint list that your flow monitors for new items.
Select the Site Address and the List Name

Get the manager for the person who created the vacation request

1. Select New step, and then select Add an action.
Select New step
2. Enter get manager into the Choose an action search box.
3. Find, and then select the Office 365 Users – Get manager (V2) action.
Enter get manager
4. Insert the Created By Email token into the User (UPN) box on the Get manager card.
Created By Email
This action gets the manager for the person who created the vacation request in SharePoint.

Name and save your flow

1. Provide a name for your flow, and then select the Save icon to save the work we’ve done so far.
Name and save your flow
Note: Select the Save icon periodically to save the changes to your flow.

Add an approval action for immediate manager

1. Select New step, and then select Add an action.
Add an action
2. Enter approval into the Choose an action search box.
Choose an action
3. Select the Approvals – Start an approval action.
Start an approval
4. Configure the Start an approval card to suit your needs.
Note: The Title and Assigned To fields are required. You can use Markdown to format the Details field.
Approvals - Start an approval
Note: This action sends the vacation request to the email address in the Assigned To box, so insert the Email token from the Get manager (v2) list.

Insert a parallel branch approval action for the sales team

1. Select the down arrow that’s located between the Get manager (v2) and the Start an approval cards.
2. Select the plus sign that shows up on the down arrow after you select it.
3. Select Add a parallel branch.
4. Select Add an action.
Insert a parallel branch approval
5. Search for, select, and then configure a Start an approval action that sends the vacation request to the sales team. See the steps used to Add an approval action for immediate manager if you’re not sure how to add the Start an approval action.
Note: Use the sales team’s email address in the Assigned To box of the Start an approval 2 action.

Insert a parallel branch approval action for the human resources team

1. Repeat the steps to insert a parallel branch for the sales team to add, and then configure a Start an approval action to send vacation requests to human resources.
Note: Use the human resources team’s email address in the Assigned To box of the Start an approval 3 action.
If you’ve followed along, your flow should resemble this:
Insert a parallel branch approval action

Options after adding parallel branches

After you’ve added actions to parallel branches, you have two options for adding more steps to your flow:
1. Use the small Insert a new step button (the circular plus button that appears when you select any white space on a branch or the area immediately below a branch). This button adds a step to that specific branch. Steps you add with this button run after this specific branch completes.
2. Use the larger New step button at the bottom of the entire workflow. Steps you add with this button run after all branches complete.

In the following sections, we use the small Insert a new step button to perform these steps on each branch:
• Add a condition that checks if the vacation request was approved or rejected.
• Send an email that informs the employee of the decision.
• Update the vacation request in SharePoint with the approval decision.
Then, we use the larger New step button to send an email that summarizes all decisions made on the vacation request.
Continuing…

Add a condition to each branch

1. Select any white space on the Start an approval branch.
2. Select the small Insert a new step button (the circular plus button that appears after you select the white space in the previous step).
3. Select Add a condition from the menu that appears.
4. Select the first box on the Condition card, and then select the Response token from the Start an approval category in the dynamic content list.
Add a condition to each branch
5. Confirm the list (in the middle of the Condition card) is set to is equal to.
6. Enter Approve (this text is case-sensitive) into the last box.
7. Your condition card should now resemble this example:
Add a condition to each branch step
Note: This condition checks the response from the Start an approval action that goes to the employee’s manager.
8. Repeat the preceding steps on the Start an approval 2 (the approval request to sales) and Start an approval 3 (the approval request to human resources) branches.

Add email actions to each branch

Perform the following steps on the IF YES side of the Condition branch.
Note: Your flow uses these steps to send an email when the request is approved:
1. Select Add an action on the IF YES branch of the condition.
Add email actions to each branch
2. Enter send email into the search box on the Choose an action card.
Add email actions to each branch
3. Select the Office 365 Outlook – Send an email action.
Add email actions to each branch
4. Configure the email card to suit your needs.
Note: To, Subject, and Body are required.
This card is a template for the email that is sent when the status of the vacation request changes.
Note: In the Body box on the Send an email card, use the Comments token from the Approvals – Start an approval action.
Add email actions to each branch
To send an email when a request is rejected, use the IF NO side of the Condition branch, and then repeat the preceding steps to add a template for the rejection email.
Repeat the preceding steps on the Start an approval 2 (the approval request to sales) and Start an approval 3 (the approval request to human resources) branches.

Update the vacation request with the decision

Perform the following steps to update SharePoint when decisions are made.
Note: Be sure perform these steps on both the IF YES and the IF NO sides of the branch.
1. Select Add an action from the IF YES branch.
2. Enter update into the search box on the Choose an action card.
Update the vacation request with the decision
3. Select the SharePoint – Update item action.
Update the vacation request with the decision
4. Configure the Update item card to suit your needs.
Update the vacation request with the decision
Repeat the preceding steps on the Start an approval 2 and Start an approval 3 branches.

Complete the flow

1. Select New step>Add an action
Complete the flow
2. Use the steps provided previously to send an email that summarizes the results of each approval. Send this email to the employee who requested vacation.
Your card may resemble this example:
Complete the flow

abdul hafiz

Author: Abdul Hafiz

Enterprise Solution Architect

Follow: