Showing results for 
Search instead for 
Did you mean: 

Group files and attach them to an email


This question is kind of related to my previous one but it goes beyond that.

The issue or question that I have is now the following. 

Let's say we have a list of documents on Sharepoint. 

File 1: ABC-001

File 2: ABC-009

File 3: ABC-095

File 4: DEF-077

File 5: DEF-098

The first 3 letters denote the customer to which I would like to send the email with the attached files. 

So, in my case, I would like to send 2 emails.

Email 1 to customer ABC and Email 2 to customer DEF. 

The emails should of course only have the respective files attached. 

Is such a grouping/selection of the files and attachment to an email feasible?

Best regards, 


Super User
Super User


Can you provide a little more detail.  For example, do you have a list of the file name prefixes you are looking for?  Is there a list somewhere of who the emails should go to for each type of file?  How many types of files will there be?  In SharePoint?  With that info, this is pretty straight forward.


Let me know and I'll provide an example.


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Dual Super User
Dual Super User

Hi @lreinhard7 


I built this specifically for your use case


This is how my SP list looks like - so I send emails to the EmailTo column 

You can modify the Flow based on your use case




Reza Dorrani


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Hello Scott, 

Many thanks for your feedback. 

The files look always the same (below is a screenshot form our demo/test system)

1st element: Customer ID (e.g. DE-015, DE-016, etc.)

2nd element: @ symbol to separate customer ID and invoice number

3rd element: invoice number (e.g. FTI-000066)

Note that there are always 2 files; the first one is the XML with the invoice information, the second one is the PDF. 


I try to attach all XML and PDF documents for a specific customer into a single email and send it to them. 






Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,410)