Loading
Loading
  • Home

  • Automation with Zapier

  • Zapier tutorials

Zapier tutorials

0 min read

How to connect Gmail with Google Sheets

By Nicole Replogle · February 21, 2024
A hero image of the Gmail app logo connected to the Google Sheets app logo on a light yellow background.

Your email inbox can be a scary place. If you're not diligent about archiving or sorting incoming messages (not to mention unsubscribing from seemingly endless marketing emails), the important stuff quickly gets buried by junk. 

A spreadsheet can be a great way to keep track of essential conversations and action items. From there, you can use your Google Sheet as a to-do list or as a central hub for other automations linking the rest of your tech stack. Or you might do a lot of work from Google Sheets—like collecting customer information or managing projects—and it would be convenient to send emails and notifications without leaving the app. 

In this article, we'll show you how to integrate Gmail with Google Sheets, no matter your use case. Plus, we'll give you a few ideas for automating your most common workflows to save yourself time (and prevent inbox overload).

Table of contents 

Can you connect Gmail with Google Sheets?

There are a few ways to integrate Google Sheets with Gmail. The most direct (but also the most technical) way is to use a script. For example, you might add a script to a Google Sheet that automatically populates a Gmail template using data in each spreadsheet row.

Here are the basic steps to set up this script:

  • Make a copy of Google's Gmail/Sheets Mail Merge sample spreadsheet.

  • Update the information in the spreadsheet columns to your liking (Note: if you change the column headers, you'll need to update the corresponding code under Extensions > Apps script).

  • Create a Gmail template using placeholders corresponding to your spreadsheet columns—for example, {{First name}}.

  • Copy the Gmail template's subject line.

  • Refresh your spreadsheet. In the custom menu that appears, click Mail Merge > Send Emails. 

  • Authorize the script when prompted, then paste the Gmail template subject line and click OK.

  • The emails should be sent to each recipient in your spreadsheet. 

  • If you need to modify or troubleshoot the script, see the app script documentation for more information.

But not everyone is comfortable with Google Sheets app scripts. Not only are they highly technical and easy to mess up, but you'll need to create multiple scripts to cover multiple workflows. If you're not inclined to spend a few hours or days teaching yourself the finer points of app scripts, there's an easier solution: no-code automation with Zapier.

New to Zapier? It's workflow automation software that lets you focus on what matters. Combine user interfaces, data tables, and logic with 6,000+ apps to build and automate anything you can imagine. Sign up for free.

Popular ways to integrate Google Sheets with Gmail

Zapier's automated workflows (we call them Zaps) let you connect Gmail and Google Sheets with just a few clicks. If you find yourself doing the same action repeatedly—or you can think of a way to streamline your Gmail using a spreadsheet—Zapier can handle that busy work for you. Let's look at two examples:

To get started with a Zap template—what we call our pre-made workflows—just click on the button. It only takes a few minutes to set up. You can read more about setting up Zaps here.

Save Gmail emails in a Google Sheet

There are many reasons you might want to send emails to a spreadsheet. Maybe you want to create an easily searchable backup for priority email content or you plan to keep a log of every email you send to prospective customers. Or maybe you want to add emailed assignments from your boss to your to-do list with a click. 

Instead of taking the time to manually copy subject lines and body content into Google Sheets rows, you can connect the two apps with Zapier. 

This Zap sends every new email you receive to a new spreadsheet row in Google Sheets. You can break each email into designated columns (like date, label, sender, recipient, and more). That way, it's easy to filter and sort views by whatever category makes sense to you. You can even add a link to the email so it's easy to view the original from your spreadsheet.

Add new emails in Gmail to Google Sheets rows

Add new emails in Gmail to Google Sheets rows
  • Gmail logo
  • Google Sheets logo
Gmail + Google Sheets

But what if you want more control over which emails are sent to Sheets? After all, scrolling through newsletters and spam emails to get to the good stuff is equally annoying no matter what app you're using. In that case, you can use these Zaps to set up a simple rule determining which emails trigger the Zap. 

The first Zap below only works for emails matching a search term (like a specific "from" address or a keyword in the subject line). The other Zap watches for your designated Gmail label (like "send to Sheets"). Just add that label to any emails you want sent to your spreadsheet.

Once these Zaps are set up, you can archive messages and clear your inbox to your heart's content, confident that the important emails are stored safely in Google Sheets.

Send an email for new Google Sheets rows

Another easy way to use Google Sheets and Gmail together is to trigger new messages directly from a spreadsheet. Maybe you want to send yourself a notification whenever someone on your team adds to your Google Sheet. Or perhaps you use a spreadsheet as your CRM, and it would be helpful to send automatic welcome emails to new leads whenever they're added to your database. 

No matter your use case, an automated workflow reduces your busy work while ensuring no messages fall through the cracks. These Zaps send an email matching your specifications anytime a spreadsheet row is added or updated in Google Sheets. 

Read our step-by-step tutorial on sending an email from Google Sheets

How to connect Gmail with Google Sheets with Zapier

As you might imagine, use cases for connecting Google Sheets and Gmail are practically limitless. In this tutorial, we'll focus on a simple scenario: saving emails labeled "inbound leads" to a Google Sheet. But once you get the hang of it, you'll be able to connect these two apps in a variety of workflows, from simple to complex.

Before you begin

Before you dive into setting up your own custom Zap connecting Gmail and Google Sheets, make sure to create a Zapier account. This process just takes a couple of clicks and is completely free. You'll also need a Google account.

For your Google Sheets step to work correctly, you'll also need to make sure you have a Google Sheet set up to use in your Zap and that it has a header row.

Once you've signed in to Zapier, you can either click the Create Zap button or navigate to "zap.new" in your browser.

Step 1: Connect your trigger app

All Zaps have a trigger and an action. Triggers are the events that start a Zap, while the action is the event performed by the Zap. Depending on the Zap you're building, your trigger app could be either Gmail or Google Sheets. 

In this example, we want to create a Zap that sends your emails to a Google Sheet, so we'll start by selecting Gmail as the trigger app in the Zap editor.

Gmail is shown in a search box in a trigger step in the Zap editor.

Then, choose your trigger event. We'll choose New labeled email for this example, but your trigger could be any new email, a new starred email, an email matching a search term, and more.

A dropdown menu in the Event field with New Labelled Email selected in the dropdown.

If you choose Google Sheets as your trigger app, you can trigger the Zap with new spreadsheets, worksheets, or new or updated spreadsheet rows. 

Once you select your trigger event, click Continue.

A trigger step in a Zap editor with Gmail selected as the trigger app and New Labeled Email selected for the trigger event.

You'll then be prompted to connect your Gmail account to Zapier. Once you've connected your account, select it from the dropdown menu and click Continue. 

Next, fill in your trigger step fields. These fields can vary depending on the trigger app and event, but for this example, we just need to choose a Gmail label. If you haven't created the label yet, do that in your Gmail app first. (While you're at it, mark a test email with that label.)

