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

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard