Skip to content

Instantly share code, notes, and snippets.

View mjmillar's full-sized avatar
💭
I may be slow to respond.

mjmillar

💭
I may be slow to respond.
View GitHub Profile
@d-neri
d-neri / Code.gs
Last active July 21, 2024 10:52
Google Apps Script - Gmail count emails by sender
// Execute the "run" function below after setting up the appropriate APIs
// Original credit: https://stackoverflow.com/a/59222719/501042
function sender_list_paged(token) {
var dt = new Date().getTime();
var ss = SpreadsheetApp.create('Gmail count emails by sender ' + dt);
var sh = ss.getActiveSheet()
sh.clear();
sh.appendRow(['Email Address', 'Count']);
var token = token || null;
var query = "in:inbox is:unread";