Personalize Mail Merge emails with placeholders
Type a column header between double curly braces, like {{First Name}}, in the subject or body of your Gmail draft. For each row, the add-on replaces it with that row’s value. The text inside the braces must match the header exactly, including capital letters and spaces.
How does a placeholder match a column?
The add-on compares the text inside the braces with the headers in row 1 of your sheet, character by character.
| Header in row 1 | Works | Doesn’t work |
|---|---|---|
First Name |
{{First Name}}, {{ First Name }} |
{{first name}}, {{FirstName}}, {{First_Name}} |
Company |
{{Company}} |
{{company}}, {{Company Name}} |
Email |
{{Email}} |
{{email}}, {{E-mail}} |
- Capital letters count.
{{first name}}does not matchFirst Name. - Spaces count.
{{FirstName}}does not matchFirst Name. Watch for a hidden space at the end of a header, such asCompany. - One space inside each brace is fine.
{{ First Name }}works too. - Any column works, including Email and columns you add yourself.
- You can repeat a placeholder as many times as you like.
Can I personalize the subject line?
Yes. Placeholders work the same way in the subject and in the body. For example, A quick idea for {{Company}} becomes “A quick idea for Northwind”.
What happens if a cell is empty?
The placeholder becomes empty text. Hi {{First Name}}, turns into “Hi ,” for a row with no first name. Placeholders have no default value, so use a fallback column (below) if some cells are empty.
What happens if there is no matching column?
The placeholder stays in the email as it is. The recipient sees {{Frist Name}} literally. Always click Send Test Email before you start a campaign. The test uses row 2 of your sheet, so any placeholder that didn’t match shows up there.
Is the draft’s formatting kept?
Yes. The message is sent as HTML, so bold text, colors, lists, links and images in your Gmail draft are kept. If the whole placeholder is formatted, for example bold, the value is bold too. Don’t format only part of a placeholder. If you put a placeholder inside a link address, check the link in your test email before you send.
Files attached to the draft are sent to every recipient. To send a different file to each person, see personalized attachments.
How do I add a fallback for empty cells?
Prepare the text in Google Sheets with a formula, then use the new column as the placeholder.
- Add a column called Greeting.
-
In row 2, enter a formula like this (assuming First Name is in column B):
=IF(B2="", "Hi there,", "Hi " & B2 & ",") - Fill the formula down to the last row.
- In your draft, write
{{Greeting}}instead ofHi {{First Name}},.
The add-on uses the result of the formula, so rows without a name get “Hi there,” and the rest get “Hi Ana,”.
Can I add conditional content?
Not inside the draft. There are no if/else rules, default values or loops in placeholders. Do the logic in Google Sheets instead:
- Formula columns. For example, a column called Offer with
=IF(E2="Pro", "As a Pro customer, you get early access.", "")and{{Offer}}in the draft. Use IF, IFS or VLOOKUP to pick a sentence for each row. - Separate tabs. Put each group of recipients on its own tab and run a campaign from each tab with its own draft.
How do I format dates, prices and percentages?
A date or currency cell may not come out the way it looks in the sheet. To control the format, add a text column with the TEXT function and use that column as the placeholder:
=TEXT(C2, "mmmm d, yyyy")
=TEXT(D2, "$#,##0.00")
Can each recipient get a different attachment?
Yes, on paid plans, with Personalized Attachments on the Campaign Options tab:
- Name each file so that it contains the recipient’s email address, for example
[email protected]or[email protected], and keep the files in Google Drive. - Click Select Files from Drive and pick the files. Hold Ctrl (⌘ on a Mac) to select several.
- Click Match Files to Corresponding Emails.
The add-on writes the matched files’ Google Drive links into a column called Attachments, and creates the column if it’s missing. Several files for one person are separated by commas. When the campaign runs, each recipient gets the files in their row, plus any files attached to the draft.
Google limits each email to 25 MB of attachments in total.
Tips
- Put a row with your own address and some tricky data (an empty name, a long company name) in row 2, then send a test email.
- Keep headers simple: letters, numbers and spaces. Symbols such as parentheses,
$,?or*in a header can stop its placeholder from being replaced. - Remove extra spaces in your data with
=TRIM(B2)or Data → Data cleanup → Trim whitespace.
What you can’t do with placeholders
- Set a default value inside the placeholder.
- Show or hide text with conditions inside the draft (use a formula column instead).
- Add CC or BCC recipients per row. The add-on sends one email to the address in the Email column.
- Change the From address per row. Emails always come from the account you run the add-on in. You can set a display name with Sender Name.
Related
Gmail™, Google Sheets™ and Google Drive™ are trademarks of Google LLC.