cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Using apps media to illustrate an email send by flow

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

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
)

 

Snipaste_2020-01-03_13-51-13.pngSnipaste_2020-01-03_13-51-34.png

Sik

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

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?

Highlighted
Community Support
Community Support

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
)

 

Snipaste_2020-01-03_13-51-13.pngSnipaste_2020-01-03_13-51-34.png

Sik

View solution in original post

Highlighted

Smart ! Thankx a lot 🙂

Rémi

Helpful resources

Announcements
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.

secondImage

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 (8,271)