Skip to main content

Personalize attachments

Send a different attachment to each recipient via Google Drive links in the contact list spreadsheet, and attach multiple files per recipient. You can either add links manually or use unique filenames to automate the link retrieval for a larger set of files. Google Docs, Sheets, Slides, and Drawings files are attached as PDFs. For more information about the files you can attach, see Supported files.

info
Prerequisites

This method is preferred if you only have a few file links to add.

  1. From Google Drive, right-click on the file > Share > Copy link.

    Copy link selected from the Share menu for a Google Drive file
  2. In your spreadsheet, insert a new Attachment or Attachments column.

  3. Paste the link in the cell for the corresponding recipient. Repeat for each file.

    Attachment link pasted into the recipient cell

    To attach multiple files for a recipient, separate links with a comma in the same cell.

  4. In the menu bar, select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.

  5. Click + Alias, filters, personalized attachments.

    Alias, filters, personalized attachments link in the Start Mail Merge dialog
  6. Select Attach files in column to emails sent next to Personalized attachments.

    Attach files in column checkbox selected under Personalized attachments

    If you haven't set up Drive access yet, click Authorization required and authorize YAMM. See What permissions are needed?

  7. Go back and select your Email Template.

  8. Click Send test email to send yourself a test.

Check the test email in your inbox to confirm the attachments look right before you launch your campaign.

Prerequisites

YAMM matches each file to its corresponding recipient using unique IDs in the file names.

  1. Go to your Google Drive folder. Each file must have a unique ID in its name, which will be referenced from your contact list spreadsheet (e.g., Firstname-Lastname).

    Unique IDs highlighted in the file names in Google Drive
  2. In your contact list spreadsheet, create a column listing each recipient's ID. The ID of Payslip-Alex-Jordan.pdf is Alex-Jordan.

    ID column listing each unique ID matching a Google Drive file name
    info
    • To match multiple files, separate IDs with a comma.

    • Avoid overlapping IDs (Chris would match Chris-Parker.pdf and Chris-Wilson.pdf).

    • Case must match exactly.

    • Avoid spaces.

  3. In the menu bar, select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.

  4. Click + Alias, filters, personalized attachments.

    Alias, filters, personalized attachments link in the Start Mail Merge dialog

    If you haven't set up Drive access yet, click Authorization required and authorize YAMM. See What permissions are needed?

  5. Click Import from Drive folder.

    Import from Drive folder link under Personalized attachments
  6. Select the folder (don't open it — opening shows No documents; see Attachments issue). Click Select.

  7. Select the column to check for matches, click Import files.

    ID column selected to check for matches, with Import files highlighted

    YAMM matches each filename to the recipient and adds links to a new Attachment column plus an Attachment name column.

  8. Select your Email template, then click Send test email to send yourself a test.

Check the test email in your inbox to confirm the attachments look right before you launch your campaign.

Supported files​

With personalized attachments, YAMM attaches to each email the Google Drive files linked in that recipient's row of the Attachment or Attachments column. What each recipient receives depends on the type of file that the links in their row point to:

File in Google DriveWhat recipients receiveMaximum size
Google Docs, Sheets, Slides, and Drawings filesA PDF copy of the file10 MB for the PDF copy
Any other file uploaded to Drive, such as PDFs, Word and Excel files, images, and ZIP filesThe file as is, with its original name and format25 MB
Google Forms, Sites, My Maps, Vids, Apps Script projects, and foldersNothing. YAMM can't attach these files.N/A

Each email can carry up to 25 MB of attachments in total. This includes both the personalized attachments and the files attached to your Gmail draft. To send larger files, add a Drive link to your email instead of attaching the file.

warning

Gmail blocks some file types, such as executable files (.exe), so you can't send them as personalized attachments. For more information about the blocked types, see File types blocked in Gmail.

What's next​