다음을 통해 공유


Microsoft Flow Send approval email when a new item is added demo

Here we will see how we can use "Send approval email when a new item is added" Microsoft flow template in SharePoint online. If you are new to Microsoft Flow you can visit the below article to know more about Microsoft Flow.

Microsoft Flow Step by Step Tutorial with Examples

Microsoft Flow is a new workflow management tool for automating workflows across applications and services by connecting web services, files, and cloud-based data. We can connect with various services like SharePoint, Office 365, OneDrive, Twitter, Facebook, Dropbox, Outlook, Instagram, Outlook, Yammer, Excel, Google Calendar etc.

Send approval email when a new item is added:

As the name suggests this flow will send an email when a new item is added to the list.

First login to https://flow.microsoft.com/ and then click on My flows from the menu. This will display all the flows that you have created as well as it will display options to "Create from blank" or "Create from template" options like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-1.png

Then click on Send approval email when a new item is added template like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-sample.png

Then click on Use this template button like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-1-1.png

Then it will ask for login if not logged in. Then click on Continue button like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-2.png

Then give the SharePoint site URL and then select the list name. 

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-3.png

Here I have removed the Send emailScope. So only it contains Send approval email action. so it looks like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-4.png

Here in the To I have put my email id. Then we can customize the default values.

In the Subject, by default it comes Approval Request and here I have added the Title column. Similarly you can modify the body and it should looks like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-5.png

Then click on the Create flow button, to create the flow like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-6.png

Once you click on done, it will be show message that the new flow is running like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-7.png

Then if you will add one item to the list then one email will get triggered. It looks like below with Approve and Reject button.

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-8.png

Handle Approve/Reject Logic:

Here we will see then how we can handle the Approve/Reject logic. 

First we have to add one condition and in that condition I have give the if select option is equal to Approve then we are sending email as Your item approved to the person who created the item. And also if it is rejected we are sending email as your item is rejected to the current user. It looks like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-office-365.png

Now if you go to the email and click on Approve, it will show you that Action complete 

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-office-365-approve-item.png

Then you will also receive the email that the Your item approved which we have configured in the flow.

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-office-365-approve-item-1.png

Now if you will check the flow, the logic will look like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-Send-approval-email-when-a-new-item-is-added-office-365-approve-item-2.png

Now we will update the item with some comments.

Update Field Value:

Here we will add an Update Item action. From SharePoint you can choose SharePoint - Update item like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-update-item.png

Then I have added the Site URL, List name, Id, Title and I have added some static value to the Comments field. Similarly I have added one more update item action in the Rejected condition. So both will looks like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-update-item-office-365.png

Now if you will Approve the item like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-update-item-office-365-1.png

After approval if you will open the list or the particular item then you can see the text will appear in the Comments field for the particular item like below:

https://www.enjoysharepoint.com/wp-content/uploads/2018/09/microsoft-flow-update-item-office-365-2.png