Mail Merge is a popular feature of Microsoft Outlook and Word but if you happen to live in the world of Gmail or Google Apps, no worries as even Gmail users can use the magic of Google Scripts to perform mail merge. You can write a single message in Gmail and send personalized emails to multiple recipients without any effort.

Before we get started, watch this video tutorial to know what’s in store for you:

Mail Merge with Gmail

Mail Merge comes in two editions – free and premium. The premium edition includes extra features like support for personalized email attachments, email tracking and you can even opt for one-to-one support.

Features Free Premium Premium+
Supports Gmail and Google Apps Yes Yes Yes
Include file attachments Yes Yes Yes
Send mails using a different email alias No Yes Yes
Track outgoing messages with Google Analytics No Yes Yes
Include personalized file attachments No Yes Yes
Specify a different Reply-to address No Yes Yes
Auto-resume when email quota is exhausted No Yes Yes
Inline images support No Yes Yes
Installation Manual (PDF) included No Yes Yes
Support options Support Forums Email Support One-to-one support over Skype or Google Hangouts
Forever Free Get Premium Get Premium+
You may make payments through PayPal or your credit and debit cards. You can request a refund within 24 hours of purchase.

There’s a daily sending limit for Gmail so the premium edition will automatically split the mail sending job into smaller batches and execute them on consecutive days so that you never exceed the daily quota.

How to do Gmail Mail Merge

Open Gmail, compose a new message and save it as a Draft. This will be just like any other email message except that you need to mark text that will be personalized in outgoing messages.

For instance, the first line of your messages could read Dear First-Name and you need a way to tell Gmail that First-Name is a variable field. This can be done by replacing First-Name in the message with $%First-Name% as shown in the following screenshot. Replace all variable fields that are either in the body or the subject line of your Gmail message (Video).

Gmail Mail Merge

You can also include one or more attachments in your Gmail message. If you wish to include inline images in the mail, please upload them to a site like and then drag and drop them into your Gmail message (see PDF Tutorial) or switch to the premium version.

Save the draft message in Gmail and then make a copy of this spreadsheet in your Google Drive. This sheet has some data here to help you get started. You just need to change the column names in the spreadsheet such that they match the various variable fields that you have marked in your Gmail draft message.

You can add (or remove) any number of columns but the one mandatory column that should exist in your spreadsheet is labeled Email Address. Just ensure that the column names in the spreadsheet and the variable fields in the Gmail messages are exactly same and that every Gmail variable is mapped to a column in the mail merge spreadsheet.

You need to have one row of data in the Google Spreadsheet for every recipient and the values of that particular row will be used to send a personalized message to that recipient. Once you’ve filled the rows in the sheet with the necessary data, go to the Mail Merge menu in the Google Sheet and click Initialize to authorize the program. Next choose “Start Mail Merge” from the same menu and choose the Gmail draft template you created earlier from the drop-down.

start mail merge

Also enter the Sender’s name (this will show in the FROM field of your outgoing messages), tick the BCC option (if you want to get a copy of the outgoing emails) and hit Start Mail Merge. That’ it.

Once the mail merge is complete, a new column “EMAIL_SENT” will be added to every row indicating that the row need not be processed should you run Mail Merge again on the same set of data. If you plan to include that row in mail merge again, just change the Mail Merge status column for that row from EMAIL_SENT to blank.

Gmail Mail Merge – Troubleshooting Tips

  • It’s always a good idea to test your Gmail templates before sending the email blast to dozens of people. For that, just have one or two data rows in your spreadsheet and put your own email addresses in the Email fields to ensure that your outgoing emails are working as expected.
  • If you are getting the Service Invoked too many times error, it is because Gmail has a 100 message/day daily sending limit even for Google Apps users. If you would like to send more, switch to premium – it won’t increase your quota but will spread the mail merge over consecutive days automatically.
  • If you find the concept of variables confusing, please see this simpler version of Gmail Mail Merge that uses HTML Mail, allows file attachments and also supports Google Analytics tracking.

Awesome Google Scripts → Custom Google Scripts →