cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Sending email with multiple attachments from Sharepoint list

Hoping someone can help, I have created a form in PowerApps which creates a new item in a Sharepoint list when the user submits the form. The form allows the user to attach multiple attachments for which the SharePoint list is updated with the attachments. When an item is created, an approval process is initiated using a Flow where an email is sent to the approver. The problem I am facing is that the email only includes one attachment even though there is more than one attachment.   

 

 
2 ACCEPTED SOLUTIONS

Accepted Solutions
Jay-Encodian
Community Champion
Community Champion

Hi @Anonymous 

You'll need to retrieve each attachment from the list SP list item, build a JSON array (string variable) containing the attachments.... and then add string variable to the attachments property on the send email action.

This article will have you covered: https://preview.flow.microsoft.com/en-us/blog/multiple-attachments-single-email/

HTH

Jay

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

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

View solution in original post

Anonymous
Not applicable

Just to put closure to this issue, I've managed to resolve the problem. 

 

The enable the flow to include multiple attachments to the email, under the 'Append to array variable' - 'value', you need to change the 'contentBytes' to 

 

"ContentBytes": "@body('Get_attachment_content').$content"
 
Thanks for your help.

View solution in original post

9 REPLIES 9
Jay-Encodian
Community Champion
Community Champion

Hi @Anonymous 

You'll need to retrieve each attachment from the list SP list item, build a JSON array (string variable) containing the attachments.... and then add string variable to the attachments property on the send email action.

This article will have you covered: https://preview.flow.microsoft.com/en-us/blog/multiple-attachments-single-email/

HTH

Jay

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

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up.

Hey @Anonymous 

 

 

Just like @Jay-Encodian suggested that should do the trick.

Please let us know if you are stuck on anything.

 

Kind regards

 

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Anonymous
Not applicable

Hi Jay,

 

Thank you for your suggestion, however, it doesn't seem to work in my situation. I have followed the instructions from the article to the T but no attachments are included in the email, despite there being attachments included in the list item.

 

I tried a similar approach previously using "Get Attachment" and "Get Attachment Content" but not "Initialize array". Though it did include one attachment with the email, when there were multiple attachments, it only included one.

 

Any suggestions as to where I've gone wrong?

 

Many Thanks

Hi @Anonymous 

Can you please post some screen shots of your Flow configuration please... all elements

Thanks Jay

Hey @Anonymous 

 

 

Could you please share a screenshot of your Flow and the result you got with your one attachment?

 

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

Anonymous
Not applicable

This is the flow that works successfully with one attachment

Single attachment 1.pngSingle attachment 2.png

 

Single attachment 3.png

 

And this is the flow for multiple attachments

 

Multi attachment 1.pngMulti attachment 2.pngMulti attachment 3.png

 

I attempted to run the flow for multi attachments again and now receive the following error message which I don't quite understand as all necessary fields have been provided.

 

Multi error.png

Hey @Anonymous 

The error message is stating that you need to provide all the input parameters for the email action: Subject, Body and Actions.

Your screen shot shows that the 'Body' property is empty:

 
Anonymous
Not applicable

Hi Jay,

 

The first flow which worked for a single attachment didn't require me to input parameters in those fields so assumed it wasn't compulsory. Anyhow, I did input parameters in the multi attachment but still get the same error message.

Anonymous
Not applicable

Just to put closure to this issue, I've managed to resolve the problem. 

 

The enable the flow to include multiple attachments to the email, under the 'Append to array variable' - 'value', you need to change the 'contentBytes' to 

 

"ContentBytes": "@body('Get_attachment_content').$content"
 
Thanks for your help.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,557)