
We are unable to send multiple lines of data through the ServiceNow plugin. The data is being sent and displayed as a single line.

When using the MJSV step with the newline character (\n) to send the data in multiple lines, the ServiceNow plugin returns the following error:
“The payload is not valid JSON.”

Use the escaped newline character (\\n) instead of the actual newline character (\n) in the MJSV step. This ensures that the JSON payload remains valid while allowing ServiceNow to interpret the escaped newline as a line break.
Use the following JavaScript code in the MJSV step:
var output = input.replace(/\s*\|\s*/g, "\\n");
Using the actual newline character (\n) directly within the JSON payload can make the JSON invalid, resulting in the “The payload is not valid JSON” error.
Using the escaped newline character (\\n) keeps the JSON payload valid and allows the data to be displayed on multiple lines in ServiceNow.
Single-line data can be passed directly through the ServiceNow plugin. However, for multiline data, the line breaks must be passed within the JSON payload