cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
garrywilmeth
Helper I
Helper I

Embed multiple images in email

Hello,

I have a flow that creates a Microsoft List item from a form response. The form has 10 separate image upload items with up to 3 images per item. I am parsing the JSON for each, getting the SharePoint file content and then adding the attachments to the item that gets created. This works great.

 

I have a few users of the solution that just want an email report with the images, however the total size of the combined images is too large for most email provider limits. I would like to embed the images in the email. I tried the "Embed the image content directly into the email with Base64" from How to embed an image into an email with Power Automate (tachytelic.net) by doing the following:

1) initialize a string variable called ImageLinks near the top of the flow with no initial value.
2) insert an append variable after each get content action using the expression in the above tutorial for each section

3) Adding ImageLinks dynamic content to the body of a Send Email action.

 

The flow runs fine, however the email does not display anything.  When I inspect the email I see the following.

 

Screen Shot 2021-08-01 at 1.02.43 PM.png

 

Any thoughts as to what I might be missing?  Here is the code from the append to string variable for one of the items:

 

 

{
    "inputs": {
        "name": "TheImageLinks",
        "value": "<img src=\"data:@{outputs('GetContent-Perimeter')?['body']['$content-type']};base64,@{outputs('GetContent-Perimeter')?['body']['$content']}\" alt=\"My Image\" />"
    }
}

 

 

Thanks,

 

Garry

3 REPLIES 3
Gristy
Resident Rockstar
Resident Rockstar

Whether the content is embedded or attached i do not think it will bypass the limits so you will run into the same issue regardless.

 

 

They are all internal users, so I suppose I could increase the limits.  Can you tell what I am doing wrong based on the above?  I tried this with 2 images and it doesn't display them.

Gristy
Resident Rockstar
Resident Rockstar

not too sure with your code to be honest - but maybe just hyperlink them if they are internal users to a SharePoint library or something.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,367)