cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Scheduled email with list of file paths where a file is created in SharePoint

Hello, has anyone done a flow that allows a set of users to receive an email when a file is created in SharePoint but send only ONE email when multiple files are added at one time?  When we test uploading more than one file, an email is sent for each document.  I thought maybe we could schedule an email to go out with the folders that had new files added in the last 5 minutes.  Or any other suggestions would be appreciated

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

Re: Scheduled email with list of file paths where a file is created in SharePoint

Hi!

My suggestion is to implement a recurrence trigger an execute it every 15-30 minutes, you can probably restrict executions to a specific time sschedule (i.e. from 8 am to 5 pm) my configuring its inputs accordingly.

You could probably restrict also executions to week days by means of setting a condition in your trigger settings

Official documentation here

https://docs.microsoft.com/en-us/power-automate/run-scheduled-tasks

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Frequent Visitor

Re: Scheduled email with list of file paths where a file is created in SharePoint

When I do a schedule, it wants an action not a trigger, how would I put in the send email that it needs to include the path of any folder changed since the last schedule?  Without the schedule, here is what my flow is doing.

 

Email folder that changed.png

Highlighted
Dual Super User III
Dual Super User III

Re: Scheduled email with list of file paths where a file is created in SharePoint

Hi!

Let's see if this approach is valid according to your requirements:

https://powerusers.microsoft.com/t5/Building-Flows/One-notification-Email-for-several-changes/td-p/1...

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Frequent Visitor

Re: Scheduled email with list of file paths where a file is created in SharePoint

I got one email to send, but it doesn't list the new folders that were created in the specified folder path.  I am running it by user tomorrow to is if that will work for them.  Thank you for your help

Highlighted
Frequent Visitor

Re: Scheduled email with list of file paths where a file is created in SharePoint

Hi,  I let the test run overnight to see how many emails came through.

 

The expression I have in the filter array is (changed it this morning to be 1x a day) but last night it was sent on every hour

formatDateTime(addDays(utcnow(), -1), 'yyyy-MM-ddThh:mm:ssZ')
 
There are two problems with this solution:
1)  Last night, I got an email every hour on the hour even though there were no changes done in the folder path
2) When I do a test loading two folders with two files in each, it sends me 6 different emails at the same time. 
 
We are needing to to be just one email sent 1x day only when files are added in the last day.

 

DRT Email schedule.png

DRT Email schedule2.png

Highlighted
Dual Super User III
Dual Super User III

Re: Scheduled email with list of file paths where a file is created in SharePoint

Hi again!

"1)  Last night, I got an email every hour on the hour even though there were no changes done in the folder path"

 

The current condition design is not working fine. So my suggestion is, to add a condition an evaluate nr of elements on your Filter array output. Send the email only if more than 0.

So in the left side of your condition rule I would suggest to add the following expression:

length(body('Filter_array'))

on the right side, add a 0 

Select 'greater than' as the operator.

Move 'Send an email' to the true branch

 

Please take a try and let us know if this issue is solved

 

"2) When I do a test loading two folders with two files in each, it sends me 6 different emails at the same time. "

Is the logic from the last screenshot you shared inside an Apply to each?

 

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Users online (5,059)