How to Attach Files with the Embed File Marker
The Embed File marker attaches a Google Drive file to the emails that your workflow sends. You type the marker in the Email Body of a Send Email task. The marker leaves no text in the email, and the file arrives as a regular attachment.
Use the marker for a file that everyone gets, a different file for each row, or a file someone uploaded in your Google Form.
Embed File works in emails only. Google Docs, Slides and Sheets templates can’t hold attachments.
Attach an Invoice and a Price List to Each Email
Section titled “Attach an Invoice and a Price List to Each Email”Maya Chen at Willow Lane Studio sends her monthly invoices with Document Studio. Each client gets their own invoice, and everyone gets next year’s price list.
| First Name | Email Address | Invoice Number | Invoice |
|---|---|---|---|
| Daniel | daniel.okafor@example.net |
INV-1042 | https://drive.google.com/file/d/1AbC…/view |
| Hannah | hannah.weber@example.org |
INV-1043 | https://drive.google.com/file/d/1XyZ…/view |
| Sofia | sofia.rossi@example.com |
INV-1044 |
The Invoice cells hold Google Drive links. Sofia has nothing to pay this month, so her cell is empty.
-
In your sheet, add a column titled Invoice. In each row, paste the Google Drive link of that row’s file. To get the link, right-click the file in Google Drive, choose Share and then Copy link.
-
Open your workflow, go to the Tasks step and open the Send Email task.
-
In the Email Body, type one
Embed Filemarker for each file, each on a line of its own. The end of the message is a good place.Hi {{First Name}},Your invoice {{Invoice Number}} is attached, along with our price list for 2027.Maya{{Embed File, {{Invoice}}}}{{Embed File, Price List 2027.pdf}} -
Click Preview and open the email in your inbox. Open each attachment to check it.
-
Click Done, then save and run the workflow.
Daniel gets his invoice and the price list. Sofia’s Invoice cell is empty, so she gets the price list only. Nobody sees the markers, because Document Studio removes them from the message.

