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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Outlook - sending an h...
Power Automate
Answered

Outlook - sending an html email

(0) ShareShare
ReportReport
Posted on by 187

I'm trying to send an email using raw HTML data (including the <html> and <head> tags) which is dynamically created earlier in a compose step. I then place this compose output in the Outlook action, code view.

 

However, the action insists upon wrapping the output in <p> tags when saved, which breaks the HTML code when the email is viewed in GMail. I am unable to find a way to stop this from happening apart from adding the HTML code directly to the action step itself, which isn't possible for me, based on how the code is generated. If I use <html> tags in the code view, or a simple <span>, it just deletes them upon save and wraps in <p> tags again.

 

Any tips on how to avoid this content-breaking scenario?

Categories:
  • Paulie78 Profile Picture
    8,424 Moderator on at

    I had the same problem before, didn't find a solution. I used sendgrid.com to send the email instead. 😥

  • JamesSnaps Profile Picture
    187 on at

    Good to know I'm not alone @Paulie78!

     

    A little bit of tinkering and I've found that if I remove the <p> tags and then save, it will honour that going forward. I downloaded the flow as a zip and explored the code to be sure.

     

    However, the moment I click to open or edit that email step, it adds the tags back again. Checked the code again and yep, the <p> tags are included around the compose output in the body of the email action.

     

    So I suppose for now, I just have to remember to remove them every time I edit the flow just to be safe. But would be great if it didn't do it.

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    The problem is that the email will automatically add <HTML> tags around the body of the email and you can't have two sets.  The only solution is to find a way to strip the HTML and Head tags out of the text before you embed it or create a PDF of the HTML (which you can do with the tags in place) and attach the PDF.

  • Verified answer
    Paulie78 Profile Picture
    8,424 Moderator on at

    This is one of those times (which seem to be becoming more frequent) where the behaviour is different between tenants. I haven't tried to do this recently, and I remember it behaved exactly how you described.

    But now, on mine at least. I can drop in the output from a previous step and it does not mess with it.

    But you do have to be in the code view, not the visual editor. See here:

    OutlookHTML.gif

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard