Unfortunately both Salesforce and Google impose some limitations on us, and as result, not every scenario will work correctly for you. Here’s what you need to keep in mind:

  • The total run time of one google script execution cannot exceed 6 minutes.
    If it takes more than 6 minutes to pull/push all the data in your document – THE AUTOMATED DATA OPERATIONS WILL NOT SUCCEED. NO ERROR NOTIFICATIONS WILL BE SENT either, since this limit happens in the Google Script engine and there is no way for us to catch it. Enabling logging of automatic operations to a separate sheet will help you see at which point your operations stop. Try splitting your automatic data operations into different documents if you run into this limit.
  • The most frequently we can run the auto-refresh function for you is once an hour. This should be enough resolution for most of the use cases.
  • For free GMail users, the total run time of any script is 90 minutes/day. If you have multiple schedules running hourly, their total run time can quickly add up to exceed that. In that case you will notice that the schedules will skip some of the hours, most commonly in the morning. We recommend that you use your GSuite account if you are constantly running into this limit. GSuite accounts have a total script run time of 6 hours per user.
  • You can only set up automatic refresh on up to 20 documents for one Google user.
  • You are only allowed to have up to 2,000,000 cells in a single Google Spreadsheet document. Seems like a lot, but when you start putting multiple reports in it – you can hit that limit. You will see this error if your data pull from salesforce will increase the total number of used cells to more than 2 million.
  • Salesforce API allows us to run queries that last no longer than 2 minutes. If your query is heavy on relational fields and has to plough through a lot of data – you will get a “Timeout” error. Running a particularly huge report may run into the same problem, so try bringing back only data that you actually need.

The good news is that all these limitations tend to become less restrictive with time, as technology advances and cloud providers figure out ways of doing things faster.

Current Google Apps Script Execution Limits