How to Email Unique File Attachments using Mail Merge for Gmail
Gmail Mail Merge is a perfect tool for sending personalized emails to one or more email addresses using a simple Google Sheet. If you never performed merge before, please watch the Mail Merge tutorial and documentation to get started.
One of the most popular features of Mail Merge is its unique ability to send different file attachments to different email address. For instance, if you are applying for a job at different companies, you can attach the same PDF resume in all email messages but the cover letter could be different with each application.
This step-by-step tutorial explains how you can you can use Mail Merge for Gmail to send unique email attachments to your contacts. Mail Merge pulls files from Google Drive and includes them as attachments in the outgoing email messages.
Step 1: Install the Mail Merge add-on.
Step 2: Open a new Google Sheet, go to Addons > Mail Merge with Attachments > Create Merge template to initialize the sheet.
Step 3: Add one or more rows in the Mail Merge sheet. To keep things simple, you can add the First Name, last Name, and the Email address as shown in the screenshot.
Step 4: Go to Addons > Mail Merge > Add File Attachments > Insert Files from Google Drive and select one or more files that you wish to send with your email message. You can also select the option Select Files from Computer if the files are on the computer.
Mail Merge will get the direct link of the selected file(s) and inserts them into the File Attachments column. If you wish to send more files with the same email message, you can add the drive links in the same cell, separated by the comma.
In the previous step, we used the Google File Picker to select the files from Google Drive. This is slightly tedious more so as you have to repeat the steps for every row in your Mail merge sheet.
There’s an easier way though for adding attachments to merge. Instead of using the
File Picker, you can simply put the name of the file in the File Attachments column. The addon, at the time of sending the email, will search your Drive for that file and attach it to the email message.
If you have multiple files in Google Drive with the same name, you can specify the folder path where the file is located. The syntax is
\\Folder A\\Folder B\\filename.ext
I want to show you one more technique for quickly attaching files to your Mail mere sheet. Go to Addons > Mail Merge > Add File Attachments > List Files in Google Drive Folder. Now select the parent folder in your Google Drive and the addon will generate a list of every file it found inside that folder, including sub-folders.
Now switch back to the Mail Merge sheet and you’ll notice that a drop-down has been added to every cell in the File Attachments column. This makes it even easier for you to select files from Drive.
So we are all set. Go to the mail merge menu, choose Configure and run merge (video) to send your emails that all have unique attachments. You’ll find a copy of the emails in your Gmail Sent items.
For detailed instructions, please watch the video tutorial.
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.