Remove multiple line break (but keep one)


for my scenario I want to collect the content of emails and store it in a database.
It works fine, except that collected emails contain several line breaks ; I don’t know why because the email seems to only contain one line break in Outlook…


I can remove the line breaks, but I would like to keep one instead.

How could it be done please ?

Thanks a lot

Hello @Fanch,

Here’s a little trick you might be able to use involving split() and join() methods, without using an additional module/operation.


You split up the text by {{newline}}, and if any are blank then the function removes them from the final array. Then, you use join() to put the lines back together, using {{newline}} as a separator.

Hope that works for you!


Perfect !!

Thank you

1 Like