Replace New Line with HTML Line Break in ReportChat Scenario

LeifZ

Customer
Joined
Feb 14, 2025
Messages
17
Reaction score
2
My CRM is web based so the chat message gets logged in one continues line. I am trying to replace the new line character with a html line break "<br>", however I cannot get it to work.

This does nothing
[[ChatMessages].Replace("\n","&lt;br&gt;")]

This inserts a line break at ever space.
[[ChatMessages].Replace(" ","&lt;br&gt;")]
 
Try with:
[[ChatMessages].Replace("\\n","&lt;br&gt;")]
 
  • Like
Reactions: Evolute IT
You can check the existing CRM integrations that do this for different CRMs. In some cases a <br> is required, but there are other possible approaches.
 
  • Like
Reactions: Evolute IT
You can check the existing CRM integrations that do this for different CRMs. In some cases a <br> is required, but there are other possible approaches.
I Reviewed Zen, SalesForce and Zoho for guidance.
This is what they have
[[ChatMessages].Replace("\","")]
 
This worked
[[ChatMessages].Replace("&#10;","&lt;br&gt;")]