Skip to content
HelloRows

Mail merge in Gmail with a different attachment for each person

Gmail™'s own mail merge attaches the same file to every copy. For a different file for each person, such as an invoice or a certificate, a column in your sheet names each person's file and an add-on or a script attaches it. Here is how to get the files ready, which options do it, and what to check before you send.

Short answer

Put one file per person in Google Drive, name each person's file in a column of the sheet, and use a tool that reads that column. Google says Gmail's mail merge puts the same attachment in "each recipient's copy of the message", so it cannot do this; Apps Script and several add-ons can.

Keep each message under 25 MB, which Google gives as the limit for attachments, and send a test to yourself first. A missing, misspelled or duplicated file name is the usual reason one person gets the wrong file or none.

How a different file for each person works

A mail merge sends one email per row, filling the row's values into a template. The attachment follows the same idea in two ways. The same file for everyone, such as terms or a price list, is the easy case: you add it once. A different file for each person needs one more piece of information per row, which file. That piece is a column.

The column holds a name, or a link, that points at the person's file. When the tool builds that row's email, it looks the file up and attaches it. If it finds nothing, the tool has to choose between sending the email without the file and not sending it. Which one it does is worth knowing before you send to a long list.

Two ways to attach a file, and where each one ends

  • Add a file onceEvery email carries itSame file for everyone
  • Cell in the file columnFile found in DriveThat row's email carries it
The first path is what Gmail's own mail merge does. The second needs a tool that reads a column.

Prepare the files and the column

Start with the files, because the column can only be as good as their names.

Make one file per person, and give each a name you can build from the sheet, such as the invoice number or the row number. The example club names its files invoice-1012.pdf, 1012 being the row. Then add a column to the sheet that holds exactly that name for each row. A name that differs by one character or a space from the file's is a name the tool may not find.

Keep the files in Google Drive, where the add-ons and scripts below read them. A Google Docs, Sheets or Slides file is not a file you can attach as it is: export it first. In Google Docs, File, then Download, asks you to choose a file type, and Apps Script's File.getAs says that for most blobs application/pdf is the only valid conversion. A PDF is the safe choice for an invoice or a certificate anyway, because it looks the same on every device.

Then check the size. Google gives 25 MB as the limit for a Gmail attachment on a personal account; work and school accounts have limits their administrator sets. Google's help says a file over the limit is added as a Google Drive link in the email instead. Apps Script's quota table lists "25 MB / msg" for attachments and "250 / msg" for their number.

ABI
1First nameEmailInvoice file
12Mariamaria.lopez@example.cominvoice-1012.pdf
13Leoleo.fischer@example.cominvoice-1013.pdf
58Tomástomas.ortega@example.orginvoice-1058.pdf
  1. The column that names each person's file.
  2. In the example, a name that matches no file. It is the kind of row to catch before sending.
Rows 1, 12, 13 and 58 of a club's Members sheet, with columns C to H left out. Example data from a made-up club.
  1. Create one file per person

    Export each as a PDF if it started as a Google Docs, Sheets or Slides file.

  2. Name the files so a column can match them

    One name per person, and no two files with the same name.

  3. Put the files in Google Drive

    Keep them where the account you send from can open them.

  4. Add the column to the sheet

    Each row holds its file's name, spelled the same.

  • 25 MBGmail's attachment limit on a personal account, per Google
  • 25 MBattachments in one message in Apps Script, per Google
  • 18 MBa file and an email in HelloRows, per its homepage
Gmail Help 6584 and Apps Script's "Quotas for Google Services", both read Nov 11, 2026. HelloRows' figure is from its homepage.

Gmail, a script or an add-on: which can do it

Gmail's own mail merge cannot. Google's help page says: "If you add an attachment, the attachment will be included in each recipient's copy of the message." It suits a file everyone gets, and for a large one Google suggests linking to a file in Drive, since each copy takes storage. It also needs an eligible Google Workspace plan, such as Workspace Individual or Business Standard.

A script of your own can do it, if you are comfortable with code. GmailApp.sendEmail takes an attachments option, "an array of files to send with the email", and DriveApp.getFilesByName "gets a collection of all files in the user's Drive that have the given name". That second sentence is also the catch: two files with the same name both come back, and your script has to choose. A script gives you full control and costs you the time to write and fix it. Google's quotas, such as 6 minutes an execution, apply to it too.

