Hi all
I have a flow that drops a Power BI file into an email by attachment with a PNG file (or PDF if that works better). Pretty easy to setup and within my body i've also included our team logo using some HTML. What i'm trying to also do is include as screenshots within the body of email the same PNG screenshot i have attached. Is there a way to do that?
Hi @Antonio1086
You can embed images into HTML source code of your email, doing something like this:
The expression used in the compose action is the following:
<img src="data:@{outputs('Get_file_content_using_path')?['body']['$content-type']};base64,@{outputs('Get_file_content_using_path')?['body']['$content']}" />
And remember to use html view when composing the email ("</>" icon).
Hope it helps!
Ferran
Thank you for your reply, would this also work if my screenshots i'm needing to be in body of email are derived by the Export to File for Power BI Reports action? I see that you're source pictures are coming from a sharepoint and unfortunately, that's not the initial destination. My trigger is a weekly reoccurrence as well.
You can try to export Power BI file to image format (PNG/JPG) and use the output as I use the "get file content" action.
Regards,
Ferran
I think i'm following your suggestions. Would help if i knew HTML better but i'm learning as i go... When i test the flow i get an email with a ton of wingding text.... Can you help with what i'm doing wrong in my HTML please?
<html>
<body>
<img src="C:\Users\xxxxxxxx">
</body>
</html>
<p><br>
@{outputs('Compose')}
<p style="font-family:CalibriLight">
<p style="font-size:16px">
Attached you'll find the monthly update to the ABAC Report. <br>
Thank you!</p>
That's fine, although the problem I see is that you're exporting the file to "C:\..." and you should store that in a SharePoint site or OneDrive -> Save a paginated report to OneDrive for Business or SharePoint Online - Power BI | Microsoft Docs
When you receive the email, what do you see?
Thank you for your continued help with this, i know i'm close. So that C:\ path is actually just a screenshot of our teams header/ribbon for email distros. I will definitely change that to my one drive once i go live with it. But until then just testing that. The images that i'm trying to embed are in the outputs expression. But when i run the flow i just get a very large email with wingding text, basically freezes my outlook so i can't share a screenshot. When i remove the outputs expression, i get our team header, and the text that i included within the body. And the PDF (or PNG, whichever would work easier for this i'm indifferent to), is attached but not embedded in the body of the email.
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
37 | |
24 | |
21 |