cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
coconutxyz
New Member

Selected Excel row, send email and attach pdf in sharepoint site based on file name in excel column value

Hi everyone, new to the forum and am looking for some help to automate a certain part of my work.

 

I got an excel table in Sharepoint that has multiple column as below and the pdf file (111111-Co A.pdf) in "Final Form" folder.

 

image.png

 

 

I am currently using the excel online addin (Microsoft Flow) that runs based on selected row, to compose and send email to email address1 - email address 4, subject as per subject column. i got everything right except attaching the right doc in the email, which is the 111111-Co A.pdf

 

image.png

Using the same example and the action above, the problem is if i have 5 pdf with different name in the "Final Form" folder, it will send 5 emails to abc@abc.com & efg@efg.com with same subject but different attachment (1 attachment in 1 email)

i got a feeling it might be related to array and setting variable but i have researched a bit and still can't get the answer.

 

Thanks for any help in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
v-LilyW-msft
Community Support
Community Support

Hi @coconutxyz 

Do you want to send multiple attachments in one email to company contacts?

I set up a flow, you can refer to the below screenshots to see if it helps.

This is my test excel.

vLilyWmsft_0-1637810711082.png

Flow in details:

In my test, I will filter company information named Co A, and then send an email.

vLilyWmsft_1-1637810872638.png

vLilyWmsft_2-1637810884197.png

vLilyWmsft_4-1637810989753.png

Expression1:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Emeil Address1']

Expression2:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address2']

Expression3:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address3']

Expression4:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address4']

Expression5:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Subject']

vLilyWmsft_6-1637811179581.png

Save and test the flow.

After flow runs, contact email address will be receive an email like below.

vLilyWmsft_7-1637811456927.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.

View solution in original post

2 REPLIES 2
v-LilyW-msft
Community Support
Community Support

Hi @coconutxyz 

Do you want to send multiple attachments in one email to company contacts?

I set up a flow, you can refer to the below screenshots to see if it helps.

This is my test excel.

vLilyWmsft_0-1637810711082.png

Flow in details:

In my test, I will filter company information named Co A, and then send an email.

vLilyWmsft_1-1637810872638.png

vLilyWmsft_2-1637810884197.png

vLilyWmsft_4-1637810989753.png

Expression1:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Emeil Address1']

Expression2:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address2']

Expression3:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address3']

Expression4:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Email Address4']

Expression5:

outputs('List_rows_present_in_a_table')?['body/value']?[0]?['Subject']

vLilyWmsft_6-1637811179581.png

Save and test the flow.

After flow runs, contact email address will be receive an email like below.

vLilyWmsft_7-1637811456927.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.

coconutxyz
New Member

Thanks it worked, i only need it to send one attachment per company.

Unfortunately even after enabling 50 concurrencies the flow took around 20minutes for 200 emails plus attachment which is pretty slow

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,773)