I’m new to n8n and loving it, but must be missing something with the JSON body as it is taking my string and removing the /n/n which then breaks the json as it can’t have multi lines.
Works great when the AI gives me one line to send back, but as soon as I have \n\n n8n converts it from what I can see to the real deal.
How can i take the string and keep it intact so the \n\n\ all stay happily in place?
Tried googling, searching but seems like I’m missing something really tiny?
Thanks for the reply, lead me down the rabbit hole and correct it was the double \ needed as it looks like the json seems to strip one \ off for some weird reason when it went out. So just added some weird regex command that chatgpt gave me to find and replace with doubles and bamn it worked
Json just sees it and uses it for a new line.
So using another \ will simply tell it to not do that as it will escape the character.
The replace should not need a regex though. .replaceAll('\n','\\n') should do it.