Member-only story

How to fetch Gmail data in Google Spreadsheet using Google Apps Script

Dilip Kashyap
4 min readJul 19, 2022

--

Image Source: Medium

Hello Friends,

In this article, we are going to learn about — “How to fetch Gmail data from mail box to Google Spreadsheet using Google Apps Script”. This automation with Gmail can save you hours of time, and it makes tracking mailbox emails very handy for tasks such as keeping follow-up records, statistics graphs with mail data, and many more.

Let’s take a look at how to pull the Gmail data into a Google Spreadsheet.

  1. Create Google Spreadsheet with required columns
  2. Create Google Script function inside the Google Apps Script editor
  3. Create a function to add a custom menu to execute the Google Apps Script

Step 1: Create Google Spreadsheet

This step requires you to create a Google Spreadsheet with the required columns. The following columns are used for this project: Timestamp, Thread Count, From Email, To Email, Email Subject, and Email Content.

Step 2: Google Apps Script function

We will create functions in the script editor in order to fetch the Gmail data in the Google Spreadsheet in this step.

--

--

Dilip Kashyap
Dilip Kashyap

Written by Dilip Kashyap

Software Developer at IIT Gandhinagar | Google Workspace | Contact me at dilipkashyap.sd@gmail.com

Responses (2)