How to Perform Mail Merge using Gmail and Google Sheets

How to perform Mail Merge using Gmail and Google Sheets ← Email One of the most popular tasks in Gmail is performing Mail Merge. There are many ways to perform Mail Merge, and also many good tools out there to perform this. Some require Apps Script/some don’t.

At zenphi we have tried to make performing Mail Merge as powerful and yet painless as possible. Like everything else you can perform Mail Merge without writing a single line of code. Whether you are reading data from Sheets or getting the data from a Google Forms, Mail Merge can be in just a few steps.

On top of that zenphi enables you to perform Mail Merge and attach files to the emails, if required.

In this example, we are going to load data from a Google Sheets spreadsheet and dynamically construct the email body and subject in zenphi.

If you like to know more about reading data from Google Sheets, please have a look at this video.

You can also watch this video which explains scenario 1, Dynamically constructing email body in zenphi.

First, we are going to load a list of employees from a Google Sheet.

  1. Drag drop a Read Rows action, name it as Get Employees, and configure it to return all rows from the above Sheet
  2. Drag drop a Foreach Loop action and configure to loop through the output of the previous actions (Get Employees)
  3. Drag drop a Gmail Send Email Action. Select the connection and them email address you’d like to use
  4. On the "To" field, press the picker icon to open the variable picker. Then Select Email from Foreach Employee -> Item. Please note that you can also select Email by just type @ in the field and select it from the list of options.
  5. Set the Subject as WHF Policy Agreement for @Foreach Employee.Item.Name
  6. Construct the email body as per below. Please note that you can select and insert the dynamic values from the previous actions (ex. Employee Information) anywhere in the email body by either typing @ or by clicking on the picker icon on the right hand side of the control
  7. Publish the Flow
  8. Head to the Flow Listing page and press the Run Now button next the Flow

Now zenphi will start reading the Sheets’ rows one by one and send a personalized email to each employee in the Sheet.

As you can see in just a few steps you have been able to perform a Mail Merge using Gmail and Google Sheets, without needing to write or copy paste any code.

While this is very basic, but useful Flow, you can easily extend the solution by adding if conditions, updating the Sheets when an email is sent, saving the email content to Google Drive, etc. And that’s where the power of zenphi lies. You can even easily seek an approval before an email is sent. All with just a few drag drops and configuration.