Flow Designer Email format

Mart Sinimaa
Tera Guru

Hi,

I need to send email form flow and that email need to take variables from catalog variables. Now we have discovered that if variable(multi line text) contain line brakes (enters) then on email we don't see line brakes
multiline text example is:
test text 1
test text 2
test text 3

on email body I use 

"field name: "  + fd_data._1__get_catalog_variables.variableName;

on email body i see:

filed name: test text 1test text 2test text 3

any suggestion how to fix that?

1 ACCEPTED SOLUTION

Mart Sinimaa
Tera Guru

if someone had the same issue that I had then only suggested result form support is(add at the end red text):

var values = fd_data._1__get_catalog_variables.variableName.replace(/(?:\r\n|\r|\n)/g, '</br>'
 
good luck

View solution in original post

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe the same goes when you use workflow also

Can you try to print in logs

var values = fd_data._1__get_catalog_variables.variableName;

gs.info(values);

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Mart Sinimaa
Tera Guru

find_real_file.png

if i review on flow execution details then

Rendered HTML shows not right result
Raw Text and Code shows correctly

NB! and other emails that are sent out via email script (example group notification) there are line brakes also correct.

 

Hi,

what it printed in logs when you added the log statement?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

 I see like next:

find_real_file.png