web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Use flow to send an em...
Power Automate
Unanswered

Use flow to send an email (through Gmail) that includes a unique attachment, the location of which is listed as a column in Excel table

(0) ShareShare
ReportReport
Posted on by 2

I am brand new and doing my first flow.  I am sending customized email to each of my clients using an excel table which has their contact name, email address, etc and I have completed that flow and it works..... but I want to attach their individual bill to the email.   I used a mail merge to process the bills and have saved each individual bill in my One drive and I have the location listed as a column in the same Excel table, so each row is a different client ID, name, email address, & invoice location but I do not know how to "turn that location info into the actual attachment" to the email.  Hope this makes sense.  Thanks for any assistance.

 

Example of the location field: (I have it as text as I wasn't sure how to format)

C:\Users\Jen\OneDrive - ABCco\Mail Merge Files\INVOICE1.docx

 

Categories:
I have the same question (0)
  • DAllen365 Profile Picture
    446 on at

    Hello @jhm,

     

    If the files you want are in OneDrive for Business, you use the Get File Metadata Using Path action, then pass this to the Get File Content action.  Then you can use the output of those 2 actions in the send an email action to get the filename and the actual content of the file.  In my sample, the file is in my OneDrive.  I'm using just a generic send an email action instead of the Office 365 send an email.  But it works:

    send attachment.png

     

    And it renders this email:

    email output.png 

     

    Hope this helps!
    ----------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

  • jhm Profile Picture
    2 on at

    Thank you for your help.  Pretty sure I am in over my head on this.  I was able to get it to locate the first name of the file but not to retrieve it and not to continue or add as an attachment.  I am likely not putting in the right values in the flow but don't fully understand what they refer to either so I think I will have to learn more before I can go forward.  Thank you for trying

  • DAllen365 Profile Picture
    446 on at

    @jhm

     

    I apologize for the delay but I whipped up a sample for you that should be exactly what you requested in your original post.  Since your original list is in Excel, you will have to use the Excel premium actions to do that.  The logic is as follows:

     

    1. Get your master account list from your OneDrive and list all rows in the Excel file
    2. For each row in the Excel file
      1. Read the details of the row
      2. Using the filepath in the Excel, get the invoice properties from OneDrive
      3. Get the actual invoice file content using the ID from the step above
      4. Send email to the address from the row and attach the invoice file 

    The master accounts list in my OneDrive is like this:

    Accounts Excel.png

     

    The flow:

    flow1.png

    flow2.png

    Then when I run it, I got the right correct email to my 2 different email addresses I used:

    invoice email.png

     

    I think the trick is how to get the file from the OneDrive.  You either need the ID or the path, and the path is assuming from the cloud not your local file syncd path.  Let me know if you have more questions, I'm happy to try and help. 


    ----------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

  • DAllen365 Profile Picture
    446 on at

    @jhm, just wanted to check in to see if you had a chance to review my solution?  I hope it was helpful!


    ----------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 600

#2
Valantis Profile Picture

Valantis 453

#3
11manish Profile Picture

11manish 356

Last 30 days Overall leaderboard