cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RMA13
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
v-siky-msft
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

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?

v-siky-msft
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

Smart ! Thankx a lot 🙂

Rémi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,840)