cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MW630
Level: Powered On

SharePoint Send One E-mail When New Items Created

Hello,

 

I have a flow that loads contents from and Excel document into a SharePoint list.  One of the columns in the SharePoint List is Office Location.   When a new item is created, an e-mail is sent to a person/group based off of the Office Location that is entered.

 

The issue is that we sometimes have 50+ items entered at a time for a single office location.  So the person/group assigned to that office location is getting sent 50 individual e-mails. 

 

What I'd like to do is setup a scheduled flow to run each hour that would be able to send a single e-mail to a person/group if they have any new entries since the last time the flow ran.  I do not need to include the SharePoint list contents in the e-mail, just a generic e-mail that says "New SharePoint List Items have been added, please review.". 

 

The end end result that I would like is to have a flow review the data, see that there have been new entries for Office Locations 1, 2 and 3 since the last time the flow ran (I am thinking we can use the created date field and use the getdate - 1 hour).  It would send out 3 separate e-mails no matter how many entries were made for those offices. 

 

I do not know how to retrieve the Office Location data and only send one e-mail per office location.  Any help would be much appreciated. 

1 REPLY 1
Super User
Super User

Re: SharePoint Send One E-mail When New Items Created

You could do a get items.

 

Then do an apply to each on all items retrieved.

 

Within the Apply to each build up a variable that holds all locations where you need to send an email to ( depending on the item processed in the Apply to each. Before adding a location first check in a condition if the location is already included oin the locations variable.)

 

Then when the apply to each is complete you have a list of lcoations that you want to email.

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 81 members 3,886 guests
Please welcome our newest community members: