> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.supersend.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Create Google Drive Downloadable Links for Custom Attachments

# Create Google Drive Downloadable Links for Custom Attachments

## Purpose

Custom attachments let you attach different files per contact based on a URL stored in each contact's custom field. For example, you can send a personalized resume, proposal, or document to each prospect by storing the file URL in a custom attribute. This article explains how to set up custom attachment variables and use them in your email steps. It also covers how to create a downloadable link when your files are stored in Google Drive.

## Prerequisites

- A campaign with contacts
- The files you want to attach (hosted at a URL that returns the file directly — not an HTML viewer page)

## Steps

### 1. Add a Custom Attachment Variable to Your Contact Config

1. Go to your campaign and open **Contacts**.
2. Open **Global Settings** (or the contact config for your campaign).
3. Under **Custom Variables**, click **Add Custom Variable**.
4. Enter a name (e.g. `resume_url` or `proposal_url`).
5. Set the **Type** to **attachment**.
6. Save the contact config.

The variable will appear as `{{resume_url}}` (or whatever name you chose) and can be used in your sequence.

### 2. Add the File URL to Each Contact

Each contact needs the URL of their file stored in the custom field you created. You can do this by:

- **CSV import:** Include a column with the variable name (e.g. `resume_url`) and the URL in each row.
- **Manual edit:** Open a contact, go to the **Variables** or **Info** tab, and paste the URL into the attachment field.
- **Integration:** If you use HubSpot, Zapier, or another integration, map the URL field to your custom attachment variable.

The URL must be a **direct link** that returns the file when fetched — not a page that displays the file in a browser. For example, `https://example.com/document.pdf` works. Google Drive view links do **not** work unless converted to the direct download format (see below).

### 3. Select the Custom Attachment in Your Email Step

1. Open your campaign and go to the **Sequence** tab.
2. Select an email step.
3. In the email editor, find the **Custom Attachments** section (below the body).
4. Check the box next to the variable you want to attach (e.g. `{{resume_url}}`).
5. Save the step.

When SuperSend sends the email, it fetches the file from the URL stored in that contact's custom field and attaches it to the message.

### 4. If You're Using Google Drive: Create a Downloadable Link

Google Drive sharing links usually open a web viewer instead of returning the file. SuperSend needs a **direct download** URL. If your files are in Google Drive, follow these steps to create a link that works:

**Step A: Get the File ID from your Google Drive link**

When you share a file, you get a link like:

```
https://drive.google.com/file/d/1pjH2U4M8DZ5wONYggVJAGx33rwR5dhL1/view?usp=drivesdk
```

The **File ID** is the long string between `/d/` and `/view`. In this example: `1pjH2U4M8DZ5wONYggVJAGx33rwR5dhL1`.

**Step B: Build the direct download URL**

Use this format:

```
https://drive.google.com/uc?export=download&id=YOUR_FILE_ID
```

With the example File ID:

```
https://drive.google.com/uc?export=download&id=1pjH2U4M8DZ5wONYggVJAGx33rwR5dhL1
```

**Step C: Verify the link**

Open the direct download URL in a new browser tab. The file should download (or prompt to download) instead of opening in the Google Drive viewer. If it downloads correctly, the link will work in SuperSend.

**Step D: Use the link in SuperSend**

Paste this direct download URL into each contact's custom attachment field (via CSV, manual edit, or integration). SuperSend will fetch and attach the file with the correct filename and extension.

## Expected Result

- Each contact receives an email with the file attached from their custom URL.
- Files from direct URLs (e.g. your own server, S3, or Google Drive direct download) attach correctly with the right filename and extension.
- Recipients can open the attachment without manually adding a file extension.

## Troubleshooting

- **Issue:** File doesn't attach or attachment has wrong filename/extension.  
  **Fix:** Use a direct download URL, not a viewer page. For Google Drive, use `https://drive.google.com/uc?export=download&id=FILE_ID`, not the `/file/d/ID/view` format.

- **Issue:** "Could not download attachment" error when sending.  
  **Fix:** Ensure the file is accessible. For Google Drive, share the file with "Anyone with the link can view." Check that the URL is correct and returns the file (not an HTML page or login screen).

- **Issue:** Variable doesn't appear in Custom Attachments.  
  **Fix:** The variable must have type **attachment** in your contact config. Add it in Global Settings or contact config, then save.

- **Issue:** Contact has no attachment.  
  **Fix:** Ensure the contact's custom field (e.g. `resume_url`) contains a valid URL. Empty or invalid URLs are skipped.

## Related Articles

- [Edit Sequence Steps](https://help.supersend.io/en/article/edit-sequence-steps-1y2x8y5/)
- [Upload Contacts via CSV](https://help.supersend.io/en/article/upload-contacts-via-csv-1y2x8y6/)
- [Contacts Overview](https://help.supersend.io/en/article/contacts-overview-1y2x8y7/)