cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Send only one Email for multiple created Files

Hello dear community.
I would like to send an email as soon as a new file is created or uploaded to the library.

One email per one file is not a problem, I already have one. Problem is that when I upload 50 files, I also get 50 emails. I would like to send a collective email for all files which will be uploaded within 5 minutes.

Directory structure looks like this:
Library -> Customer A (a@mail.com)
Library -> Customer B (b@mail.com)
Library -> Customer C (c@mail.com)
Files are created in subdirectories (customer A, customer B, customer C).

I thank everyone in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Loecha,

You can create a get file prpperties action before delete it, use the identifier to find the file instead of put path and file name with extension, because you need to decode the specail character "/":Annotation 2019-10-24 175407.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Community Support
Community Support

Hi @Loecha,

 

That will be a problem that when you upload 50 files will trigger Flow 50 times if you want to create an automatically Flow.

As a workaround, you can create a manually Flow to perform it. For example, after you upload these 50 files, perform the Flow with a manual trigger, initialize an array variable to store file name and file content, create Get files action, create a condition to find file that created in the past 5 minutes, if it is, gets file content and Append to the variable, after the loop, send email with attachment.Annotation 2019-10-22 153638.png

 

Annotation 2019-10-22 153708.png

 

Annotation 2019-10-22 153734.png

 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-litu-msft ,

Thank you for rapidly answer.

Unfortunately, but this must work full automatically.

I had an follown idea: use temporary lock files.
The Library has an additional column "email", this column has default value for each Customers.

 

  1. If I upload an File in sub directory ( Customer directory) the new entry has correct email of customer, wich mus get notification.
  2. Upload of first file automatically trigger new event.
  3. Flow create in lock directory a lock file, which name is email of customer. This file is a lock file for next flows. While this file exist, the next Flow will be not send email.
  4. After the first Flow has create a lock file and the timeout of 5 Minutes is over, the E-Mail notification to Customer will be send.
  5. After E-Mail send the lock file must be removed. After send the lock file must be removed. This give the possibility for next flows to send new Email.

Points from 1 to 4 works perfectly. But Point 5 fail with Error 404 "Not Found".

Why i cannot to remove lock file?

 

 

Hi @Loecha,

 

Could you please share Flow configuration? How do you delete these files? Using file path or identifier?

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-litu-msft ,

 

here is my configuration to remove file.


Unbenannt.PNG

Hi @Loecha,

You can create a get file prpperties action before delete it, use the identifier to find the file instead of put path and file name with extension, because you need to decode the specail character "/":Annotation 2019-10-24 175407.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (3,999)