With Google Apps Script, marketers can capture Gmail messages, parse them for relevant information, and add them row-by-row to a Google spreadsheet. This can be especially helpful for capturing leads or contacts.
A comprehensive write-up from Armando Roggio on using Google Apps Script to copy emails from your Gmail account to Google Sheets. As an added bonus the tutorial is also written using the new V8 runtime syntax.
Source: Capture Gmail Messages in a Google Sheet | Practical Ecommerce
Member of Google Developers Experts Program for Google Workspace (Google Apps Script) and interested in supporting Google Workspace Devs.