Skip to main content

How to Add Unique File Attachments in Emails

The Email action in Document Studio lets you send personalized emails when a new Google Form is submitted or when a new row is added to a Google Sheet. You may also include one or more files from Google Drive in the email message as attachments.

There are multiple ways to add Google Drive files in your email messages.

The easiest approach is to include the Embed File tag in the body of your email template and the corresponding file will be embedded in the email message. This option is recommended if you wish to send the same Drive file to all recipients.

However, if you want to send different file attachments to different email recipients, a different approach is required. Open the source Google Sheet that contains the merged data and add a new column titled File Attachments in the data sheet. Inside this column, you can add the file link, file name, or the full path of the file in case there are multiple files in Drive that share the same name.

Google Drive File Attachments

Right-click the file in Google Drive and select Get link. Copy the link and paste it into the File Attachments column in the Google Sheet.

If you know the file ID of the Google Drive file, you can also paste that in the attachment column instead of providing the full link.

Google Drive File Link

Attach Files by Name

You can specify the full file name of the file in Google Drive and Document Studio will attach the file to your outgoing emails. If there are multiple files with the same name, it is recommended to specify the full path of the file in the File Attachments column.

Attach Files by Path

You can specify the full path of the file in Google Drive and Document Studio will intelligently attach the file to your outgoing emails.

Here's a screenshot of Google Drive folder containing a file that we need to attaching with our emails.

File Location in Google Drive

The file lisa.jpg is contained in the Students > Pictures folder of Google Drive. You can easily include this file by specifying the full folder path in the File Attachments column.

\\Students\\Pictures\\lisa.jpg

Attach Multiple Files

You can attach multiple files to your email message by specifying multiple file links or file names in the File Attachments column of the Google Sheet.

Please note that native Google Drive files (Google Docs, Sheets and Slides) cannot be attached to emails in their original format. The files are converted to PDF format and attached to the email message if the size of the converted file is less that the allowed attachment size.