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.

View solution in original post

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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,394)