Ways to Name the File
Section titled “Ways to Name the File”{{Embed File, file}}| You want | Marker | What is attached |
|---|---|---|
| A file for everyone, by name | {{Embed File, Price List 2027.pdf}} |
The file with that name in your Drive |
| A file for everyone, by Drive link | {{Embed File, https://drive.google.com/file/d/1AbC…789/view}} |
That exact file |
| A file for everyone, by file ID | {{Embed File, 1AbC…789}} |
That exact file |
| A file inside a folder | {{Embed File, /Willow Lane/Price Lists/Price List 2027.pdf}} |
The file at that folder path |
| A file name with a comma | {{Embed File, "Terms, 2027.pdf"}} |
Terms, 2027.pdf. The quotes keep the comma. |
| A Google Doc, Sheet or Slides file | {{Embed File, Statement of Work}} |
A PDF of the file, named Statement of Work.pdf |
| Each row’s file from a column | {{Embed File, {{Invoice}}}} |
The file in that row’s Invoice cell |
| Each row’s file by a naming pattern | {{Embed File, /Invoices/{{Invoice Number}}.pdf}} |
INV-1042.pdf from the Invoices folder, for Daniel |
| A file uploaded in your form | {{Embed File, {{Upload Your Receipt}}}} |
Every file the respondent uploaded to that question |
Use one marker for each file. A file you type in the marker is always one file, even when its name has a comma inside quotes. If several files in your Drive share a name, add the folder path in front or use the Drive link.
Attach a Different File from a Column
Section titled “Attach a Different File from a Column”Put each row’s file in a column and point the marker at the column:
{{Embed File, {{Invoice}}}}What the cell can hold depends on where the rows come from.
| Your workflow reads | The cell can hold |
|---|---|
| A Google Sheet with no form linked to it | A Google Drive link, a file ID, a file name or a folder path, such as /Payroll/Jane Doe November 2026.pdf |
| A sheet that collects Google Form responses | A Google Drive link only, or a file upload answer |
To attach several files from one cell, put their Google Drive links in the cell, separated by commas or semicolons. Document Studio attaches all of them. A cell that holds a file name is one file, even if the name has a comma in it.
If a row’s cell is empty, Document Studio sends the email without a file from that marker.
Always write the column with braces, like {{Invoice}}. Without braces, a misspelled title like {{Embed File, Invoce}} is read as a file name, and Document Studio looks in your Drive for a file called Invoce.
Send Back a File from a Google Form
Section titled “Send Back a File from a Google Form”When your Google Form has a file upload question, write the question title in the marker. Document Studio attaches every file the respondent uploaded to that question.
Say staff submit expense claims with a form that has a Receipt upload question and a Manager Email question. Send the email to {{Manager Email}} and write:
{{First Name}} has claimed {{Amount}} for {{Purpose}}. The receipt is attached.
{{Embed File, {{Receipt}}}}Each manager gets the claim with the receipt attached.

To attach the files from every upload question at once, select Attach files uploaded through Google Form (if any) in the Send Email task. See email form uploads.
Attach Files by a Naming Pattern
Section titled “Attach Files by a Naming Pattern”When your files are named after a column, type the folder and build the file name with a marker:
{{Embed File, /Invoices/{{Invoice Number}}.pdf}}For Daniel, Document Studio looks for INV-1042.pdf in the Invoices folder. You don’t need a formula or a file column.
| Your files | Marker |
|---|---|
| Report cards named by student ID, in nested folders | {{Embed File, /Report Cards/Class 8B/{{Student ID}}.pdf}} |
| Payslips named by employee ID and month | {{Embed File, /Payslips/{{Month}}/{{Employee ID}}.pdf}} |
| Certificates named after the person | {{Embed File, /Certificates/{{First Name}} {{Last Name}}.pdf}} |
| Tickets with a prefix | {{Embed File, /Tickets/Ticket-{{Seat}}.pdf}} |
In a form workflow, the value from the row can only be part of the file name. If the value holds a /, a \ or a file ID, Document Studio doesn’t send the email for that row.
Why Form Workflows Need a Drive Link
Section titled “Why Form Workflows Need a Drive Link”Document Studio looks up a file name or folder path across your whole Google Drive. If a form answer could hold a name, anyone who fills in your form could type the name of a file you own and have it emailed to them. A Drive link points to one exact file, and its long random ID can’t be guessed. The rule also covers columns that you add to a form response sheet yourself.
Two things the rule doesn’t cover:
- A pattern still uses a value from the row. In
/Invoices/{{Invoice Number}}.pdf, the row picks the file inside the folder you typed. Use patterns with columns you fill in yourself, not with answers from a form. - The
File Attachmentscolumn still accepts names and paths. Don’t let other people fill in that column. See unique file attachments.
Other Ways to Attach Files
Section titled “Other Ways to Attach Files”The Send Email task can attach files in four ways. You can use them together.
| Method | Good for |
|---|---|
Embed File marker |
A file for everyone, or a file from a column you choose |
File Attachments column |
Files listed in a column with that exact title, attached by every email task of the workflow |
| Attach all merged files generated in this workflow | The PDF or document that a Create File task made for the row |
| Attach files uploaded through Google Form (if any) | Every file the respondent uploaded |
Things to Know
Section titled “Things to Know”- Document Studio attaches Google Docs, Sheets and Slides as PDFs, and other files as they are.
- Each email can carry up to 20 MB of attachments combined, counting every method above. Document Studio leaves out a file that would go over the limit and notes it in the log sheet.
- Two attachments with the same name get a number added, like
Invoice_2.pdf, so neither one is lost. - The Google account that runs the workflow must be able to open the file.
- File names and folder paths are looked up in your Drive and in files shared with you. For a file in a shared drive, use its Drive link.
- Document Studio picks up the file when the email goes out, so recipients get the latest version.
- A marker inside an
{% if %}condition attaches its file only when the condition is true. - The marker works in the Email Body only. Document Studio removes it from the Subject.
Troubleshooting
Section titled “Troubleshooting”Error: Embed File needs a Google Drive link in the column
Section titled “Error: Embed File needs a Google Drive link in the column”The workflow reads a form response sheet, and the column in your marker holds a file name, a folder path or a file ID. Replace the value with a Google Drive link. To keep using names, type the folder in the marker and use a pattern.
You also see this error when a pattern starts with a marker, like {{Embed File, {{Invoice Number}}.pdf}}. Type the folder first.
Error: Embed File can’t use … from the sheet inside a file path
Section titled “Error: Embed File can’t use … from the sheet inside a file path”The value that fills your pattern has a /, a \ or a file ID in it. Remove that character or file ID from the cell. A pattern can take a file name from the row, not a folder.
The email arrived without the file
Section titled “The email arrived without the file”Check these in order:
- Is the cell empty for that row, or is the column title in the marker misspelled?
- Does the file name in your Drive match exactly, including the extension? Does every folder in the path exist? A missing folder shows as
File not foundin the hiddenDocument Studio Logssheet. See troubleshooting. - Is the file in a shared drive? Use its Drive link in place of its name.
- Do the attachments add up to more than 20 MB? The log sheet says which file was left out.
- Is the marker inside an
{% if %}condition that was false for that row?
The status column shows an error for a Drive link
Section titled “The status column shows an error for a Drive link”The account that runs the workflow can’t open the file, or the link is wrong. Open the link in the same Google account, then copy the link again from Google Drive.
