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

Community site session details

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

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:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at
    Re: Outlook - sending an html email

    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
    Re: Outlook - sending an html email

    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
    68,678 Most Valuable Professional on at
    Re: Outlook - sending an html email

    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,422 Moderator on at
    Re: Outlook - sending an html email

    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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard