Search code examples
google-apps-scriptgoogle-sheetsfile-sharing

Share script when sharing google spreadsheet with option "anyone with a link"


I'm sharing a spreadsheet with several people that don't have google account thanks to the option "anyone with a link".

For this spreadsheet I have created some scripts to add new menus and actions to the document and I want those people to be able to execute them at least but I haven't found the way to do so. For the moment only people within my business app domain can see those menus.

Hope someone as a way of solving such issue.

Thanks


Solution

  • Permissions for a Spreadsheet and permissions for scripts are not the same thing, as you've found.

    Only custom functions can be run anonymously, all other types of scripts require an authenticated user of some sort, and possibly authorization to access private data. Adding menus will require a logged in user. Your "actions" may require authorization as well, depending upon what services are invoked.

    Reference: Permissions and types of scripts.

    You can find ways to work around this, but not within the Sheets UI. For example, you could publish a menu of actions as a web app, which would be available for anonymous access but would run under your authorization.

    I'd opt for requiring your users to have a google account.