How to Send Personalized Emails with Mail Merge?
Sending personalized emails to multiple recipients can be difficult. But mail merge helps you send emails to hundreds of users. Therefore, in this guide, I am going to help you send personalized emails with Mail Merge. Here, I am going to explore the common scenarios to use this method and learn the steps to apply it.
Gmail provides mail merge functions that you can use to send personalized emails, newsletters, and announcements to multiple recipients. It replaces Gmail’s multi-send mode. The Mail merge is not for personal accounts.
To use it, you must have an eligible Google Workspace plan like Workspace Individual, Business Standard, Business Plus, Enterprise Standard, Enterprise Plus, Education Standard, and Education Plus. Do you know how to apply mail merge? Below are the steps.
Use Gmail Mail Merge to Send Personalized Emails
- On your desktop, go to the browser and sign in to Gmail.
- Click on the Compose button and write down the personalized email draft.
- Alternatively, you can open an existing draft.
- In the To: tab, add all the recipients.
- At the right side of the To: line, click Use mail merge option.
- Turn on Mail Merge and in the message, enter @.
- Choose a merge tag, insert it, and press the Enter button.
In this process, you directly add your recipients while typing the email. If you want to use a spreadsheet to add the recipient email address. Follow the steps below.
Send Personalized Email with Mail Merge Using Spreadsheet
Before starting, your contact information must be in the first tab of your spreadsheet. Only the text is contained.
- In Gmail, click the Compose button.
- In the To: bar, click the Use mail merge button.
- Enable Mail Merge, then Add from a spreadsheet.
- Choose your spreadsheet and hit the Insert button.
- Select the columns of your spreadsheet that contain the emails of the recipients.
- Lastly, press the Finish button. In the message, enter @. Choose the merge tag and press the Enter button.
While this method can easily help you in
Limitations of Using Gmail Mail Merge Feature
- You can only pull data from Google Sheets for mail merge if both belong to the same Google account or Workspace.
- For the database, Mail Merge only relies on Google Sheets. So, if your data is in different databases, you have to first move to the Sheets.
- You can do basic merge fields like name or email, but Gmail restricted advance personalization.
- Despite mail merge, Gmail still has daily sending limits. Which disrupts campaigns for growing teams.
So, Gmail is not
Apply Mail Merge with Google Apps Script
- First, make sure you have a Google Sheet with all the contact data.
- Properly adjust the data in the first row.
- Then, go to Gmail and click on the Compose button.
- Draft the personalized email and leave it in the drafts folder.
- The place where you want to put the sheet headers.
- Write down the subject line for the identification.
- Go to your Google Sheet, then the Extensions.
- Choose Apps Script and then enter this code.
/**
* Creates a custom menu "Mail Merge" in the spreadsheet.
*/
function onOpen() {
const ui = SpreadsheetApp.getUi();
ui.createMenu('Mail Merge')
.addItem('Send Emails', 'sendEmails')
.addToUi();
}/**
* Sends personalized emails based on Sheet data and a Gmail draft.
*/
function sendEmails() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheet = ss.getActiveSheet();
const data = sheet.getDataRange().getValues();
const headers = data[0];// 1. Get the Gmail draft subject from the user
const subjectLine = Browser.inputBox("Mail Merge",
"Enter the EXACT subject line of your Gmail draft:", Browser.Buttons.OK_CANCEL);if (subjectLine === "cancel" || subjectLine === "") return;
// 2. Find the Gmail draft template
const drafts = GmailApp.getDrafts();
const draft = drafts.find(d => d.getMessage().getSubject() === subjectLine);
if (!draft) {
Browser.msgBox("Error: No draft found with that subject line.");
return;
}
const templateBody = draft.getMessage().getPlainBody();
const templateHtml = draft.getMessage().getBody();
// 3. Loop through each row (skipping headers)
for (let i = 1; i < data.length; i++) { const row = data[i]; let personalizedBody = templateBody; let personalizedHtml = templateHtml; let recipientEmail = ""; // Replace placeholders like {{HeaderName}} with row data headers.forEach((header, index) => {
const placeholder = `{{${header}}}`;
const value = row[index];
personalizedBody = personalizedBody.split(placeholder).join(value);
personalizedHtml = personalizedHtml.split(placeholder).join(value);
if (header.toLowerCase() === "recipient" || header.toLowerCase() === "email") {
recipientEmail = value;
}
});
// 4. Send the email
if (recipientEmail) {
GmailApp.sendEmail(recipientEmail, subjectLine, personalizedBody, {
htmlBody: personalizedHtml
});
}
}
Browser.msgBox("Mail merge complete!");
}- Save this code.
- Refresh the Google Sheet, and you will see a new menu titled Mail Merge.
- Click Mail Merge and then Send Emails.
- Grant the permissions, click Review Permissions.
- Choose your account and then press the Allow button.
- Enter your subject line, paste it, and then hit the Ok.
Gmail Mail Merge and Google Apps Script help you send personalized emails with mail merge. But you can only use them in a single Google Workspace account. Many businesses have multiple accounts where the native mail merge no longer works.
When Mail Merge Is Not Enough?
During the company mergers, domain changes, client onboarding, etc., where contact lists, spreadsheets, and email accounts are located on different Google Workspace tenants. Only Gmail mail merge, or Google Apps Script, cannot help you.
In this case, SysTools Google Workspace Migration Tool, a software that can easily move your contacts data to the account where you can start using the mail merge.
Conclusion
For business mail merge is a reliable way to send emails to multiple recipients. Therefore, this guide provides you with information on how to send personalized emails with mail merge. In this, I have provided ways to use mail merge by simply adding it, using a spreadsheet. I have also explained the limitations of Gmail mail merge. Then, explain how a professional software will help you in applying mail merge.