I'm learning Google-App-Script. An I have written a very simply script to manage my emails:
var threads = GmailApp.search('label:Project1 is:unread');
GmailApp.markThreadsRead(threads);
This script works nearly perfect. But when I have more then 100 unread emails in the Label "Porject1" I get the Error-Message that max. 100 Threads are allowed to change.
How can i limit my search command to 99 hits? Or is there another way to manage all hits in one step?