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 / HTML image in send ema...
Power Automate
Answered

HTML image in send email from shared mailbox

(1) ShareShare
ReportReport
Posted on by 260

I have chased this down a variety of rabbit holes but no luck.  A quick summary,

 

When I started testing, the email I sent to myself worked great because, I now believe, <img src"...> was a local file on my computer.  Soon discovered that other recipients not only could not see it but couldn't download it either.  

 

I then saved it to a company OneDrive and grabbed the shared link, but then I couldn't see it nor download it in my email either.

 

I then tried converting it to base64, saving that as a text file on the company OneDrive.  Then several things after that which also didn't work, either Power Automate initialize errors or image errors when viewing in Outlook.

 

Fairly certain that getting this to work is just a few steps away from where I am, but not sure what they are.  Greatly appreciate any help.  I thought there was a file convert to base64 function in Power Automate but couldn't find it.

Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,016 Super User 2026 Season 1 on at

    Hi @lmheimendinger ,

     

    I agree, you are probably very close to resolving this issue.  Have you tried?

     

    dataUri(body('Get_file_content_using_path'))

     

    how to add company logo in email body - Power Platform Community (microsoft.com)

     

    Let me know if this doesn't work - it looks good to me.  I am also going to test it out tonight too.

     

     

  • lmheimendinger Profile Picture
    260 on at

    I did try this but got this error

     

    Unable to process template language expressions in action 'Send_an_email_from_a_shared_mailbox_(V2)_2' inputs at line '0' and column '0': 'The template function 'dataUribody' is not defined or not valid.'.

     

    In email body I had this HTML code

     

    <img src="@{dataUribody('Get_file_content_using_path')}" > </img>

     

    My expression mimicing the article was 

    dataUribody('Get_file_content_using_path')
     
    So no it didn't work for me
  • Verified answer
    trice602 Profile Picture
    16,016 Super User 2026 Season 1 on at

    Hi @lmheimendinger ,

     

    Yeah, I tested this and got an error too!  Ok, I was successful with an image from both OneDrive and SharePoint; but not 100% sure this works for external users?!?  I could not get the image to appear in gmail but some progress - could just be a sharing issue.

     

    trice602_0-1694201212204.png

     

    trice602_2-1694201274954.png

     

    The left side is OneDrive; right is SharePoint.

     

    trice602_3-1694201313956.png

     

    OneDrive:

     

    trice602_4-1694201375313.png

     

    trice602_5-1694201425211.png

     

    SharePoint:

     

    outputs('Get_file_content_using_path')?['body']['$content']

    trice602_6-1694201505988.png

     

    trice602_7-1694201593449.png

     

     

     

  • lmheimendinger Profile Picture
    260 on at

    I tried duplicating your OneDrive steps but at first the dynamic content from the Get File Content using path didn't show up.  I got around that by changing advanced options from Yes to No, then did trhe compose step and send email step.  When I ran it got a similar error as before

     

    Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template function 'dataUribody' is not defined or not valid.'.

     

    I changed the No option back to Yes and re-ran but same error occurred.  The flow never gets to the send email step.

     

    The file I am using in OneDrive is a .jpg not a .png.  Might that make a difference?

  • trice602 Profile Picture
    16,016 Super User 2026 Season 1 on at

    Hi @lmheimendinger ,

     

    No, the file type png vs jpg won't make a difference.  Based on the error message, review the format, you could be missing a parenthesis. 

     

    trice602_0-1694219508130.png

    dataUri(body('Get_file_content_using_path_2'))  // in my example for OneDrive, double check the bold text here
     
     
     
     
  • lmheimendinger Profile Picture
    260 on at

    That worked!  Thank you for your assistance.

  • trice602 Profile Picture
    16,016 Super User 2026 Season 1 on at

    Nice!  Have a great weekend! 🙂

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard