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.
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.
JoeAu
Level: Powered On

Re: email more than one attachments from sharepoint list

Thanks Kris.

You are GREAT.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 156 members 3,732 guests
Please welcome our newest community members: