Skip to main content

Send a mail merge with personalized attachment(s) to each recipient

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.

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.

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

    copy-link
  2. Open the spreadsheet and insert a new Attachment column.

    The name must be exactly Attachment, as YAMM is case-sensitive.

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

    paste-link

     If you want to match multiple files to a recipient, separate the file links with a comma within the same cell. Learn more

  4. Once done, select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.

    click-start-mail-merge
  5. Click + Alias, filters, personalized attachments.

    click-alias
  6. Select the Attach files in column to emails sent checkbox next to Personalized attachments.

    click-attach-files

    If you haven’t set up Drive access yet, click Authorization required and authorize YAMM to access your files. This step is required to use personalized attachments. Learn more.

    yamm-setup-personalized-attachments
  7. Go back to select your Email Template. Click Send emails.

    send-email-w-tracking

You've sent a mail merge with personalized attachments to each recipient.

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.

  1. 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.

    filename-id
  2. Open your spreadsheet and create a new column to list your IDs.

  3. Enter the corresponding file ID in this column for each recipient. For example, the ID of the Payslip-Alex-Jordan file is Alex-Jordan.

    Ids

    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

    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.

  4. Select Extensions > Yet Another Mail Merge: Mail Merge for Gmail > Start Mail Merge.

    Id-send-merge
  5. Click + Alias, filters, personalized attachments.

    click-alias

    If you haven’t set up Drive access yet, click Authorization required and authorize YAMM to access your files. This step is required to use personalized attachments. Learn more.

    yamm-setup-personalized-attachments
  6. Click Import from Drive folder.

    click-import-drive
  7. Select the Drive folder that contains the files and click Select.

    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.

  8. Select the column to check for matches and click Import files.

    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.

  9. Go back to select your Email template and click Send emails.

    result

Result

You've sent a mail merge with personalized attachments to each recipient.