You also need to escape the backslash with this /\n/ or use replace(/\\n/g, "\\n") .Also you can do the string escaping online for any other type of string that you need to pass through json.
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
replace(/\\n/g, "\\n") Doesn't that just replace "\\n" with "\\n" ? or, with the escaped slach, \n with \n?
you write I need to escape the backslash with /\n/ I'm not following. Are you saying that "/" escapes the back slash or.. that paired slashes act like quotes in hubspot fields?
Thanks a lot! I'll experiment with your pointers and see if it works.