cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
imthiyaz
Frequent Visitor

mail merge function with excel online and one drive file attachment

I am trying a flow solution to that i can send individual emails ( with separate attachments ) from a mail merge which originate from excel online file . My excel online file will have table with columns Name , email , file name ( all these files are stored in one drive ). every email specified in the email row , needs to be sent a email with attachment with a file name specified in the filename row.  I need procedure to attach one drive file in the send email notification action , from the excel online .  thank you 
2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @imthiyaz,

 

OK, you could use the Filter query to find the filename exist in the Excel file:

Annotation 2020-05-01 172430.png

 

After filter, merge these files into an array variable and put the variable into the attachment field of Send Email action:

https://powerusers.microsoft.com/t5/General-Power-Automate/Send-1-email-with-all-attachments/m-p/331...

 

Best Regards,
Community Support Team _ Lin Tu
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

Hi @v-litu-msft 

 

Thank you , finally i managed some success , i used get file content function for one drive for business . and it worked 

Attached my flow . 

PAemail.JPG

View solution in original post

8 REPLIES 8
v-litu-msft
Community Support
Community Support

Hi @imthiyaz,

 

What's the type of Email column in the Excel table? Is it the email message ID?

If it is, you could use Get email action to get the Email content.

If you want to get the file stored in One Drive, and you have these URL, you could use Get file content using path action:Annotation 2020-04-27 132009.png

Then append the file content into the field of attachment content in Send Email.

 

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

Hi @v-litu-msft 

 

My excel file is as follows

 

xx@gmail.com  1.pdf

xy@gmail.com  2.pdf 

 

I have stored my files in one drive folder https://ibb.co/KDtYmc1 

Hi my excel file is as follows xx@email.com 1.pdf xy@email.com 2.pdf I have stored all these 1.pdf and 2.pdf in a onedrive folder . Thank you for your help.

Hi @imthiyaz,

 

OK, you could use the Filter query to find the filename exist in the Excel file:

Annotation 2020-05-01 172430.png

 

After filter, merge these files into an array variable and put the variable into the attachment field of Send Email action:

https://powerusers.microsoft.com/t5/General-Power-Automate/Send-1-email-with-all-attachments/m-p/331...

 

Best Regards,
Community Support Team _ Lin Tu
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

Hi @v-litu-msft 

Thanks for the help. I am still stuck with it . my logic is as bellow

List rows from excel , which will have email and corresponding file name to be send as an attachment 

I am also connecting to one drive where actual files are stored , then list files in folder 

in apply each loop I am pulling both values from excel and one drive 

now I dont know how to move the actual file in to the variable then attach in send email action  , file name I am getting from excel  rows one by one in the loop .

I have gone through the example you have given still I could not make it work . kindly suggest some readings . thank you 

Hi @imthiyaz,

 

There is a post that Get attachments content in SharePoint and send them in an Email, in the same way, you could get these files content, and following these steps in the post to structure an array variable and send it:

https://powerusers.microsoft.com/t5/Using-Flows/Outlook-email-sends-with-attachment-from-SharePoint-...

 

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

 

Hi @v-litu-msft 

 

Thank you , finally i managed some success , i used get file content function for one drive for business . and it worked 

Attached my flow . 

PAemail.JPG

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,911)