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 / Email multiple attachm...
Power Automate
Unanswered

Email multiple attachments from multiple records in one email

(0) ShareShare
ReportReport
Posted on by 588

I have a Sharepoint List which is populated by a Form. This list has a flow run every two weeks which creates an export of the items on the list, emails that export to a supplier, and then archives the records. I have recently been asked to allow users to attach a file to their submission which I have done absolutely fine, but I can't figure out how to get the attachments from every record and attach them to the same export email.

 

I have come across multiple blogs such as this one which tell me how to email multiple attachments from ONE record when that record is first created, but I would like the flow to look at EACH record in a list, take their attachments, and send them in one email at the end of the flow. Is this possible?

Categories:
I have the same question (0)
  • leyburn19 Profile Picture
    2,157 on at

    You should be able to use the append to array variable in that example.  It will continue to add the attachments as you move through the list and then simply put that in your email attachments.  May end up too big though depending on your email and ISP settings for attachments.  I would look at:

     

    1. Add a numeric column to your list with a default of of 1

    2. Initialize and Array variable

    3. At the end of your flow do a get items to find all records with 1

    4. Loop through the result.

    a. Get Attachments (loop one)

    b. Get Attachment content (loop to get attachments)

    c. In this loop add the append to array variable as per the document you linked to

    5. Back in loop 4 do an update item and set the column to anything but 1

     

    When you send your email your attachment array should have all the atts,  but not restriction on size if applicable.

  • misc Profile Picture
    588 on at

    attachment array.png

    This was my attempt at the Attachment Array as per the link and other blogs online, but when I came to attach the array to the email it didn't give me the dynamic content I needed. Perhaps you can see where I went wrong?

     

    In any case, I'm going to try again with your suggestion above and see how that goes. Watch this space. 

  • misc Profile Picture
    588 on at

    attempt 2 array.png

    Ah, so I figured out why I couldn't find the correct dynamic content - I needed to hit the icon on the attachment section  but (I think) because I already have my other attachment there it's giving me the above error. Am I missing some part of the syntax to have my new AttachmentArray and the original attachment too?

  • v-LilyW-msft Profile Picture
    on at

    Hi @misc 

    Has your problem been solved?

    Please delete the content framed in the image below, keep only variable name(AttachmentArray) and try again. 

    vLilyWmsft_0-1629697634233.png

    Like this:

    vLilyWmsft_1-1629697782779.png

    Hope the content above may help you.

    Best Regards

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

  • misc Profile Picture
    588 on at

    Hello,

     

    So you are correct in a way, the AttachmentArray works fine if I have it on its own. My problem is that I want to send in one email the attachments from the list (gathered together in the AttachmentArray) but also an export of the relevant list items too (which is created by "Get Items > Add a row to excel table into a template" as part of the same flow). That's the additional code which you have circled above.

     

    At the moment, I have settled on sending two emails, one with the main export of the list and another with the AttachmentArray but my preference is both together, though nothing I tried seemed to work. 

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @misc 

    Sorry for my misunderstanding.

    If you want to add another file as an attachment to the email, you can also append this file to the variable.

    vLilyWmsft_1-1629709965902.png
    vLilyWmsft_0-1629709904850.png

    After Flow runs, I will receive an email as below:

    vLilyWmsft_2-1629710226671.png

    Best Regards.

     

  • misc Profile Picture
    588 on at

    Thank you - both this and @leyburn19's answer helped solve my problems! Much appreciated 🙂

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard