web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Send only one Email fo...
Power Automate
Answered

Send only one Email for multiple created Files

(0) ShareShare
ReportReport
Posted on by 7

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.

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

  • Loecha Profile Picture
    7 on at

    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?

     

     

  • v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

  • Loecha Profile Picture
    7 on at

    Hi @v-litu-msft ,

     

    here is my configuration to remove file.


    Unbenannt.PNG

  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard