Gmail Mail Merge with Personalized Attachments and Email Tracking

18
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 [email protected] 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

description

Mail Merge with Gmail, Send personalized file attachments, track mail opens with Google Analytics. http://ctrlq.org/

Transcript of Gmail Mail Merge with Personalized Attachments and Email Tracking

Page 1: Gmail Mail Merge with Personalized Attachments and Email Tracking

Use Mail Merge with Gmail (Premium) to send personalized email messages to a largegroup 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 consecutivedays 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 moreuseful Google Scripts on Digital Inspiration.

For help and support, contact the author at [email protected] or tweet @labnol.

Step 1 - Create the Gmail TemplateCompose a draft message in Gmail. You can add inline images, one or more fileattachments and also include recipients in the CC and BCC fields. The variablecolumns are written in the format $%COLUMN-NAME%. For instance, if you have acolumn named First Name in the Google Spreadsheet, you can add this variable inthe Gmail draft message as $%First-Name%

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 1

Page 2: Gmail Mail Merge with Personalized Attachments and Email Tracking

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 2

Page 3: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 2 - Copy the Mail Merge Premium SheetOpen 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

Page 4: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 3 - Prepare the SheetOpen the Mail Merge sheet and add the variable fields that you have included in theGmail draft message. For instance, in our example, we have 2 variable fields - FirstName and Tour Date.

Please do not edit the initial three columns as these are used to hold the recipient'sname, their email address and any personalized file attachments that you would liketo send to that recipient. We also have a separate column for Mail Merge Status thatwill indicate whether the mails have been sent to the recipients or not.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 4

Page 5: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 4 - Authorize the SheetGo to the Mail Merge menu and click Authorize.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 5

Page 6: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 4a

Click OK at the Authorization Required prompt.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 6

Page 7: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 4b

Click Accept at the Request for Permissions script. The script runs in your ownGoogle Drive and only needs permissions to send mails on your behalf. It does notshare or upload any of your data outside your Google Drive.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 7

Page 8: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 5 - Import the ContactsThe latest version of Gmail Mail Merge can directly import contacts email addressesand first names from Google Contacts into the spreadsheet. You can create a newContacts Group in Gmail with one or more contacts and then choose ImportContacts 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 sheetmanually.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 8

Page 9: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 6 - Add the template dataFill 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

Page 10: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 7 - Add File AttachmentsThe latest version of Mail Merge for Gmail lets you add one or more personalizedemail attachments to different recipients. For instance, you may send file1.pdf toMichael and file2.pdf + file3.pdf to Peter. All you have to do is upload the files to yourGoogle Drive and add the file URLs in the File Attachments columns. If you wouldlike 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 willthen show the URL which you can copy-paste inside the Google Sheet. You canleave 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

Page 11: Gmail Mail Merge with Personalized Attachments and Email Tracking

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 11

Page 12: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 8 - Configure Mail Merge1. 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 address4. Enter the replyTo address where you would like to receive replies5. 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 secondsfor 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

Page 13: Gmail Mail Merge with Personalized Attachments and Email Tracking

Email OutputThe program will now run Mail Merge in the background and you may close theGoogle sheet. The first batch of emails will go approximately 2 minutes after youhave clicked the Mail Merge button.

You can check the Sent Items folder of your Gmail mailbox to see all the sentmessage. 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

Page 14: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 10: Mail Tracking with Google AnalyticsGo to Google Analytics, switch to the Reporting tab and then choose the Eventreport under Real-Time to track mail open activity in real time.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 14

Page 15: Gmail Mail Merge with Personalized Attachments and Email Tracking

Step 11: Email Open ReportsInside Google Analytics, expand the Behavior group and choose Events. Now selectthe date range (make sure it includes today's date) and you'll see all mail activityaround your email campaign.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 15

Page 16: Gmail Mail Merge with Personalized Attachments and Email Tracking

Email Report - Google AnalyticsYou can click the category name and switch to the Event Label dimension to see alist of recipients who have read your email.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 16

Page 17: Gmail Mail Merge with Personalized Attachments and Email Tracking

Mail Merge - Daily LimitYou can only send mails to a maximum of 100 recipients per day using GoogleScripts for free Gmail accounts and up to 1500 recipients for paid Google Appsaccounts. If you are sending a mail merge to two addresses - one in the To list andother CC list - that will be counted as 2 messages and you'll then be able to sendonly 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 groupsand the script will automatically split the job into smaller batches to prevent itselffrom 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 50will get the mails the next day when the quota has reset.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 17

Page 18: Gmail Mail Merge with Personalized Attachments and Email Tracking

SupportIf you require custom Google Apps Script, please visit ctrlq.org. You can find moreuseful Google Scripts on Digital Inspiration.

For help and support, contact the author at [email protected] or tweet @labnol.

Mail Merge for Gmail v6.0

DEVELOPED BY CTRLQ.ORG 18