Mail merge in Gmail from a Google Sheet

How to mail merge in Gmail from a Google Sheet: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To mail merge in Gmail from a Google Sheet, read the rows with Read data from a Google Sheet, loop through them, and for each row open a compose window in Gmail, type the address, subject and body from the row with Enter text, and send. It uses Gmail in your own browser, so nothing is installed and no API is needed. Each row is deleted once sent, so a stopped run carries on where it left off.

Author
Alex Barlow
Published

Build the Gmail mail merge from a description


Describe it and click the button: the agent builds and tests the mail merge in your Chrome extension. Runs happen on your own machine with the desktop app, logged in to Gmail.

  1. Read the rows from my Mail merge sheet
  2. Open a new email in Gmail for each row
  3. Fill in the address, subject and body
  4. Send it and delete the row
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Google Sheet with one row per email and columns for the address, subject and body, with no header row, and Gmail logged in in Chrome. Put two or three rows addressed to yourself in it for the first run, and leave the sheet alone while the run sends and deletes the rows.

The video shows the agent building the Gmail mail merge from the four lines above, in a few minutes.

Build the Gmail mail merge step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Read data from a Google Sheet
    • Spreadsheet: your sheet
    • Sheet name: Mail merge, the tab with the emails
  • 2.0 Go to page
  • 3.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 3.1 Click element
      • Select: Gmail's Compose button
    • 3.2 Wait
      • Wait time: 2000
    • 3.3 Enter text
      • Select text field: the To field
      • Text: the address column of [google-sheet-data]
    • 3.4 Press key(s)
      • Key: Enter, then Tab
    • 3.5 Enter text
      • Select text field: the Subject field
      • Text: the subject column of [google-sheet-data]
    • 3.6 Enter text
      • Select text field: the message body
      • Text: the body column of [google-sheet-data]
    • 3.7 Press key(s)
      • Key: Cmd+Enter on a Mac or Ctrl+Enter on Windows
    • 3.8 Wait
      • Wait time: 3000
    • 3.9 Delete rows from a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: Mail merge
      • First row: 1
      • Last row: 1

Common questions about the Gmail mail merge


Why does the address, subject or body land in the wrong Gmail field?

Gmail's compose window takes a moment to open, so the text is typed before the field is ready. Raise Wait time on the Wait step after Compose, and check each Enter text step's Select text field points at its own field.

Why is the mail merge email not sent?

The send shortcut did not reach the compose window. Re-record the send shortcut in the Press key(s) step with the compose window open. When a run fails, hand it to the agent and it repairs the step.

Can I personalise the body of each mail merge email?

Yes. Put the name in its own column and insert its token into the body text, before or after fixed text.

Can I mail merge in Gmail without an add-on or Apps Script?

Yes. The automation types into Gmail's own compose window in your browser, as you would, so nothing is installed in Gmail and no API or add-on is involved.

Can I send the emails from a different Gmail account?

Yes. The automation opens mail.google.com/mail/u/0, the first account signed in to Chrome; sign in to the account you want to send from, or change the u/0 in the Go to page URL to that account's number.

Can I schedule a Gmail mail merge?

Yes, on the desktop app, with Gmail logged in on that machine. For cloud runs, add the login steps from automate Gmail login with 2FA before the loop.

What is the sending limit for a Gmail mail merge?

Gmail's own sending limits apply, about 500 a day for a personal account. Add a longer Wait between emails for large lists.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community. For more on the approach, read how to send an email blast with Gmail.

Related guides