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 / Email notification whe...
Power Automate
Suggested Answer

Email notification when multiple files are added to OneDrive

(0) ShareShare
ReportReport
Posted on by 8
At present, I received 10 emails for 10 new files added to OneDrive.
I only want one email, with the filenames of those 10 files inside the email.
I have the same question (0)
  • Suggested answer
    Tomac Profile Picture
    4,105 Moderator on at
     
    To accomplish this, you'll want to run two flows: One with the current trigger to collect the list of files and relevant details in a SharePoint List or Dataverse table, and a second running on a Recurrence trigger at an interval of your choosing that queries the SP List, formats the data, sends the single email per person, and deletes those items from the SP List.
  • TT-19050601-0 Profile Picture
    8 on at
    are you able to show some printscreens on the two flows?
    Thanks.
  • Suggested answer
    Vish WR Profile Picture
    3,110 on at

    @Tomac two-flow approach is the right direction. To give you a clearer picture of how it actually works:

    Flow 1 — the collector (triggered when a file is created in OneDrive):


    • Trigger: "When a file is created" in OneDrive

    • Action: Add a row to a SharePoint list (or Excel table) with the file name, upload time, and any other details you want in the email

    •  

    That's it for Flow 1 — it just logs each file as it arrives.

    Flow 2 — the digest sender (runs on a schedule):


    • Trigger: Recurrence — set to whatever interval works for you (e.g. every hour, or once a day)

    • Action: Get items from the SharePoint list

    • Action: Build the file list into an HTML table using "Create HTML table" or just concatenate the names with a Join expression

    • Action: Send an email with all the filenames in one go

    • Action: Delete the logged items from the list so they don't show up in the next email

    •  

    The key thing here is the SharePoint list acts as a temporary buffer between the two flows. Each file upload adds a row, and the scheduled flow drains it on your chosen interval.

    One tip — add a "condition" in Flow 2 to check if there are any items before sending, so you don't get empty emails on quiet days.

     

    Vishnu WR
     
    Please âœ… Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
  • Suggested answer
    Tomac Profile Picture
    4,105 Moderator on at
     
    The first flow is simple, you just have the trigger and a SharePoint action to Add Item to a list.
     
    The second flow gets a bit more complicated, but this format will only send emails if there have been changes and also allow you to send to multiple people based on the name recorded in the first flow. If you only want the emails to go to a single person, inside the Condition you'd just have the Create HTML Table and Send An Email actions.
     
  • TT-19050601-0 Profile Picture
    8 on at
    for the first flow, I make use of an Excel file to update the file(s) which is/are being added to a directory inside OneDrive. I work with OneDrive first, which would be easier than Sharepoint.
     
    For the second flow, it looks complicated to me, some of the things inside, I am not sure what to find it:
     
  • TT-19050601-0 Profile Picture
    8 on at
    I tested with this, but I could not get the Filenames which I have populated in Flow 1.
  • Suggested answer
    S-Venkadesh Profile Picture
    1,188 Super User 2026 Season 1 on at
    Hi @TT-19050601-0,

    Here’s the solution:
    • Use the trigger When a file is created (properties only)
    • In Trigger Settings, disable Split On — this is the key step for processing files in bulk
    • Add your logic to collect the required details and send them in a single email
    For demonstration, I created a sample flow that collects all file names into an array. Please refer to the screenshot.



    I hope this information helps! If it does, please consider giving a 🩷 Like!
    If this solved your issue, Please  ✅ accept this as Solution. so it can help others in the community as well.
    Best regards,
    Venkadesh Sundaramurthy
     
  • Suggested answer
    Tomac Profile Picture
    4,105 Moderator on at
    Here's a breakdown of the flow I previously posted:
     
    Trigger:
    I set mine to run every 30 minutes, but you can adjust this to how long of an interval you want to receive notifications
     
     
    Get Items:
    I made a simple list called Sample_ChangedFiles to hold the details from my first flow. From that list, I reference the field "To_Notify" later in the flow to break up a long list of files into groupings based on who needs to get the notification for each file that was modified. If you're not planning to notify multiple people, you can skip to the heading OPTION 2 below. If you're using this version, make sure "To_Notify" is recording the email address of the person to be notified.
     
    OPTION 1: Multiple people being notified
    This is the full version with multiple notifications to different people in a single flow. You probably don't need this one but it's the most robust and you may grow into it, so here's the overview again:
     
    We're at the Condition:
     
    This checks if the length of the Get Items output is greater than zero using the following expression on the left:
    length(outputs('Get_items')?['body/value'])
     
     
    Next is the Select action, to pick out only the email addresses of the people we want to notify for each file that weas modified:
     
    Next is the Compose. We'll use a union() expression on the output of the Select action to merge it with itself. This is a trick to reduce an array to only the unique values, so we only get one instance of each email address in the list:
    union(body('Select'),body('Select'))
     
     
    Next is the Apply To Each targeting the output of our Compose:
     
    Now we filter the original Get Items "body/value" dynamic content to only get the files we want to send to the current person named in the loop:
     
    Then use a Create HTML Table action on the output of that Filter Array:
     
    And finally we send the email to each person who is supposed to be notified with their individual list of files:
     
    Then run another Apply To Each on the body/value from Get Items and use a Delete action to delete the items you just sent emails for. 
     
     
    OPTION 2: Only send notifications to one person
    This is much simpler but is not as robust. Everything is the same outside of the Condition, so we'll just review the two actions inside of it.
     
    Starting with Create HTML Table, which now runs against the body/value of Get Items:
     
    And then send the email with the recipient directly added:
     
     
    And that's it! One quick note, while @S-Venkadesh's solution will work as well, you can't choose the interval. So however frequently as SharePoint sends your flow a list of files is how frequently you'll get an email from the flow. This option lets you set the interval to whatever you want.
  • TT-19050601-0 Profile Picture
    8 on at
    how do I get the directory of the files added to be input into Email?
     
  • Suggested answer
    Tomac Profile Picture
    4,105 Moderator on at
    @TT-19050601-0 Add it to your SP list and record it in the first flow.

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard