How to get sender addresses of all mails of inbox of Gmail? (But optimized way)

245 views
Skip to first unread message

Levan Katsadze (leodevbro)

unread,
Feb 11, 2024, 8:20:21 PM2/11/24
to Google Apps Script Community
Hi, I know with Apps Script I can use the functions getInboxThreads() and getMessages() but they basically fetch the entire messages and then I can read the sender address of each message. This is ok if I have less than 5000 mails, but I have 100K mails, and it takes many many hours to fetch all messages with  getInboxThreads and getMessages functions. I just want to get the index, I mean, only sender addresses, nothing more. Is there any faster (more optimized) way to do it using Apps Script? or maybe there is some other way to do it?

If not with Apps Script, then maybe with Google Takeout MBOX file? How can I extract sender addresses of all messages from MBOX file? Also note that 100K mails MBOX file will be probably more than 10 GB size.

Thanks.

Brett Grear

unread,
Feb 12, 2024, 8:08:41 AM2/12/24
to Google Apps Script Community
Reply all
Reply to author
Forward
0 new messages