Apps Script services impose daily quotas and hard limitations on some features. If you exceed a quota or limitation, your script will throw an exception and terminate execution.
Quotas are set at different levels for users of consumer accounts (like gmail.com), Google Apps free edition (discontinued), or G Suite.
Daily quotas are refreshed at the end of a 24-hour window; the exact time of this refresh, however, varies between users.
The table below lists the daily quotas as of December 2016. You can confirm the current on the Quota Limits tab of the Apps Script Dashboard. The quotas shown below are provided solely to assist you in testing scripts. All quotas are subject to elimination, reduction, or change at any time, without notice.
|Feature||Consumer (gmail.com)||Google Apps free edition (legacy)||G Suite||Early Access|
|Calendar events created||5,000 / day||10,000 / day||10,000 / day||Flexible|
|Contacts created||1,000 / day||2,000 / day||2,000 / day||Flexible|
|Documents created||250 / day||500 / day||1,500 / day||Flexible|
|Email recipients per day||100* / day||100* / day||1,500* / day||1,500* / day|
|Email read/write (excluding send)||20,000 / day||40,000 / day||50,000 / day||Flexible|
|Groups read||2,000 / day||5,000 / day||10,000 / day||Flexible|
|JDBC connection||10,000 / day||10,000 / day||50,000 / day||Flexible|
|JDBC failed connection||100 / day||100 / day||500 / day||500 / day|
|Properties read/write||50,000 / day||100,000 / day||500,000 / day||Flexible|
|Spreadsheets created||250 / day||500 / day||3,200 / day||Flexible|
|Triggers total runtime||90 min / day||3 hr / day||6 hr / day||6 hr / day|
|URL Fetch calls||20,000 / day||50,000 / day||100,000 / day||Flexible|
|URL Fetch data received||100MB / day||100MB / day||100MB / day||100MB / day|
The table below lists hard limitations as of December 2016. The limits shown below are provided solely to assist you in testing scripts. All limits are subject to elimination, reduction, or change at any time, without notice.
|Feature||Consumer (gmail.com)||Google Apps free edition (legacy)||G Suite Basic/Business/Edu/Gov||Early Access|
|Script runtime||6 min / execution||6 min / execution||6 min / execution||30 min / execution|
|Email attachments||250 / msg||250 / msg||250 / msg||250 / msg|
|Email body size||200kB / msg||200kB / msg||400kB / msg||400kB / msg|
|Email recipients per message||50 / msg||50 / msg||50 / msg||50 / msg|
|Email total attachments size||25MB / msg||25MB / msg||25MB / msg||25MB / msg|
|Properties value size||9kB / val||9kB / val||9kB / val||9kB / val|
|Properties total storage||500kB / property store||500kB / property store||500kB / property store||500kB / property store|
|Triggers||20 / user / script||20 / user / script||20 / user / script||20 / user / script|
|URL Fetch headers||100 / call||100 / call||100 / call||100 / call|
|URL Fetch header size||8kB / call||8kB / call||8kB / call||8kB / call|
|URL Fetch POST size||10MB / call||10MB / call||10MB / call||10MB / call|
|URL Fetch URL length||2kB / call||2kB / call||2kB / call||2kB / call|
Flexible Quotas Early Access
Normally, if a script execution exceeds one of the above quotas or limitations, the script execution stops and an appropriate error message is returned. This can potentially leave the script's data in an indefinite state.
Under the flexible quota system, such hard quota limits are removed. Scripts do not stop when they reach a quota limit. Rather, they are delayed until quota becomes available, at which point the script execution resumes. Once quotas begin being used, they are refilled at a regular rate. For reasonable usage, script delays are rare.
If a script reaches a quota or limitation, it will throw an exception with a message similar to the following:
Limit exceeded: Email Attachments Per Message.This indicates that the script exceeded one of the quotas or limitations listed above.
Service invoked too many times: Calendar.This indicates that the script called the given service too many times in one day.
Service invoked too many times in a short time: Calendar. Try Utilities.sleep(1000) between calls.This indicates that the script called the given service too many times in a short period.
Service using too much computer time for one day.This indicates that the script exceeded the total allowable execution time for one day. It most commonly occurs for scripts that run on a trigger, which have a lower daily limit than scripts executed manually.
Script invoked too many times per second for this Google user account.This indicates that the script began executing too many times in a short period. It most commonly occurs for custom functions that are called repeatedly in a single spreadsheet. To avoid this error, code your custom functions so that they only need to be called once per range of data, as explained in the guide to custom functions.
There are too many scripts running simultaneously for this Google user account.This indicates that you have too many scripts executing at once, although not necessarily the same script. Like the exception above, this most commonly occurs for custom functions that are called repeatedly in a single spreadsheet.