M
M
Mirtopir2020-03-15 20:35:50
Google Apps Script
Mirtopir, 2020-03-15 20:35:50

How to poll multiple Gmail mail accounts from one GAS script?

Good day.
The task is to collect data from letters from several mailboxes in one Google spreadsheet.
I see two options:
1) Each account with mail has its own script with a trigger, which parses the mailbox and writes to one common table (access via the link to edit).
2) The correct script in the general table, which bypasses all mails in a cycle (login, password are known) and collects the information itself into a table.
The second option seems logically more correct.
In articles everywhere I see the same type:
var threads = GmailApp.getInboxThreads();
That is, we work only with our box. How to login and get data from any other gmail box?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Noir, 2020-03-16
@PolarBearGG

make the functions of reading the mail and copying it to the table,
enter the logins to the mail as an object and do it all at once

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question