Notifications
Announcements
Hi,
I have string values returned from Power Automate that contain line breaks expressed as "\n" within the text. I tried several alternatives to replace those with "<br>", "</br>", etc., but HTML does not seem to work.
Which formats are supported for line breaks?
Thanks,
Agustín
Hi @adafieno ,
Did you try to use "<br />"?
Thanks for your answer, Renato. I did try "<br />" and "<br/>", but no luck.
I am sure that I am missing something.
HTML tags won't work in WebChat control. But if you are returning text that you trying to format into multiple lines from Power Automate, you can try using markdown tags instead of HTML tags.
To force a line break, try placing 2 empty spaces at the end of the String. There are generally a couple of ways to do this in markdown notation, see which one will work for you.
Here are the references to markdown syntax on line breaks:
https://www.markdownguide.org/basic-syntax/#line-breaks
https://markdown-guide.readthedocs.io/en/latest/basics.html#line-return
Thanks. That doesn't work either. It just renders two spaces wherever there's a "\n" string.
I need a way to insert actual line break characters into the string to render correctly in markdown. The double spaces force the new line, but it assumes that the text has a line break in the end.
Did you use /s/s markdown tag to indicate a double empty space?
Thanks. Yes, I did use "/s/s", and also "\s\s" which is what the documentation you sent me says.
hi @adafieno did you use encoding html https://www.w3schools.com/tags/ref_urlencode.ASP
%0A
is equals to break
Thanks for your suggestion, Christian. That type of encoding doesn't work either.
It seems like the problem lies within the rendering component of Power Virtual Agents. It looks like it's not able to parse and render line breaks.
@adafieno did you try encoding uri? https://powerusers.microsoft.com/t5/Building-Flows/Replace-Newline-in-Flow-Expression/td-p/57333
In this example the user is deleteing a line break.
see in PA you an encode an decode uri, so you can replace <br> with %0A%0A and in a compose action you can see a line break the you can send your output response to PA again.
Thanks, Christian. That did it. Much appreciated.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 270 Super User 2025 Season 2
Romain The Low-Code... 181 Super User 2025 Season 2
S-Venkadesh 93 Moderator