I have set up a Google Apps Scripts project with the intent of creating a Google Spreadsheets add-on with custom functions. However, when I use the option "Test as add-on", I can't use the functions that I created. When I paste the script code into the script editor opened from a spreadsheet it works fine, however.

Is this a limitation on how custom functions work in Spreadsheets, or am I simply doing something wrong?

  • 1
    The documentation offers only a cryptic remark: "Custom functions in Google Sheets use their own authorization mode, AuthMode.CUSTOM_FUNCTION, which is similar to LIMITED but has slightly different restrictions." No word about these slight differences. What does your custom function attempt to do? – user79865 Dec 14 '15 at 20:13
  • There are quite a few custom functions. They all pull data from a REST API using UrlFetchApp (or the CacheService). However, even a function that simply returns a constant string does not work. It is not that the function gives an error, but it is unknown in the sheet: it results in a #NAME. – Eric Spreen Dec 14 '15 at 21:41


According to Eric Koleda in Code.gs - date_add_and_subtract to make available the custom fuctions in an add-on it's required to include at least one add-on menu, but this is not working at this time.


There are a couple of related GAS issues, please star them:

This answer was cross-posted to Stack Overflow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.