Line breaks not working with Email using Power Automate FLOW
- This topic has 3 replies, 2 voices, and was last updated 1 year, 4 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Modern DFFS › Line breaks not working with Email using Power Automate FLOW
Hi,
I upgrade DFFS to the latest version 1.2.0.0 and tested email workflow using Power Automate FLOW. What I noticed is that line breaks entered in “Body” section (when the rules are setup) shows up as “\n” in Power Automate Flow. This does not get rendered properly in outlook when the email is delivered. Regular HTML tags seems to be working fine (I just had an tag and it worked OK).
I did another test with <br> where line breaks were supposed to be and they rendered fine in the delivered email.
Is there a way to get the line breaks converted automatically from “\n” to “<br>” instead of having to manually do this for all the emails?
Hi,
I have updated the user manual FLOW section with instructions on how to replace linefeed with <br>
This is the change you must do to Body
Click the fx button and insert this:
replace(triggerBody()?['Body'],decodeUriComponent('%0A'), '<br>')
Alexander
Thank you for this quick and simple workaround. I have tested this and can confirm this is working. I am not sure if the code is the same for send later flow. I had to use this to make it work. replace(items('Apply_to_each')?['Body'],decodeUriComponent('%0A'), '<br>')
Thanks – I was a bit to quick on the last edit and have updated the step for “send later” now. You can use what you suggested, but inside a foreach loop you can also just use item() like this:
replace(item()?['Body'],decodeUriComponent('%0A'), '<br>')
Alexander