How to create a simple approval flow?[Part-2]

Approval

In my previous article, I have explained about approval process. Now we will see how to create a simple approval flow using power Automate/Flow.

Use Case-

When user will create one leave request in Leave Management List, it will go for approval to his/her manager. Once manager approved/rejected we will notify to the user and update leave status on SharePoint list.

SharePoint List- Leave Management

SP List

  • My SharePoint List has following schema-

Schema

Now we will design one Approval Flow which will be triggered when a new item is created in Leave Management list.

Steps-

  • Go to this link–> Then Login with your credentials–> Click on +Create –>Choose Automated Cloud flow–> Give flow name and select trigger When an item is created.

Flow

  • Once you have clicked on Create button, configure your trigger by selecting site address and list name from the dropdown as shown below.

Flow trigger

  • If you want to show end user leave request status as “Pending”. For this there are two ways to achieve this-
    • First: Go to your SharePoint list then edit Leave Status column and then set Leave status column default choice as Pending

Edit column

    •  Second: you can use one Update item action in your flow to set leave status value as “Pending”. Here you need to select ID from dynamic content of When an item is created.

Update ItemYou can choose either one as suits you.

  • After trigger we can directly use an approval action. But it is good practice to notify end user once request is submitted successfully. So, we will add one Send email action which will be just the confirmation for end user. Please configure your send email action as shown below-

Send email

  • Now we will add one approval action and configure as shown below. Here you need to give manager email from dynamic content.

Approval action

  • After this you need to add condition action and check whether Manager has approved/rejected the request. In Condition action- Left side you need to choose outcome from dynamic content and in right side just type Approve (this is case sensitive).

Condition

  • Now you need to update user for the approval outcome. First update approval status in SharePoint list and then send email to user. Configure your flow as shown below-

Configure Condition

  • Once this is configured, click on save to save your flow. After saving it will display green message at the top.

Save flow

Analyzing The Approval Flow

  • Now you have designed and saved your flow. You need to test this. For testing go to your SharePoint list and click on New  to create one leave request. After couple of minutes (as per your flow license) you will see your flow is running.

Flow Instance

  • Click on link under Start tab as shown above, You will see your flow is waiting for manager approval.

Running flow

  • After manager approval it will update Leave Status column value in SharePoint list and then notification will be sent to user.

Adding second level approval

Some time you need to add one more level of approval. In this case, you will add all the steps from approval action to the end of the flow  under Yes block as shown below.

Second level

Thank You!!!

-Gopenly