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 / text formatting for Cr...
Power Automate
Suggested Answer

text formatting for Create HTML action ( need to have a new line)

(0) ShareShare
ReportReport
Posted on by 62
Hi, 
I have enabled multiline for my text input and still my email body I won't gets the correct formatting for the text as it doesn't have the line breaks, as you can see in the output of the "create HTML for peepo" action it correctly shows how the text would be in the table,  but am not getting the result in email body.
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    991 Moderator on at
    To format it so that you have page breaks in the final HTML in your email, you need to repalce the "New Line" ("\n") characters with HTML line breaks.

    Here's how you can do it.


    1. Save a "New Line" in a compose.

    Just make a compose, press enter to make a new line character, then name it.
    If you peak at code view, you'll see that this holds a "\n".  If you look at your multi line text values in your final HTML in a flow run, you'll see this same character .  We need to repalce it with "<br>"
     

    2.  Use Replace() to Replace all New Lines in your HTML Table with "<br>"

    You can add a compose after your HTML table action and write the replace function there.
    The expression looks like the following.  You are looking for every new line like the one in your "New Line" compose and replacing it with "<br>"
    replace(
    body('Create_HTML_table'),
    outputs('Compose_New_Line'),
    '<br>')


    3.  Put the Final Updated HTML in your Email

    Just reference the compose with the updated HTML.  Alternatively, you could put the code from the step above directly in the email body.

     

    The final email looks like this:
     


    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  
  • uchiha1234 Profile Picture
    62 on at
    it worked, nice trick, Thanks legend
  • Mark Nanneman Profile Picture
    991 Moderator on at
    Glad it worked, @uchiha1234 !

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 308

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 226 Most Valuable Professional

Last 30 days Overall leaderboard