Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How To: Powerapp builds HTML to Office365.SendEmail w/ Inline image

Thanks in advance to anyone who can provide insight! 🙂


Building a powerapp that walks a user through a series of screens to collect responses. Those responses then get compiled into an HTML input box for the purpose of then using the HTML input box as the body of an email sent via Office365.SendEmail. 


The problem I am trying to solve is this:

I need to add a logo image inline within the HTML so that the image displays inline in the sent email. Within the company O365 / exchange environment a simple <img src.... tag does not display the image itself in the email. Regardless of the URL being internally / internal publicly accessible or externally hosted.



Final button function is:

Office365.SendEmail(Office365Users.MyProfile().Mail & ";" , var_EmailSubject,(HtmlText_EmailBody.HtmlText),{Importance: Normal, Cc: var_EmailCC1 & var_EmailCC2,IsHtml: true})


Example of body content:



    <th><!-- logo image --></tr>





    <td>gathered text</td>




Power Apps
Power Apps

@KW001, it sounds like you want to send an email with HTML content.


I know the perfect expert who has tinkered with scenarios like this-- @KickingApps! She has experience with different methods and caveats that can be very helpful.

Thanks for the reply @Mr-Dang-MSFT !


That's what I am trying to do:) However I need the image to be embedded in the email rather than just an HTML <img> tag that points to a web resource. MS Outlook does not want to render the image when it's done as an <img> even if the source is within the intranet and publicly available on a website, sharepoint, etc. There isn't even a "load this content" option for items like this. 


I looked at the send email code for attachments, but how do you get the attached image inline? It's not useful in this scenario to simply attach the image to the email. Presentation is the focus.


Is there a different email function? Trying to avoid also implementing MS FLOW just for this single inline logo image...

@Mr-Dang-MSFT - Thanks for the mention. 

@KW001 - Sorry I am just replying; I haven't checked community in awhile. I will take a look at this as soon as I can get some time. (Promising to prioritize).

@KW001 In the below, I refer to links in my HTML text and the image is the email body. Is this what you have in mind?email.jpg

@KickingApps thanks for taking the time to help me with this!!


Yeah the end goal is to have inline displayed images in the email much like you have displayed. The problem I am running into is that within the corporate O365 environment when I use a powerapp to build the HTML code (html table in this case) that inclues an image in one of the table cells, the image does not display in the email when it's an <img src=....> html tag. I get the image not loading icon in the received email. 


2019-10-24 07-49-55_Cortana.png


I don't want to use the (example, not my code)

{Attachments:Table({Name:"file1.jpg", ContentBytes:Camera1.Photo, '@odata.type':""})}

Since that just attaches it to the email in Outlook, rather than displaying it inline. 


The <img src> tag URL being used is an image on the corporate Intranet, and universally available within the company intranet. 


All that being said the PowerApp I have built includes said Image as part of the PowerApp UI. So the image is part of the media / collection of the PowerApp as well. I just don't know how to embed the image inline when using the 

Office365.SendEmail(Office365Users.MyProfile().Mail & ";" , var_EmailSubject,(HtmlText_EmailBody.HtmlText),{Importance: Normal, Cc: var_EmailCC1 & var_EmailCC2,IsHtml: true})


(Note: The PowerApp gathers information and stores them in a number of variables using the previous screens selections made by the user. It then builds an HTML output which is the "HtmlText_EmailBody.HtmlText" above. And that is then used as the email body being sent via the "Office365.SendEmail..." function. 


Hope this clarifies better! Any and all help would be appreciated! If I have to drastically change the workflow or path to generating the email contents that is totally fine! Anything to get the desired output is great!

@KW001 - Add you photos to a collection in your app. Then put this in you your html code:
<td valign='Top'>
<img src=" & Image & " style=""width:300px;height:250px;"">



For me, Image is the name of the column in my collection where the actual image is stored. Let me know how it goes. I

@KickingApps To my shame I am struggling with the call to the collection as you noted.


The app has the logo image on all the screens as a media asset. I then try to load that logo into a collection (I have tried to pull that image from screens to add to the HTML and that fails to be part of the email as well). I notice in the collection the picture is not under the image column, but rather the URL column. 


All that being said I am working on the HTML code and struggling with the syntax. The wizard auto fill text is not helping either in this case.


		<img src=""" & Collection1[what goes with this?] & """ style=""width: 200px; height: 200px;"" />
		<img src=""" & 'Logo' & """ style=""width: 200px; height: 200px;"" />

It amazes me that it's this hard to include native media from the app into the HTML email! arrgh!!! 


Any and all help is MUCH appreciated!


First, let me begin by apologizing. I realized I left a few things out in my haste to get you a reply.  That said, I hope this helps you acheive your goal. If you have questions, reach out and I will help you work through it.



Reviewing! Keep you posted!

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,323)