Add-ons do it without code. Each one's own page says it can, read Nov 11, 2026. What differs is how a file is named and where it lives. GMass works from file URLs in your sheet, Mailmeteor from Google Drive links, and Mail Merge with Attachments by Digital Inspiration lists a different attachment per message on its Standard and Enterprise plans.

Which options attach a different file to each person, and how they find it
OptionDifferent file per personHow the file is named
HelloRowsYes, up to 18 MB an email, on the free plan tooA column holds the file's name; you pick the files in Google Drive
Gmail's mail mergeNo: the same attachment in every copyNot applicable
Apps ScriptYes, if you write itYour code, such as a Drive lookup by file name
MailmeteorYes, in its Google Sheets add-on, up to 5 attachments an emailA column named Attachment or Attachments with Drive links, each file set to "Anyone with link"
GMassYesFile URLs in the sheet
YAMMYes, from Google DriveNot stated on its listing
Mail Merge with AttachmentsYes, on its Standard and Enterprise plans"Dynamic file attachments from Google Drive" are Enterprise only
Each row is what the option's own page says, read Nov 11, 2026: Gmail Help 12921167, Apps Script's reference, Mailmeteor's attachments help page, GMass's personalization page, YAMM's Marketplace listing and Digital Inspiration's pricing page. HelloRows' row is from its homepage.

Mailmeteor asks you to set each file to "Anyone with link" before you paste its link. HelloRows takes a file's name instead of a link, and attaches the file with that name from the files you picked in Google's file picker. If an add-on you already use attaches what you need, stay with it.

The attachment option in the HelloRows sidebar: a column that names each row's file, and the two names that are not among the files picked. Example data.

What to check before you send

An email with the wrong file is worse than no email, so check these before the run, whatever tool you use.

  • A missing file. Every name in the column has a file in Drive. Filter the column for blanks to find an empty cell.
  • A misspelled name. A name with a different extension, a space or a typo fails the match.
  • Two files with the same name. Drive allows them, and a lookup by name finds both. Rename one before you send.
  • Total size. Add up each person's files. A message over the 25 MB Google gives is over the limit.
  • A test email. Send one to yourself from a row you know, and open the attachment.

In HelloRows, a row whose file can't be found or attached is not sent. The review lists it before you send, and its status says why.

Questions

Can Gmail's mail merge send a different attachment to each person?

No. Google's help page says the attachment is included in each recipient's copy of the message, so everyone gets the same file. For a different file per person you need a script or an add-on that reads a column of file names or links.

How do I mail merge with a different attachment for each person?

Create one file per person, name them so a column can match them, keep them in Google Drive, and put each person's file name in a column of the sheet. Then use a tool that attaches the file named in that row: Apps Script, or an add-on such as GMass, HelloRows, Mailmeteor or YAMM. Send a test to yourself before the run.

What is the largest attachment I can send?

Google gives 25 MB as the limit for an attachment on a personal Gmail account, and a work or school account's limit is set by its administrator. Apps Script lists 25 MB a message. HelloRows allows up to 18 MB a file and an email.

Can I attach a Google Doc or a Google Sheet?

Not as it is. Export it first, for example as a PDF, and keep the PDF in Google Drive. Apps Script's File.getAs says that for most blobs application/pdf is the only valid conversion.

What happens if a person's file is missing?

It depends on the tool, so test before a long list. HelloRows does not send a row whose file it can't find or attach, the review lists it and its status says why. In a script you write, you decide whether to send without the file or skip the row.

Sources

  1. Gmail Help: Send personalized emails with mail merge, read Nov 11, 2026
  2. Gmail Help: Send attachments with your Gmail message, read Nov 11, 2026
  3. Docs Editors Help: Create, view, or download a file, read Nov 11, 2026
  4. Apps Script reference: Class GmailApp, read Nov 11, 2026
  5. Apps Script reference: Class DriveApp, read Nov 11, 2026
  6. Apps Script reference: Class File, read Nov 11, 2026
  7. Apps Script: Quotas for Google Services, read Nov 11, 2026
  8. Mailmeteor: Attachments, read Nov 11, 2026
  9. GMass: Personalization, read Nov 11, 2026
  10. Google Workspace Marketplace: Yet Another Mail Merge (YAMM), read Nov 11, 2026
  11. Digital Inspiration: Mail Merge with Attachments pricing, read Nov 11, 2026

Who wrote this

Adam Martiník makes HelloRows, a Google Sheets™ add-on that sends one email per row from your own Gmail. For this job it attaches the same files to every email, or the file each row names in a column, and does not send a row whose file it can't find or attach.