I'm getting the Service invoked too many times (URLfetch) error in my googlesheets spreadsheet. I'm pulling stock information from 12 different API calls using the ImportJSON google apps script. Each call should only use URLfetch once. When I change the stock ticker, it requests the 12 API calls. I know i'm not hitting the daily quota of 100K, I think i'm triggering the too many calls per second. I've even added a 1000ms delay after each url fetch (Utilities.sleep(1000)) but still constantly tripping the exception. The error seems to happen most when I haven't clicked on the spreadsheet tab in a while, and the whole spreadsheet has to load again.
Asked
Active
Viewed 9 times