# Personalize attachments

Source: https://yamm.com/help/usage/create-campaign/personalize-attachments/

Send a different attachment to each recipient via Google Drive links in the [contact list spreadsheet](https://yamm.com/help/usage/create-campaign/build-contact-list/index.md), 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, and Slides files are attached as PDFs.

[Watch the video on YouTube](https://www.youtube.com/watch?v=ltbgHTb2lR8)

Info:

- To send the **same** attachment to all recipients, add it directly to your Gmail draft.

- To send a Google Docs, Sheets, or Slides file as a link rather than a PDF, see [Send personalized hyperlinks to each recipient](https://yamm.com/help/usage/create-campaign/personalize-links-and-images/index.md#send-personalized-links).

## Add file links manually

**Prerequisites**

- You have [created a contact list spreadsheet](https://yamm.com/help/usage/create-campaign/build-contact-list/index.md).
- You have uploaded the files for attachment to Google Drive.
- You have [created an email template in Gmail](https://yamm.com/help/usage/create-campaign/draft-template/index.md).

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

1. From [Google Drive](https://drive.google.com), right-click on the file > **Share** > **Copy link**.

   ![Copy link selected from the Share menu for a Google Drive file](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-1.png)

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](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-2.png)

   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](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-4.png)

6. Select **Attach files in column to emails sent** next to **Personalized attachments**.

   ![Attach files in column checkbox selected under Personalized attachments](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-5.png)

   If you haven't set up Drive access yet, click **Authorization required** and authorize YAMM. See [What permissions are needed?](https://yamm.com/help/resources/data-security-and-policy/data-policy/data-access-what-permissions-are-needed-to-use-yamm/index.md)

7. Go back and select your **Email Template**.

8. Click **Send test email** to [send yourself a test](https://yamm.com/help/usage/create-campaign/send-test-email/index.md).

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

## Add file links automatically (auto-match by filename ID)

**Prerequisites**

- You have [created a contact list spreadsheet](https://yamm.com/help/usage/create-campaign/build-contact-list/index.md).
- You have uploaded the files for attachment to a **single** Google Drive folder.
- You have [created an email template in Gmail](https://yamm.com/help/usage/create-campaign/draft-template/index.md).

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

1. Go to your [Google Drive](https://drive.google.com) 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](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-8.png)

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](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-9.png)

   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](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-4.png)

   If you haven't set up Drive access yet, click **Authorization required** and authorize YAMM. See [What permissions are needed?](https://yamm.com/help/resources/data-security-and-policy/data-policy/data-access-what-permissions-are-needed-to-use-yamm/index.md)

5. Click **Import from Drive folder**.

   ![Import from Drive folder link under Personalized attachments](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-11.png)

6. Select the folder (don't open it — opening shows **No documents**; see [Attachments issue](https://yamm.com/help/usage/troubleshooting/spreadsheet-behavior/index.md#attachments-issue-no-documents-in-the-drive-folder-selection)). Click **Select**.

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

   ![ID column selected to check for matches, with Import files highlighted](https://yamm.com/help/images/docs/usage/create-campaign/personalize-attachments/send-a-mail-merge-with-personalized-attachment-s-to-each-recipient-12.png)

   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](https://yamm.com/help/usage/create-campaign/send-test-email/index.md).

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

## What's next

- [Personalize links and images.](https://yamm.com/help/usage/create-campaign/personalize-links-and-images/index.md)

- [Launch your campaign.](https://yamm.com/help/usage/launch-campaign/start-mail-merge/index.md)
