GetThreads Extra Large Tags

I have another 900 threads in the shortcut. I would like to get them all in order to work out some indicators in a script. getThreads()seems to be maximum for 500 threads, which is consistent with what the documentation said:

This call will fail if all threads are too large to handle the system. If the stream size is unknown and potentially very large, use the "paged" call and specify the ranges of the streams to retrieve in each call.

So now the problem is what I'm doing

GmailApp.getUserLabelByName("Huge Label").getThreads(501, 1000).length;

I get the message: "The argument max cannot exceed 500." Any suggestions on how to handle a tag with a very large number of threads?

+5
source share
1 answer

getThreads()

getThreads(start, max)

,

GmailApp.getUserLabelByName("Huge Label").getThreads(501, 500).length;

501 1000.

+7

All Articles