Send a mail merge with personalized attachment(s) by adding Google Drive file links to your spreadsheet. You can either add links manually or use unique filenames to automate the link retrieval for a larger set of files.
info If you want to send the same attachment to all your recipients, we recommend adding it directly to your Gmail draft.
Add file links manually to your spreadsheet
Prerequisites
- You have an existing spreadsheet that contains the list of the recipients' email addresses
- You have uploaded the files for attachment to Google Drive
- You have created an email template in Gmail
This method is preferred if you only have a few file links to add to your spreadsheet.
- From your Google Drive, right -click on the file > select Share > Copy link.
- Open the spreadsheet and insert a new Attachment column.
warning The name must be exactly Attachment, as YAMM is case-sensitive. - Paste the link in the cell corresponding to the right recipient. Repeat the steps for each file.
info If you want to match multiple files to a recipient, separate the file links with a comma within the same cell. Learn more - Once done, select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.
- Click + Alias, filters, personalized attachments.
- Select the Attach files in column to emails sent checkbox next to Personalized attachments.
- Go back to select your Email Template. Click Send emails.
You've sent a mail merge with personalized attachments to each recipient.
Add file links automatically to your spreadsheet
Prerequisites
- You have an existing spreadsheet that contains the list of the recipients' email addresses
- You have uploaded the files for attachment to a single Google Drive folder
- You have created an email template in Gmail
This method automatically matches each file to its corresponding recipient by using unique IDs.
- Go to your Google Drive folder.
Ensure that each file in Google Drive has a unique ID in its name, which will be referenced from your spreadsheet. In this example, the ID chosen for each file is Firstname-Lastname. - Open your spreadsheet and create a new column to list your IDs.
- Enter the corresponding file ID in this column for each recipient. For example, the ID of the Payslip-Alex-Jordan file is Alex-Jordan.
info If you want to match multiple files to a recipient, separate the IDs with a comma within the same cell. All the files must be in the same Google Drive folder. Learn more
warning When creating IDs, follow these points to prevent matching issues with YAMM:- Each ID must be unique to avoid overlap. For example, Chris matches with Chris-Parker.pdf and Chris-Wilson.pdf. This applies also to digits. For example, A1 matches with A10.pdf and A12.pdf.
- Case (lowercase/uppercase) must match. For example, Payslip-Alex-Jordan.pdf won't match with Alex-jordan ID.
- Avoid using spaces within IDs, as they are treated as letters or digits.
- Select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.
- Click + Alias, filters, personalized attachments.
- Click Import from Drive folder.
- Select the Drive folder that contains the files and click Select.
warning Ensure you select the Drive folder without opening it. Opening the folder will display a No documents message, preventing selection. Find more details in Attachments issue: 'No documents' in the Drive folder selection. - Select the column to check for matches and click Import files.
YAMM matches each file name to the appropriate recipient, adding the corresponding link(s) to a newly created Attachment column. Additionally, an Attachment name column is created, displaying the filename for each file.
- Go back to select your Email template and click Send emails.
Result
You've sent a mail merge with personalized attachments to each recipient.