How to mail merge with attachments in Gmail

To send the same file to everyone, attach it to the email you merge: Gmail's own mail merge, Google's Apps Script sample and every mail merge add-on can do that. To send each person their own file, such as an invoice or a certificate, you need an add-on. In BetterMerge, you pick the files in Google Drive and it matches each one to its row by file name, with the files kept private in your Drive.

Updated Facts checked 6-minute read

Two kinds of mail merge attachment:

  • The same file for everyone: a brochure, an agenda or a price list. Attach it once and every email carries it. In BetterMerge, from the Lite plan.
  • A different file for each person: an invoice, a payslip or a certificate. Pick the files in Google Drive and match them to rows by file name. In BetterMerge, on Plus and Pro.

Which ways can attach a file

Which mail merge tools can attach a file, and which can attach a different file to each person
QuestionGmail's own mail mergeApps Script sampleBetterMerge
The same file for everyoneYes. The file goes into each recipient's copyYes. The draft's attachments go to every rowYes, on Lite, Plus and Pro
A different file for each personNoNot without changing the codeYes, on Plus and Pro
Works on free GmailNo, some paid Workspace plans onlyYesYes

Google’s Apps Script sample sends whatever is attached to your Gmail draft to every row. Changing it to pick a file per row means writing the code yourself. Mail merge in Gmail covers both of Google’s ways step by step.

Send the same file to everyone

Attach the file to the email you’re merging, and every recipient gets a copy.

  • In Gmail’s own mail merge, attach the file in the compose window as usual. Gmail puts it in each recipient’s copy of the message.
  • In BetterMerge, attach it to your template. In Lite, Plus and Pro Open the template, click More fields and attachments below the subject, then Attach file. The campaign’s Attachments tab then lists it under Template attachments · sent to everyone.

A big file in every email adds up quickly. For a large brochure or a video, put a link in the email instead. When you write in Gmail itself, it turns attachments over 25 MB into a Google Drive link.

Send each person their own file

These steps use BetterMerge, in the Google Sheets add-on or the web app: the Attachments tab works the same way in both. You pick the files in Google Drive and BetterMerge matches each one to its row by file name. You don’t share the files with anyone, and you don’t paste any links. In Plus and Pro

What you need

  • A Google Sheet with one person on each row, and a column whose values appear in the file names, such as an invoice number or a full name
  • The files in Google Drive: in My Drive, a shared drive or Shared with me
  • BetterMerge’s Plus or Pro plan

Step 1: Name each file after a value in its row

Give each file a name that contains a value from that person’s row. With an Invoice No column, name the files Invoice-1042.pdf, Invoice-1043.pdf and so on. A name column works too, as long as no two people share a name.

Step 2: Choose Files from Google Drive

Create your campaign and pick your sheet as usual. On the Attachments tab, between Template and Delivery, choose Files from Google Drive (1). Any template attachments show below it (2), so you can see everything an email will carry.

The Attachments tab in the campaign editor with three sources: None, Files from Google Drive, marked Recommended (1), and Links in the sheet, with the template attachments section below (2)

Step 3: Select the files and set the file name rule

Click Select files (1), open the folder in Google Drive and select the files. Use Shift-click or Ctrl+A (⌘+A on a Mac) to select many at once. Picking a folder doesn’t pick the files inside it, so open it first.

Then write a file name rule (2) with a merge tag for the part that changes, such as Invoice-{{Invoice No}}. Matching ignores upper and lower case and the file extension. BetterMerge suggests a rule from your columns, so check it before you go on.

The Files from Google Drive panel, numbered: the Select files button (1), the file name rules field with the hint Invoice-{{Invoice No}} (2), the choice for rows without a matching file (3) and the match review (4)

Step 4: Choose what happens when a file is missing

Under When a row has no matching file (3), choose Skip the row and mark it “Attachment missing” when the file is the point of the email, such as an invoice. Choose Send without the missing attachment when the file is optional. A row that matches more than one file is always skipped, so nobody gets someone else’s file.

Step 5: Check the match review and send a test

The Match review (4) shows the result for the whole sheet, such as “482 rows matched · 3 missing · 1 ambiguous”. Expand it to see each problem row, then fix the file names or the rule. On the Preview tab, each row shows its attachment’s name. Send yourself a test: it carries the real file, so you can open it.

Step 6: Start the campaign

Click Start campaign. Each email goes out from your Gmail with that person’s file attached. A row skipped for its attachment gets a status in your sheet, such as ATTACHMENT MISSING, and the other rows keep sending.

BetterMerge can also attach the file from a Google Drive link in each row. Choose Links in the sheet on the Attachments tab and put the links in a column named Attachment, or Attachment 1, Attachment 2 and so on for more than one file.

This way, each file has to be shared with anyone who has the link, so anyone who gets hold of a link can open the file. For invoices, payslips, certificates and anything else personal, use Files from Google Drive instead.

File types and size limits

Gmail’s limitSize
Attachments on one email25 MB together on free Gmail. Gmail turns anything bigger into a Google Drive link

Checked on Google’s pages on December 4, 2026: Send attachments with your Gmail message.

BetterMerge’s limits by plan:

Plan Same file for everyone A different file for each person
Free Not included Not included
Lite 2 files, up to 2 MB each Not included
Plus 5 files, up to 5 MB each Up to 5 MB a file
Pro 5 files, up to 10 MB each Up to 10 MB a file
  • Files per email: the plan’s file count covers template attachments and personal files together.
  • Files you can pick from Drive: PDF, Word, Excel, PowerPoint, CSV, images, and Google Docs, Sheets and Slides. Google files are sent as PDFs.
  • Files per campaign: you can pick up to 10,000.

Compare plans for everything else in each one.

Common problems

A row says “Attachment missing”

No file name matched the rule for that row. Check the value in the sheet against the file name, including spaces and dashes, then click Add more to pick the missing file or fix the rule. The match review updates as you go.

A row says “Attachment ambiguous”

More than one file matched the rule for that row. That happens when the rule uses *, as in {{Invoice No}}*, or when two files differ only by their extension. Make the rule more specific, add the extension, such as .pdf, or remove the extra file.

Do I have to share my files with anyone?

No. With Files from Google Drive, the files stay private and BetterMerge reads only the files you picked, with your own Google account, when each email goes out. Only Links in the sheet needs files shared with anyone who has the link.

My file is too large

Each plan has a size limit per file, and all attachments on one email must stay under Gmail’s 25 MB. Compress large PDFs and images, or put a link in the email instead.

Can I see whether someone opened the attachment?

No. BetterMerge tracks whether people open the email and click its links, not whether they open or download the attachment.

Sources

Related guides

Send your first Gmail mail merge

Install BetterMerge in Google Sheets, write one email with merge tags, and send a personal copy to every row from your own Gmail.

  • Free plan, 50 emails a day
  • Send-only Gmail access