Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

mail merge function with excel online and one drive file attachment

(0) ShareShare
ReportReport
Posted on by 21
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 
  • Verified answer
    Imthi Profile Picture
    21 on at
    Re: mail merge function with excel online and one drive file attachment

    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

  • v-litu-msft Profile Picture
    on at
    Re: mail merge function with excel online and one drive file attachment

    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-but-doesn-t/m-p/509518

     

    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.

     

  • Imthi Profile Picture
    21 on at
    Re: mail merge function with excel online and one drive file attachment

    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 

  • Verified answer
    v-litu-msft Profile Picture
    on at
    Re: mail merge function with excel online and one drive file attachment

    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/331234

     

    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.

  • Imthi Profile Picture
    21 on at
    Re: mail merge function with excel online and one drive file attachment
    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.
  • Imthi Profile Picture
    21 on at
    Re: mail merge function with excel online and one drive file attachment

    flow screen 

     

    Hi @v-litu-msft 

  • Imthi Profile Picture
    21 on at
    Re: mail merge function with excel online and one drive file attachment

    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 

  • v-litu-msft Profile Picture
    on at
    Re: mail merge function with excel online and one drive file attachment

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow