web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issue in displaying ba...
Power Automate
Unanswered

Issue in displaying background image in power automate

(0) ShareShare
ReportReport
Posted on by
 
Hi All , 
 
i am trying to send congratulation email via power automate , issue is with setting image as background in email , Steps in flow:

1) i have image copied on my Onedrive and am using get file content to locate image 
2) post that compose function using datauri
dataUri(outputs('Get_file_content')?['body']) 
3) Initialize variable = V_Image
concat('<img src="',outputs('Compose'), '" alt="Super" />')

4) Send an email (V2) and in mail body using HTML printing V_Image . 
 
I am getting email with image stored, however my requirement is to have this image set as background image for entire page in outlook and i can write congratulations message inside the image.

 
Regards
 
 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Hello,
     
    Try using this HTML template in your "Send an email (V2)"

    Just update the "background-image: url()" property to your image.

    Please note, datauri encoded images might not work on other email platforms like Gmail.  I get them to work in Outlook but Gmail just removes an image stored inline.  If you use a publicly hosted image file url then it works fine for me.


    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Background Image Email</title>
    </head>
    <body style="margin: 0; padding: 0;">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url( '<data_uri_OR_url_to_image_file>' ); background-size: cover; background-repeat: no-repeat; background-position: center; min-height: 100vh;">
            <tr>
                <td align="center" style="padding: 20px;">
                    <div style="max-width: 600px; background: rgba(255,255,255,0.8); padding: 20px;">
                        <h1>Welcome!</h1>
                        <p>This email has a background image behind the text.</p>
                    </div>
                </td>
            </tr>
        </table>
    </body>
    </html>


    Here's a blog post in more detail on how to do this:
    https://marknanneman.wordpress.com/2025/01/28/how-to-send-an-email-with-a-background-image-in-power-automate/


    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard