Leave Approval App Using PowerApps And Microsoft Flow

In this blog, we will discuss how to create a leave approval app using PowerApps and Microsoft flow in SharePoint online. This app will allow a user to apply for leave by providing his/her email and leave type. It is associated with Microsoft flow which will send an approval email to the approver and once the leave is approved it will send an email back to the user and update the leave status.

In this blog, I will discuss how to create a leave request approval app using PowerApps and Flow in office365. I have created a generic/custom list in office365 named "Leave Request" which contains the columns mentioned below.
  • Description Multiple lines of text
  • Leave Type Choice
  • Leave Status Single line of text
  • Email Single line of text
From these Email and Leave Type columns are required field.
 
Now we will discuss how to create an app using PowerApps Studio and an approval process using Flow. The Leave Status column will be updated as Approved or Rejected after the completion of the approval process by the approver also an email of the leave status will be sent to the mentioned email in the email column.
 

Create an app for Office365 Custom List using PowerApps

 
In this section, we will discuss how to create an app for our office 365 custom list using PowerApps.
  1. We will navigate to the custom list (Leave Request) in Office365 site. For example, https://softreetechnology.sharepoint.com/Lists/Leave%20Request/AllItems.aspx
  2. We will click PowerApps and then click "Create an app".
  3. We will enter the app name and then click "Create".
  4. By default, the generated app contains Browse, Detail, and Edit screen. We will Navigate to the Edit screen, select Leave status card and then select a visible property in the property box. Set visible property value to false in the formula bar so that "Leave Status" field will not be shown to users.
  5. Save and publish the app.

Create the leave approval process using Flow

 
In this section, we will discuss how to create the leave approval process using Flow.
 
Navigate to the custom list (Leave Request) in SharePoint Online site. For example,
https://softreetechnology.sharepoint.com/Lists/Leave%20Request/AllItems.aspx
 
We will Click Flow and then click Create a flow.
 
We will Click See more templates.
 
We will Search for SharePoint and select SharePoint – When an item is created.
 
We will Enter the URL and select the list name from drop down. Click New Step.
 
Leave Approval App Using PowerApps And Microsoft Flow
 
We will Click New Step and then click Add an action.

We will Search for Start and wait for the approval. Then assign any user email from the organization and also provide the item link and item description.

Leave Approval App Using PowerApps And Microsoft Flow
 
Then we will Click Next step and then click Add a Condition according to the response from the approver.
 
Leave Approval App Using PowerApps And Microsoft Flow
 
If yes then we will send the leave status and the message to the user who applied for leave and also updates the leave status field in the leave request list. 
 
Leave Approval App Using PowerApps And Microsoft Flow
 
For the above step, we will select Office 365 Outlook – email.
 
We will Fill in all the required details.

We will add an action to update the Status field to Approved.

We will Search for Update Item and then select SharePoint – Update item.
 
 Leave Approval App Using PowerApps And Microsoft Flow
 
If the condition is not satisfied, add an action to update the Status field value to Rejected.
 
Enter the name for the flow and click Create flow.
 
Flow created successfully. Click Done.
 

Testing the app and leave approval process

 
Open the Leave Request App which we have created
 
Leave Approval App Using PowerApps And Microsoft Flow
 
Click “+” icon to create new item.
 
Enter the details and click tick icon.
 
Item is created successfully. Approver (I have added myself) will receive an email to approve or reject in Office 365 Outlook.
 
Click "Approve".
 
Navigate to list and you could see the Status field got updated to Approved.
 
You can log in to the email given by the user and able to see the status of the leave in the email.
 

Result

 
In this article, we saw how to create a leave request form app using PowerApps and also an approval flow using Microsoft Flow in Office 365.