In this article, we will learn to create a Power automation or a flow using SharePoint List. This article will demonstrate simple steps to create a flow, when new item is added in SharePoint List. Here, we will use previously created List and create a flow to send customized email to Manager and User for Leave Approval Request in this part. Besides this, I will shortly explain about available connectors Get my profile (V2) and Get Manager (V2) as well as demonstrate how to use it in flow. However, there are a plethora of connectors that we can use, we will focus only on two connectors that we will use in the flow.
To create flow, we need SharePoint List. Create SharePoint List first. For demo purpose I am using List LeaveApprovalDemo which I have already designed in previous part.
Firstly go to your SharePoint site collection and open List. Then click on Automate-> go to Power Automate –> Create a flow as illustrated below.
In next step, you will get plethora of options to create flow. In this demo, I will show how to send email when a new SharePoint list item is added. So, choose the option as depicted in below screen.
Then, it brings you to below screen. Scroll downside the screen and Click on Create Flow.
After that click on Edit to rename your flow.
By default flow name comes as Send a customized email when a new SharePoint list item is added but for my demo purpose, I am renaming flow name by clicking on it to Demo Leave Approval- Send a customized email when a new SharePoint list item is added for better understanding in future.
When a new flow is added by selecting above trigger by default, below three options will come in the flow. However, we can customize it.
Get my profile(V2)
Get my profile (V2) is connector available in power automate which we can use according to our need in the flow. It gets the detail information of person who adds the items in the list (i.e., Initiator) such as Name, Email, Phone Number, Display Name, Department, Designation, Manager and so on. Whatever the information is available in User’s profile Get my profile gets those information which we can use as dynamic value in the flow.
Now, for our flow we are going to send email notification to user’s manager when the user adds items in the SharePoint List. So, first we must find out manager of user. In Power Automate, we can get the Manager of User by following steps.
Click on + icon as depicted below to add another action.
Type get manager in search area and select Get manager (V2). Then, Get Manager Action will be added in the flow.
Get manager (V2)
Get manager (V2) is another available connector in power automate or Microsoft flow which we can use to get detail information of manager. Follow below steps to use it in our flow.
To get Manager of user click on Add dynamic type mail in search textbox and click on mail. This email is just coming from the Get User Profile(V2). It gets the detail information of manager of user from user’s email.
Then Get manager step will look like as below, which will get the manager of the user. We need to send email to Manager, so that to get User’s manager email we need this step in our flow.
Now, it is time to customize email. To customize email, click on Send email step, to enlarge the step. Firstly, go to To Textbox and select Manager Mail in this field as depicted below.
You can change Subject Field in the email details as per your flow purpose. For my case, I am going to send email notification to requester’s manager for Leave Approval. So, I am keeping “New Leave Approval Request Sent for Your Approval” as Subject. You can customize your Email Subject according to your need.
You can customize whole email as like below. Where I have taken some dynamic values in the email body to provide detailed information about the request for instance, I have added information who has send this request, Request Code and Link to items etcetera. Here, Link to item provides the link of the Request by default. We can get Link to item as Dynamic field. Hence, when the email receiver clicks in this Link to item, he/she will be able to load and view details of the Request.
Then click on Save. Now your automation flow is ready.
We can test the flow by adding a new item in the List. Subsequently, Check email of your manager. Manager will get email exactly same as customized in the flow.
Additionally, Manager can also take his action (Approve, Reject) from email for his Approval.
Send One Email to Requester/Initiator
If you want to send one mail notification to requester or initiator user follow below steps.
Right below the Get my profile (V2) step click on Insert new step + icon and type send an email in Search box and again select Send an email(V2) as shown below.
Choose email of user in To Field, put appropriate Subject, and customize body of email. In my flow I have customized as depicted below.
Save the Flow and check your flow by adding a new item.
Now, if you add item in SharePoint List LeaveApprovalDemo then,you and your manager will get email as customized above respectively.
Thus, this article has described the necessary steps to create a flow using SharePoint List and demonstrated how to automate SharePoint List using power automate with an example of Leave Approval Request by sending customized email notification to user and manager. Additionally, it explained what is Get Profile(V2), Get Manager(V2) and how to use it in flow. I hope, by following this article you will be able to create flow using the trigger explained in the article easily.