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.
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.
- Read the rows from my Mail merge sheet
- Open a new email in Gmail for each row
- Fill in the address, subject and body
- Send it and delete the row
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 SheetSpreadsheet: your sheetSheet 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 elementSelect: Gmail's Compose button
- 3.2
WaitWait time: 2000
- 3.3
Enter textSelect text field: the To fieldText: the address column of[google-sheet-data]
- 3.4
Press key(s)Key: Enter, then Tab
- 3.5
Enter textSelect text field: the Subject fieldText: the subject column of[google-sheet-data]
- 3.6
Enter textSelect text field: the message bodyText: 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
WaitWait time: 3000
- 3.9
Delete rows from a Google SheetSpreadsheet: your sheetSheet name: Mail mergeFirst row: 1Last row: 1
- repeats for every row in
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
Automate posting on X (Twitter) from a Google Sheet
- Read the posts from my X post sheet
- Open the X compose page for each row
- Type the post and upload its image
- Click Post, then delete the row
Add line breaks to Instagram DMs in an automation
- Open an Instagram DM with the user I give you
- Type my message, keeping its line breaks
- Send it only once the whole message is in
Automate Instagram posts from a Google Sheet
- Read the posts from my Instagram posts sheet
- Open Instagram and start a new post
- Upload the image and add the caption from the row
- Click Share and delete the row