This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Google Apps Script for counting emails by sender in batches. Stopps and resumes after 5mins of processing to avoid reaching script runtime limit. | |
// 1. Allow required permissions | |
// 2. Add gmail service to project | |
// 3. Fill <your-email> in `runProcessor` function and adjust query if needed | |
// 4. Run function `runProcessor` | |
// 5. Result will be saved in a new spreadsheet | |
// Based on ideas from https://stackoverflow.com/a/59222719/5162536 and | |
// https://medium.com/geekculture/bypassing-the-maximum-script-runtime-in-google-apps-script-e510aa9ae6da |