Currently reports can be updated at the following intervals:
- hourly (Business / Team plans only)
If you need more frequent or real-time data refreshes, consider using the ImportAPI() Custom Sheets Function instead of the scheduling feature.
All triggers will use the spreadsheet timezone, which you can view by clicking File > Spreadsheet Settings. For more information on changing your sheet timezone, check https://support.google.com/docs/answer/58515.
Please note that if you change your spreadsheet timezone, you will need to delete and re-add your triggers to run off the updated timezone.
To create an automatic trigger, click Add-ons > API Connector > Schedule Triggers > Add New, or click the Schedule tab in the top navigation bar.
Here you can choose specific API request names from the drop-down menu, so different requests can have different triggers. Alternately, you can choose the 'All' option to select all of them at once.
Once you've chosen which request(s) you'd like to schedule, choose your desired refresh frequency.
As you can have multiple triggers in a sheet, give them clear names to differentiate (e.g. VWO - daily).
- Google doesn’t allow add-ons to run triggers more than once an hour. This is their policy for all add-ons, as detailed in the documentation.
- Google Apps Script services imposes additional quotas and limits. For example there is a limit of 20,000 URL fetch calls (this includes API calls) per day per user, processes can only run for 6 minutes each hour, and triggers have a total runtime limit of 90 mins a day.
Triggers are managed on Google's side, so if your triggers stop running or get delayed, you are likely running into Google's quotas and limits.
The most common causes of trigger issues are the 6 minutes/execution and 90 minutes/day runtime limits on triggers. These runtimes are shared between all your sheets that use triggers, so if you have many sheets or queries refreshing at the same time, your triggers may instead be skipped or pushed to the next hour or day. This can happen consecutively, such that your triggers don't run at all.
If you are experiencing issues with your triggers, please try the following tips to resolve them:
- To avoid inadvertently reaching Google's limits, limit triggers and queries where possible. Reserve hourly refreshes for your most important queries, and don't run hourly refreshes if you only need daily. Your data may never fully refresh if you implement large numbers of hourly triggers.
- Remove unecessary triggers. Navigate to https://drive.google.com/drive/my-drive and click Recent to identify files that have updated recently, and check to see if these updates were automatically triggered by any script or add-on (not just API Connector). Remove any unused triggers, as they may be interfering with the triggers you want.
- Limit usage of functions like IMPORTJSON() and GOOGLEFINANCE() as they can run every minute or two and expend your quota.
- Triggers in the Trash bin will remain active until they are permanently deleted. Therefore, navigate to https://drive.google.com/drive/my-drive and click Trash > Empty Trash to remove them permanently.
- Occasionally, Google deletes or disables triggers without apparent reason or warning. This is a bug that has been reported to Google, e.g. here and here; please add stars for visibility! (Triggers are stored on Google's side, so you can determine if you've been affected by setting triggers and then looking to check if they've been deleted or disabled. You can see all triggers associated with your account here: https://script.google.com/home/triggers).
- Re-opening the add-on automatically re-initiates all triggers. So, if your triggers have stopped running, please open the sheet with trigger refresh issues, and open the API Connector sidebar by selecting Manage Request or Create New API Request from the API Connector menu. This will restore any triggers that have been disabled or deleted by Google.
- Google generally provides higher quotas for users with a G Suite business account. If you are using a standard (free) consumer account, upgrading to G Suite may help.