Now Assist Output Showing "\n" Instead of Proper Formatting

VianyNidamanuri
Tera Contributor
Hi Team, I am facing an issue with "Now Assist Problem Summary" output formatting. The generated summary contains escape characters like "\n" instead of proper line breaks. Because of this, the content is not readable and bullet points are not rendering correctly. Example: \n\nIssue:\n Laptop performance degraded... Instead of formatted text, it is showing raw newline characters. Can anyone help with: 1. How to remove or properly render "\n" characters? 2. Is there any way to format the output as clean text or markdown?
 
VianyNidamanuri_0-1782541853809.png

 

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @VianyNidamanuri 

 

If your target field is an HTML field/ Rich text field , you can try to convert "\n" into  <br /> tags and test.

 

Refer: https://www.servicenow.com/community/developer-forum/new-line-not-being-honoured-in-script-output/m-...

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

VianyNidamanuri
Tera Contributor

I’ve already tried implementing the solution using HTML tags in different ways, but the issue still persists. The response continues to appear as plain text and not in the expected structured format.

At this point, it looks like Now Assist might not support HTML rendering here. Please share if there’s any officially supported method to achieve formatted output.

In that @VianyNidamanuri  , raise a case with your ServiceNow vendor and get the confirmation from them.

Keep posted. 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti