Google Sheets custom function errors: why =MYFUNC() breaks at scale, and the one-call-per-range fix
A Google Sheets custom function has 30 seconds to return a value, not the six minutes a normal Apps Script run gets. Every cell that uses it is a separate call to Google's servers, it can only use ser