Google Sheets – Mailmerge with Multiline Cell Content

gmailgoogle docsgoogle sheets

I'm trying to create a batch of email messages using data from a Google Sheets.

The Sheets has these columns: name, email address, message

I tried 2 google Add-ons: Yet Another Mail Merge (uses Gmail for the mail composition) and Merge by Mailchimp (uses Google Docs for the mail composition).

With both, the same issue occurs: the generated emails do not respect the linebreaks, and so the message is just one big chunk of text, aweful to read at.

Do you know of a way to solve this?

I've tried this, and it almost worked (with YAMM, it did not work with MbM): have a "before" column with <pre> as value and another "after" column with </pre> as value.

And then, in the mailmerge, inject <<before>> <<comments>> <<after>>

But that create another problem: many emails have their body trimmed for some strange reason. I'd rather solve this inside Google Sheets if possible.

Best Answer

You can use Yet Another Mail Merge to produce what appears to be line breaks by breaking up the message content into different columns.

Wherever you need to see a line break, insert a column with a Break # header. The cells below the header in that column should be blank.


  1. In Google Sheets for instance, your columns might end up looking like this:

    Email Address, P1, Break 1, P2, ​Break 2, P3, ​Break 3 and P4


  1. In Gmail, compose the draft message like this. Also, make sure the font size for the breaks is set to small.

    enter image description here


  1. Send yourself a test to verify. Here's the result I got with this configuration.

    enter image description here