Send Personalized Emails to Large Groups from Gmail with Mail Merge
1. Use Mail Merge with Gmail (Premium) to send personalized email messages to a large
group of people from your Gmail or Google Apps for Gmail account.
The program is written in Google Apps Script and includes premium features including:
1. Mail Open Tracking - you can track mail opens using Google Analytics.
2. Personalized Email Attachments - you can send different file attachments to different
email address. The files are picked from your Google Drive.
3. Support for Email Aliases - you can send mails from any other email address associated
with your Gmail account.
4. Splits Large Batches - Google only allows 100 emails per day so the Mail Merge
program will split bigger jobs into smaller batches and execute them on consecutive
days so as not to exceed the daily quota.
See this video tutorial on Youtube for a quick demo. This is for the standard (free)
edition of mail merge.
If you require custom Google Apps Script, please visit ctrlq.org. You can find more
useful Google Scripts on Digital Inspiration.
For help and support, contact the author at amit@labnol.org or tweet @labnol.
Step 1 - Create the Gmail Template
Compose a draft message in Gmail. You can add inline images, one or more file
attachments and also include recipients in the CC and BCC fields. The variable
columns are written in the format $%COLUMN-NAME%. For instance, if you have a
column named First Name in the Google Spreadsheet, you can add this variable in
the Gmail draft message as $%First-Name%
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 1
3. Step 2 - Copy the Mail Merge Premium Sheet
Open the Google Spreadsheet link that you received in my email and click "Yes,
make a copy" to create a copy of the sheet in your Google Drive.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 3
4. Step 3 - Prepare the Sheet
Open the Mail Merge sheet and add the variable fields that you have included in the
Gmail draft message. For instance, in our example, we have 2 variable fields - First
Name and Tour Date.
Please do not edit the initial three columns as these are used to hold the recipient's
name, their email address and any personalized file attachments that you would like
to send to that recipient. We also have a separate column for Mail Merge Status that
will indicate whether the mails have been sent to the recipients or not.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 4
5. Step 4 - Authorize the Sheet
Go to the Mail Merge menu and click Authorize.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 5
6. Step 4a
Click OK at the Authorization Required prompt.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 6
7. Step 4b
Click Accept at the Request for Permissions script. The script runs in your own
Google Drive and only needs permissions to send mails on your behalf. It does not
share or upload any of your data outside your Google Drive.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 7
8. Step 5 - Import the Contacts
The latest version of Gmail Mail Merge can directly import contacts email addresses
and first names from Google Contacts into the spreadsheet. You can create a new
Contacts Group in Gmail with one or more contacts and then choose Import
Contacts option to bring all contact in that group into your Mail Merge sheet.
Alternatively, you can fill in the email addresses and first names in the sheet
manually.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 8
9. Step 6 - Add the template data
Fill the sheet with the required data but keep the last column (Mail Merge Status)
blank. The next step will detail how you can add file attachments.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 9
10. Step 7 - Add File Attachments
The latest version of Mail Merge for Gmail lets you add one or more personalized
email attachments to different recipients. For instance, you may send file1.pdf to
Michael and file2.pdf + file3.pdf to Peter. All you have to do is upload the files to your
Google Drive and add the file URLs in the File Attachments columns. If you would
like to send multiple attachments, just separate the URLs with commas.
To find the URL of a file, right-click the file in Google Drive and choose Share. It will
then show the URL which you can copy-paste inside the Google Sheet. You can
leave the cell blank in case you do not wish to include any personalized attachments.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 10
12. Step 8 - Configure Mail Merge
1. Select the column in the spreadsheet that contains the recipient's emai address.
2. Select the Gmail template that you created in the previous step.
3. Choose your Gmail alias that will appear as the FROM address
4. Enter the replyTo address where you would like to receive replies
5. Enter your name that will appear in the message header.
6. Enter the Google Analytics Tracking ID (optional)
Click the Initiate Mail Merge button to save your changes. It make take 10 seconds
for Google Sheet to close the dialog, so please do not press the button twice.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 12
13. Email Output
The program will now run Mail Merge in the background and you may close the
Google sheet. The first batch of emails will go approximately 2 minutes after you
have clicked the Mail Merge button.
You can check the Sent Items folder of your Gmail mailbox to see all the sent
message. Here's a sample of how the mails will look like in the recipient's mailbox.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 13
14. Step 10: Mail Tracking with Google Analytics
Go to Google Analytics, switch to the Reporting tab and then choose the Event
report under Real-Time to track mail open activity in real time.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 14
15. Step 11: Email Open Reports
Inside Google Analytics, expand the Behavior group and choose Events. Now select
the date range (make sure it includes today's date) and you'll see all mail activity
around your email campaign.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 15
16. Email Report - Google Analytics
You can click the category name and switch to the Event Label dimension to see a
list of recipients who have read your email.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 16
17. Mail Merge - Daily Limit
You can only send mails to a maximum of 100 recipients per day using Google
Scripts for free Gmail accounts and up to 1500 recipients for paid Google Apps
accounts. If you are sending a mail merge to two addresses - one in the To list and
other CC list - that will be counted as 2 messages and you'll then be able to send
only 50 mails that day.
That's a limitation imposed by Google to prevent abuse of the platform.
You can however use the Mail Merge program to send mails to even larger groups
and the script will automatically split the job into smaller batches to prevent itself
from exceeding the quota. For instance, if you are sending mails to 150 recipients,
the program will send mails to the 1st 100 recipients in the first day and the next 50
will get the mails the next day when the quota has reset.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 17
18. Support
If you require custom Google Apps Script, please visit ctrlq.org. You can find more
useful Google Scripts on Digital Inspiration.
For help and support, contact the author at amit@labnol.org or tweet @labnol.
Mail Merge for Gmail v6.0
DEVELOPED BY CTRLQ.ORG 18