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

Notifications

Announcements

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
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard