title: 250 / 500 threads limit in GmailApp with Google Apps Script
body: <p>I noticed the following limitation when using <code>GmailApp</code> in Google Apps Script:</p>
  
  <pre><code>var threads = GmailApp.search("to:test@example.com");
  Logger.log(threads.length);  // 250 max
  
  var threads = GmailApp.search("label:mylabel");
  Logger.log(threads.length);  // 500 max
  
  var label = GmailApp.getUserLabelByName('mylabel');
  var threads2 = label.getThreads();
  Logger.log(threads2.length); // 500 max
  </code></pre>
  
  <p><strong>How would you make a job</strong> (such as extracting email adresses and adding them to a list) <strong>on more than 500 or 250 threads?</strong></p>
  
  <p>Would you do it manually by splitting by dates (not very beautiful but probably working)?</p>