cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JoeAu
Level: Powered On

email more than one attachments from sharepoint list

I have a Sharepoint list which has more than one attachments in each record.

How is the Flow settings to send an email for this list with all the attachments also attached in the email?

Thanks,

Joe

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: email more than one attachments from sharepoint list

Hi @JoeAu,

 

Do you want to attach all the attachments within your SP list into a single flow?

 

I have made a test on my side, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Variables-> "Initialize variable" action, Name set to AttachmentsArray, Type set to Array and Value set to empty.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Apply to each" action, input parameter set to output of the "Get items" action.
  • Within "Apply to each" action, add a "Get attachments" action, specify Site Address and List Name, Id field set to ID dynamic content of the "Get items" action.

         Add a "Apply to each 2" action, input parameter set to output of the "Get attachments" action. Within "Apply to each 2" action, add a "Get attachment content" action, specify Site Address and List Name, Id field set to ID dynamic content of the "Get items" action, File Identifier field set to Id dynamic content of the "Get attachments" action.

 

        Add a "Append to array variable" action, Name set to AttachmentsArray, Value set to following JSON data:1.JPGThere are two elements within this JSON Data, the key of first element set to Name and corresponding value set to DisplayName dynamic content of the "Get attachments" action. The key of second element set to ContentBytes and corresponding value set to following formula:

 

body('Get_attachment_content')?['$content']

 

 

  • Under "Apply to each" action, add a "Send an email" action, click "Switch to input entire array" button as below:Capture.JPG

     The Attachments field set to AttachmentsArray variable.

Image reference:2.JPG

 

3.JPG

 

4.JPG

The flow works successfully as below:5.JPG

 

6.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

 

Best regards,

Kris

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: email more than one attachments from sharepoint list

Hi @JoeAu,

 

Do you want to attach all the attachments within your SP list into a single flow?

 

I have made a test on my side, please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add a Variables-> "Initialize variable" action, Name set to AttachmentsArray, Type set to Array and Value set to empty.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Apply to each" action, input parameter set to output of the "Get items" action.
  • Within "Apply to each" action, add a "Get attachments" action, specify Site Address and List Name, Id field set to ID dynamic content of the "Get items" action.

         Add a "Apply to each 2" action, input parameter set to output of the "Get attachments" action. Within "Apply to each 2" action, add a "Get attachment content" action, specify Site Address and List Name, Id field set to ID dynamic content of the "Get items" action, File Identifier field set to Id dynamic content of the "Get attachments" action.

 

        Add a "Append to array variable" action, Name set to AttachmentsArray, Value set to following JSON data:1.JPGThere are two elements within this JSON Data, the key of first element set to Name and corresponding value set to DisplayName dynamic content of the "Get attachments" action. The key of second element set to ContentBytes and corresponding value set to following formula:

 

body('Get_attachment_content')?['$content']

 

 

  • Under "Apply to each" action, add a "Send an email" action, click "Switch to input entire array" button as below:Capture.JPG

     The Attachments field set to AttachmentsArray variable.

Image reference:2.JPG

 

3.JPG

 

4.JPG

The flow works successfully as below:5.JPG

 

6.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

 

 

Best regards,

Kris

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

JoeAu
Level: Powered On

Re: email more than one attachments from sharepoint list

Thanks Kris.

You are GREAT.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (5,294)