How to populate body.html with multiple lines in watcher

Hi,

I am trying to populate an email with embedded CSS and is spread across multiple lines. Watcher allows html body to be populated in one line.

e.g.
</>"body": {
"html": "

Email Text

"
}</>

I cannot present actual email template being used but it is spread across multiple lines. I tried it within single pair of double quotes but, elastic does not allow that configuration to be saved (it being invalid JSON).

</>"body": {
"html": "

Email Text

" }

I tried a valid JSON way to populate multiple string values in one,

</>"body": {
"html": ["",
"",
"

Email Text

",
"",
""]
}</>

It allows to click "Save" but presents an error while saving it.

Watcher: [x_content_parse_exception] [1:581] [script] Expected START_OBJECT but was: VALUE_STRING

It will really be help, if someone suggest a valid way to populate a way to give html in multiple lines.
Thanks!

hey,

I do not follow your examples/snippets in your post, maybe due to formatting. You have to put all of your HTML in one string, that is properly JSON escaped, otherwise the watch will not be stored/work properly.

--Alex

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.