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 / Automatically attachin...
Power Automate
Unanswered

Automatically attaching SharePoint docs during the week to send in an Outlook email

(0) ShareShare
ReportReport
Posted on by 4
Please bare with me as I am brand spanking new to Power Automate.  I am using the web based version of Power Automate.
 
These are the instructions.
 
-----------------------------------
 

I’m looking to see if we can automate the following:

  • Once documents are uploaded, group them into batches of 10

  • For each batch, generate and send an email to the MA regulator with those 10 documents attached

  • After sending, move those 10 documents into a separate folder labeled something like:

    MMDDYYYY – Batch 1, Batch 2, etc. (so we have a clear audit trail of what was sent with each email)

A few additional parameters:

  • The source folders are currently organized by month, but batching should occur regardless of folder structure

  • If more than 10 documents are received, multiple batches should be sent (always in increments of 10)

  • Ideally, we do not send emails with fewer than 10 documents

  • This process does not need to run daily—a weekly run (e.g., Fridays) would work, where:

    • All documents for the week are grouped into batches of 10

    • Any remainder (<10) rolls into the following week

Additionally, I’d like to be CC’d on all outgoing emails so I can track submissions for billing purposes.

 

--------------------------------------------

 

First off, are all these options possible?

 

This seems to me that several flows need to be created and then joined together. 

 

It seems all straight forward for the most part, but because I know nothing about Power Automate, I'd appreciate any help that can be provided.  In the meantime, I watching videos on it and it is getting a bit easier to understand and I was able to send myself an email, but that is the least of my issues.

 

Thanks

 
 
Categories:
I have the same question (0)
  • CU27030035-0 Profile Picture
    93 on at
    A couple of ways to do this 
    Personally I would probably do this in 2 flows 
    I would group the documents together in a SharePoint list then use a recuring flow to send and log
    SharePoint list will need a choice field "Status" values of "Uploading documents", Ready for Export" and "Exported"
    Not sure how you get your files so I'm speculating a bit but
     
    1st flow
    When a file is uploaded get the file
    Get everything in the list where we are grouping them
    Get the attachments on said item 
    Count the Number of attachments (initialize a variable at the start of the flow and then for each attachment increment it)
    Use a control that if number of attachments is greater than or equal to 10
    if less then add it to this item
    If 10 Change the status of this list item to ready for export and add a new list item and add attachment to that set the status value as uploading documents
    (Note: if you are uploading multiple documents at a time you will need to put this in a for each loop)
     
    2nd flow
    Recuring every Friday at whatever time
    Get items from the list
    inside a for each if status equals Ready for export 
    Get attachments and put them on an email and send it 
    Then Create a folder in your document library with your naming convention and add the attachments in there 
    Finally update the list item to Exported so it doesn't pick it up twice
     
    Alternatively you could add the export Audit data to the SharePoint list in a column this is what I would do but I don't know your auditing requirements so I'll Let you decide on that 
     
    If you are storing all these in files you will probably want to have a 3rd flow running to delete any items with a status of Exported to keep the runtime down
     
     
  • Jim Kimball Profile Picture
    4 on at
    That really seems the logical way to approach this.  After I submitted this post, I came across making a list and a few things became more clear to me in the context of how to segregate the new docs and be able to concentrate my efforts within that first level of flow.
     
    I will be attacking this again in the morning with a fresh new base of understanding of this, so I really appreciate how you laid this out.  Now I just need to see if I can follow through accordingly.  I also need to see how much leeway I have in creating the new list to contain these docs as far as my Manager is concerned and the employees that add these docs to it, but since she wants this done, I guess I have that freedom to create what is needed.
     
    This is a great place to start and I really appreciate your help and will tag this response accordingly once I am able to work on your game plan and see my results.  Let's see how much I can accomplish in the morning.
     
    Thank you.
  • Jim Kimball Profile Picture
    4 on at
    I wish I could report back that I have made good progress, but I am still having issues.  I can't even get an email sent to myself anymore.  It worked yesterday, but today I have run the test numerous times, but just cannot get an email.
     
    The flow triggers when I add a file to SharePoint, so at least that works.  The flow reports back that there are no errors, so I can't even begin to understand what the issue(s) is/are.
     
    The run history shows the last handful of tests as Succeeded, but Analytics/Usage shows as 0 flow runs.  So which is it?  Is it working (somewhat) or not?

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
Haque Profile Picture

Haque 333

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 202 Most Valuable Professional

Last 30 days Overall leaderboard