Hi 🙂
I'm looking for how to add to the body of an email sent via Flow from Powerapps a media stored in the media of the application.
To be more precise, I have in the media of the app a logo that I want to use in the body of a notification email sent to users. Is it possible ?
I tried to store this image in SharePoint or OneDrive, then to use it in my html email text, but it does not appear (it seems that this case has already been discussed in other threads in the community).
Thank you,
Rémi
Solved! Go to Solution.
Hi @RMA13 ,
I can provide another workaround. There is no need to store the image into SP/OneDrive, just send the email with image in body directly in PowerApps via HTML format.
Use JSON function to convert the image to JSON format( including Binary Data), and add the JSON to the HTML statement, then use Office365.SendEmail to send the image to email.
Set(
VarHtmlImg,
"<!DOCTYPE html>
<html>
<head>
<title> Page Title </title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph</p>
<img src=" & JSON(
UploadedImage1.Image,
JSONFormat.IncludeBinaryData
) & ">
<p>This is a paragraph</p>
</body>
</html>"
);
Office365Outlook.SendEmailV2(
"v-sikyan@microsoft.com",
"Test Email",
VarHtmlImg
)
Sik
Have you checked out this thread? https://powerusers.microsoft.com/t5/I-Found-A-Bug/Try-to-Send-Email-using-MS-FLOW-with-Images-embedd...
Be sure the image is publicly available in the IMG tag SRC. Is this email going to external email addresses or internal?
Hi @RMA13 ,
I can provide another workaround. There is no need to store the image into SP/OneDrive, just send the email with image in body directly in PowerApps via HTML format.
Use JSON function to convert the image to JSON format( including Binary Data), and add the JSON to the HTML statement, then use Office365.SendEmail to send the image to email.
Set(
VarHtmlImg,
"<!DOCTYPE html>
<html>
<head>
<title> Page Title </title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph</p>
<img src=" & JSON(
UploadedImage1.Image,
JSONFormat.IncludeBinaryData
) & ">
<p>This is a paragraph</p>
</body>
</html>"
);
Office365Outlook.SendEmailV2(
"v-sikyan@microsoft.com",
"Test Email",
VarHtmlImg
)
Sik
Smart ! Thankx a lot 🙂
Rémi
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
51 | |
47 | |
32 | |
32 |
User | Count |
---|---|
258 | |
89 | |
78 | |
67 | |
67 |