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 / HTML line breaks disap...
Power Automate
Unanswered

HTML line breaks disappeared

(1) ShareShare
ReportReport
Posted on by 2
Hi everybody,

I have several Power Automate Web flows where I set string variables with HTML code. Oddly, recently all the <br> tags have disappeared, resulting in a formatting mess (I use these variables to compose the text for emails).

Why did this happen, and how can I solve the issue? I cannot believe that Power Automate doesn't allow standard HTML code in variables. Please note that other tags remained unaltered.

Thanks,
Kind regards

Categories:
I have the same question (3)
  • Building with Why Profile Picture
    351 Super User 2025 Season 2 on at
    I use HTML in variables in several flows (including <br>) and have not seen any adverse changes recently.  Where specifically are you using the HTML?  I have found that depending on the connector HTML can operate very differently.  Though honestly I do not recall having problems with <br> before.
  • CU14031118-0 Profile Picture
    2 on at
    Hi,
    Thanks for your reply.

    I simply use the "Set Variable" action, and write the HTML code as its value. Then, I use these variables to create dynamic e-mail text.

    The odd thing is that all of sudden, all of flows removed the <br> tags from the value of the "Set Variable" action.

    I re-added the <br> tags, saved the flow, and it seems to retain them now. My question is: how reliable is Power Automate Web? This isn't the first time I've encountered unexpected behaviors. For instance, flows are now automatically collapsed, requiring me to manually expand all the actions, which is frustrating and time-consuming.

    Thanks,
    Kind regards
  • Building with Why Profile Picture
    351 Super User 2025 Season 2 on at
    I have seen Power Automate "help" by changing HTML placed in Outlook directly.  Very annoying.  
     
    When I use variables or compose statements and then place those into Outlook I do not get the same "help".
     
    In my experience I have not had problems with Power Automate just changing code.  I have seen Power Automate get sticky when trying to update.  So you think you have updated an expression but it doesn't take.  I just double check my updates before I close.  If it is saved before I close I don't have problems reopening it with the saved changes.
     
    As far as expanding steps.... yes annoying but when dealing with larger flows more helpful.
  • Ren Profile Picture
    2 on at
    Just want to up this question, I have a similar dilemma, and it won't be fix by using "Set Variable" since I'm using dynamic contents within the HTML viewer
     
    Just weeks ago, there are two <br> right after </div> and it's working fine. However, when I tried using my sandbox environment, the breaks were gone and it messes up the actual message sent (as a notification, in my example)
  • PF-09052052-0 Profile Picture
    on at
    Anyone have a resolution to this? I noticed this today also when reviewing an older PowerAutomate Flow / updating a new one.
     
    You can input the <br> tags and they will save if you look at the "Code view" for example:
    Link to Record</a>\n<br><br>
     
    But when you click into the variable and save again, these <br> tags just change to \n which does not format correctly when sending email.
  • CN-12021327-0 Profile Picture
    2 on at
    Hello, 
     
    I have this dirty workaround to prevent Power Automate from replacing "<br>" by "\n" : just declare a string variable, with value equalling "<br> :
     
     
    Now you can use your br tag anywhere by using the variable.
  • David_MA Profile Picture
    12,978 Super User 2025 Season 2 on at
    I see this occur when you use the new designer to format the e-mails. To resolve this, you can either use the old designer or add a compose action before your e-mail action and create the HTML body of the e-mail in the compose action. Then use the output of the compose action in the body of the e-mail action. 
  • MS-27061051-0 Profile Picture
    3 on at
    It's super frustrating:
    Each time I edit, I have to insert <br> all over again.
    I deal a lot with MS graph calls and Json formatting is essential
  • Dan S Profile Picture
    4 on at
    I have been having the same issue and it has been driving me nuts as I use a variable to compose HTML emails.  Today I created a new variable to store the string <br> and I inserted it wherever I wanted a <br> and it works great.

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard