cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
wplingers
Level 8

Send email to list of addresses contained in a collection

Hello,

 

Each month we have to send documents to 300 recipients. There is 1 document for each recipient. I was wondering if it would be possible to create a flow that sends an email with the correct document as attachment to the correct recipient if:

 

- we are able to create a Sharepoint list that contains the email addresses and the name of the document to be sent to each email address.

- the documents would be available in a OneDrive for business folder.

 

Is something like this possible?

 

Thanks and regards,

Wim

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Send email to list of addresses contained in a collection

Hi @wplingers,

 

Could you please share a bit more about your SharePoint list?

Do you want to send corresponding document stored in your OneDriver for Business folder to a specific email address based on the file name within your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:1.JPG

 

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

  • Add a "Recurrence" trigger, Interval set to 1 and Frequency set to Month.
  • 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 "List files in folder" action, specify your OneDriver for Business folder. Add a "Filter array" action, From set to output of the "List files in folder" action, within condition box, left input box set to DisplayName dynamic content of the "List files in folder" action, right input box set to FileName (contains the name of the document ) dynamic content of the "Get items" action, middle drop down set to is equal to.

         Add a "Apply to each 2" action, input parameter set to output of the "Filter array" action. Within "Apply to each 2" action, add a "Get file content" action, File field set to Id dynamic content of the "Filter array" action. Then add a "Send an email" action, To field set to RecepientEmail dynamic content of the "Get items" action, Attachments Name - 1 set to DisplayName dynamic content of the "Filter array" action, Attachments Content - 1 field set to File content dynamic content of the "Get file content" action.

 

Image reference:2.JPG

 

3.JPG

The flow works successfully as below:4.JPG

 5.JPG

 

 

 

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: Send email to list of addresses contained in a collection

Hi @wplingers,

 

Could you please share a bit more about your SharePoint list?

Do you want to send corresponding document stored in your OneDriver for Business folder to a specific email address based on the file name within your SharePoint list?

 

I have created a SharePoint list on my side and the data structure of it as below:1.JPG

 

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

  • Add a "Recurrence" trigger, Interval set to 1 and Frequency set to Month.
  • 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 "List files in folder" action, specify your OneDriver for Business folder. Add a "Filter array" action, From set to output of the "List files in folder" action, within condition box, left input box set to DisplayName dynamic content of the "List files in folder" action, right input box set to FileName (contains the name of the document ) dynamic content of the "Get items" action, middle drop down set to is equal to.

         Add a "Apply to each 2" action, input parameter set to output of the "Filter array" action. Within "Apply to each 2" action, add a "Get file content" action, File field set to Id dynamic content of the "Filter array" action. Then add a "Send an email" action, To field set to RecepientEmail dynamic content of the "Get items" action, Attachments Name - 1 set to DisplayName dynamic content of the "Filter array" action, Attachments Content - 1 field set to File content dynamic content of the "Get file content" action.

 

Image reference:2.JPG

 

3.JPG

The flow works successfully as below:4.JPG

 5.JPG

 

 

 

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

F3lix
Level: Powered On

Re: Send email to list of addresses contained in a collection

Hi,

 

thanks for the help! I've been looking for something like this because I couldn't quite figure it out myself.

 

Just a short question from my side regarding the SharePoint list. What kind of column is the "FileName" column? In my case, I added "Single line of text", but the Title is being shown in the SharePoint list. If I edit an item in the list, I can see that the correct data is being stored.

 

Thanks

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!

Users Online
Currently online: 337 members 1,579 guests
Please welcome our newest community members: