<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1822615684631785&amp;ev=PageView&amp;noscript=1"/>

How to Convert Email to Google Sheets (Free, No Download Needed)

There are plenty of ways to convert your Google Workspace/Gmail email to Google Sheets.

One of those ways is free, requires no external app/add-on, and takes five minutes at most to set up.

The rest are more complex, time-consuming, and/or expensive.

So yeah, we’re going to focus on that first option.

In this article, I’ll go step-by-step through the process of getting your emails into Google Sheets using the Google Apps Script method.

I’ll also briefly touch on the other methods, as well as cover how to automate the process.

And finally, I’ll share the best way to get Google Sheets and Gmail working in sync — so you can create all your email marketing and mail merge mass emails inside Gmail using contact lists from Sheets.

Email to Google Sheets: Table of Contents

The Easy Way to Convert Gmail to Google Sheets

By far the easiest way to convert your Gmail to Google Sheets is with Google Apps Script.

The downside: Google Apps Script can look intimidating to some folks — like you need to know how to code to use it.

You don’t.

You only need to know how to copy and paste.

Here’s how to set it up.

Log into the Gmail account you want to extract to Google Sheets

This sounds basic. But for this all to work as smoothly as possible, you need to be logged into the correct Google account in your browser for both Gmail and Google Sheets.

Just to be sure, if you log into multiple Google accounts in one browser, I recommend logging out of all the other ones.

Again, I know this sounds basic. But this step trips up more people than you’d ever believe.

Create the Google Apps Script in Google Sheets

Open up a new sheet in Google Sheets. Name it whatever you want (as you can see, I called mine “Imported emails”).

Then type the following in different columns in Row 1 to serve as your column headers: MessageID, Date, Sender, Subject, Body.

Set up your Google Sheet for the import

Now go to Extensions > Apps Script.

Open the Apps Script menu

That will open the Apps Script window.

Give your script a name by clicking on “Untitled project.” This name is for your own use only, so it can be whatever you want; I called mine “Email extractor.”

Title your script

Now copy everything in this code block below and paste it over the “function myFunction() {}” in the main coding area of the screen.

function getEmailsToSheet() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const threads = GmailApp.search("label:your-label-here", 0, 10); // Replace with your search query
const messages = threads.map(thread => thread.getMessages()).flat();

// Get the last row of the sheet
const lastRow = sheet.getLastRow();

// Initialize a header row if the sheet is empty
if (lastRow === 0) {
sheet.appendRow(["Message ID", "Date", "Sender", "Subject", "Body"]);
}

// Handle the case where there are no rows (other than the header)
let existingIds = [];
if (lastRow > 1) {
// If there are data rows, retrieve Message IDs from Column A
existingIds = sheet.getRange(2, 1, lastRow - 1, 1).getValues().flat();
}

// Loop through messages and add new ones
messages.forEach(message => {
const messageId = message.getId(); // Unique ID for each email
const date = message.getDate();
const sender = message.getFrom();
const subject = message.getSubject();
const body = message.getPlainBody();

// Add the email only if its Message ID is not already in the sheet
if (!existingIds.includes(messageId)) {
sheet.appendRow([messageId, date, sender, subject, body]);
}
});
}

Paste our code in

Then click the floppy disk icon to Save.

Save your Google Apps Script

Deciding what emails you want to extract

Now you have to decide which emails you want to convert into Google Sheets.

We set up the Google Apps Script so it pulls all the emails that match a Gmail search. (In the script you pasted, it’s searching by label.)

If you wanted to pull every email, you’d make the search in:all, and you’d change the number “10” to a much larger number to cover all your emails (like 1,000+). But warning: This will take a long time (and might crash).

Changing the search inside the script

Instead, I recommend pulling this with smaller searches, like everything in your inbox (in:inbox) or everything starred (is:starred) or all mail that’s come since a certain date (newer_than:6m).

For my example, to keep things tidy, I’ll go with “is:starred”. I set the limit to 100, even though I know I don’t have 100 starred emails, just to give some buffer. Then I’ll Save the script.

The search I used to convert email to Google Sheets

Running the script

With everything set, click Run to run the script. (Note: You’ll probably get a pop-up where you need to give Google Apps Script the authorization to run.)

Run the Google Apps Script to import Gmail to Sheets

And when it’s run successfully, you’ll see that message in the Execution log.

Execution completes when the script is done

Head back over to the tab with your Google Sheet and you should see all the messages you extracted are now there!

Also note that if you had any threads that came up in your search, all the messages from those threads will be in the Google Sheet on individual rows.

See your emails inside your Google Sheet

The Apps Script is set up so you can run it again anytime you want and it will add any new messages that match the search to new rows in the Google Sheet.

And that’s something we can even automate

Automating the Google Apps Script to extract emails

You can have this Google Apps Script run automatically, in the background, to continue extracting your emails.

For instance, let’s set up the search for in:inbox so the Google Apps Script converts all the emails in our inbox to the Google Sheet.

Searching for everything in the inbox

The first time I save and run that script, it grabs all 13 messages in my inbox.

Now I’ll automate it to grab any new messages in my inbox just after midnight every night.

Click on the alarm clock icon on the left sidebar to open the Triggers menu.

The triggers menu

Click the + Add Trigger button in the bottom right corner.

Add a trigger

The settings I went with are:

  • Choose with function to run: getEmailsToSheet
  • Choose which deployment should run: Head
  • Select event source: Time-driven
  • Select type of time based trigger: Day timer
  • Select time of day: Midnight to 1am

Then click Save.

Trigger settings to automate emails to Google Sheets

Now every day between midnight and 1:00 A.M., this script will run and pull any new messages from my inbox into the Google Sheet. I don’t have to take any action — it will run automatically.

You’re all set. You can now convert your email to Google Sheets as you need — and have the conversion continue to run automatically.

And if you want, you can always set up the Apps Script on a different Google Sheet if you want to pull other emails. (For instance, you could have different Google Sheets for your different emails with different people.)

The Other Ways to Convert Email Into Google Sheets

Yes, the Google Apps Script method checked what I considered the most important boxes (free, easy, using native options).

But there are other methods you can use to import your emails into Google Sheets.

I’ll quickly cover those, just so you know what else is out there for you if — for whatever reason — you want to make this process more difficult.

Manual copy and paste

I’ll start with this one, though it’s comically inefficient. Yes, you could manually copy and paste your emails from Gmail into Google Sheets.

You shouldn’t… but you can.

Using Zapier or other automation software

You can set up automations in software like Zapier or Automate.io where every time you receive an email in Gmail, it’s added to your Google Sheet.

I wouldn’t advise this method, though. It will take just as long and be just as complicated — maybe even more so — as the Google Apps Script method I detailed above.

Plus these services will all cost you money if you exceed your monthly free quota.

Exporting emails to a CSV, then importing

There’s no native way inside Gmail to export your emails to a CSV.

You can export emails as a .mbox file, though. Then you could use an app to convert that file to a CSV and import that into Google Sheets.

Alternatively, you could use a Chrome extension that allows you to export your emails from Gmail as a CSV. I’m not going to recommend any of them. Why? I’ve tested a bunch of these types of extensions and have never found one I particularly like (or that works well, especially with larger volumes).

This is also adding a whole lot of unnecessary steps to the emails-to-Sheets process.

Using a Gmail add-on

The last option is using a Gmail add-on to export your emails to a Google Sheet.

These essentially do the same thing as we set up for free in five minutes with the Google Apps Script — only they want you to pay.

So once again, it really doesn’t make sense to go this route when it’s so easy to set up an efficient Gmail-to-Sheets function for free.

Make Gmail and Google Sheets Work Together Even Better

Now that you’ve seen how to export your emails from Gmail or Google Workspace into Google Sheets — let’s make that Gmail + Sheets partnership even stronger.

GMass is a Chrome extension that turns Gmail into a full email marketing platform. You can send any type of email — cold outreach, newsletters, mail merge, and more — from right inside Gmail.

And the best part: Rather than needing to hook up a complex and expensive CRM to manage your contact lists, it’s all done inside Google Sheets.

GMass has a native Google Sheets mail merge that makes it incredibly easy to personalize your emails.

Plus, with GMass you get unlimited everything (emails, contact, campaigns)…

an incredible suite of unique deliverability tools to help you get to the inbox (check out Spam Solver)…

free email verification

and everything else you could want or need, from tracking to automated follow-ups to A/B testing.

You can try out GMass for free with no credit card required. Just install the Chrome extension, connect your Gmail or Google Workspace account, and you’ll be sending campaigns in a matter of minutes. (Here’s a quickstart guide as well.)

See why almost 400,000 people use GMass and give it an average rating of 4.8 out of 5 stars across 10,000+ reviews.

See why GMass has 300k+ users and 7,500+ 5-star reviews


Email marketing. Cold email. Mail merge. Avoid the spam folder. Easy to learn and use. All inside Gmail.


TRY GMASS FOR FREE

Download Chrome extension - 30 second install!
No credit card required
Love what you're reading? Get the latest email strategy and tips & stay in touch.
   


Leave a Reply

Your email address will not be published. Required fields are marked *

Find out why GMass is the most popular Gmail mail merge tool in the world

Easy to learn. Easy to use. Packed with time saving, email enhancing features.

Try GMass for free Then check out the quickstart guide to send your first mail merge email in minutes!

GMass

Share This