Then, wait a minute or two before refreshing the fields in the Zap editor. That label should appear as an option in the dropdown menu. Click Continue. 

Inbound leads is shown selected in the Label/Mailbox tab in the Label dropdown in a Gmail trigger.

Next, click Test Trigger. Zapier will look for an email in your account marked with the "Inbound leads" label. Once the test is complete, click Continue with selected record. 

A sample Gmail email in the Zap editor.

Step 2: Connect your action app

Now that your trigger is set up, you'll set up your action step. This is the event Zapier will perform once it detects that trigger. Start by finding and selecting your action app—Google Sheets, in this example.

An action step in the Zap editor with Google Sheets added to the app search field.

Then, choose the action event. For Google Sheets, available events include creating, deleting, or updating spreadsheet rows, creating columns, creating worksheets, and more. For this example, we'll choose Create Spreadsheet Row.

The event dropdown in the Zap editor with Create Spreadsheet Row selected in the dropdown.

When you're ready, click Continue. 

An action step in the Zap editor with Google Sheets selected for the action app and Create Spreadsheet Row selected for the action event.

You'll then be prompted to connect your action app account to Zapier. Once you've given Zapier permission to access Google Sheets, select it from the dropdown menu and click Continue. 

Next, fill in the action step fields to customize your Zap. Each app and event will have different fields to customize, but in our example, you'll start by selecting a specific spreadsheet. 

Note: To set up the rest of your Zap correctly, you'll need to make sure your Google Sheet has a header row with names for each of your columns. The Zap will pull in this info so you can map what information from Gmail will go to the right spot in Google Sheets. If the spreadsheet you want to use doesn't have a header row, add one now.

Inbound leads is shown selected in the dropdown of the Spreadsheet field.

You'll then choose a worksheet and customize each spreadsheet column with data from your trigger step. Click in each field and select data from your Gmail step from the dropdown. 

The Date received field dropdown menu with Date selected in the dropdown field.

For this example, we'll input the email's date received, name, email, subject line, and body text into corresponding columns in the spreadsheet. 

Google Sheets fields in the Zap editor with Gmail data added to each field.

When you're done customizing your action step, click Continue

Finally, let's test the Zap by clicking Test step. Zapier will send that test data to the action app by creating a new spreadsheet row in Google Sheets. We always recommend testing your Zap to make sure everything looks right—but if you're in a rush or just like living dangerously, click Skip test instead.

A successful test of Gmail data sent to a Google Sheet in the Zap editor.

If the test looks right to you, congrats! You're ready to use your new Zap. 

Take control of your inbox by integrating Gmail and Google Sheets

If you're a Google Workspace power user, it makes sense to connect your databases to your messaging app. Whether you want to save important emails to a spreadsheet or send emails from new spreadsheet rows, Zapier can take care of that busy work for you—no copying and pasting involved.

Get productivity tips delivered straight to your inbox

We’ll email you 1-3 times per week—and never share your information.

tags
mentioned apps

Related articles

Improve your productivity automatically. Use Zapier to get your apps working together.

Sign up
A Zap with the trigger 'When I get a new lead from Facebook,' and the action 'Notify my team in Slack'