Enabling shared access to custom Google Sheets scripts

I made a Google Sheet with some cool scripts that add a toolbar. I want my team to use these tools but they’re getting permission errors. Here’s what I found out:

  • The sheet is shared with lots of people
  • My scripts make a toolbar with buttons for easy use
  • Others can’t use the toolbar without permission
  • If they run the script manually once they can use it after

Do I need to do something special to let everyone use these scripts? Or does each person have to run it once to okay the permissions?

I’ve looked around online but couldn’t find an answer for this exact problem. Any help would be awesome! Thanks!

hey there, i’ve run into this before. what u need to do is make the script a web app. go to script editor, make a new version, then publish as web app. set it to run as you and give access to your org.

share the url with ur team. they gotta open it once to give permission. after that, should work fine. good luck!

I’ve dealt with a similar situation before, and it can be a bit tricky. From my experience, the issue lies in how Google handles script permissions for shared sheets. Even if you’ve shared the sheet, the scripts are still considered ‘your’ scripts.

Here’s what worked for me: I had to publish the script as a web app. Go to Tools > Script editor, then File > Manage versions (create a new version), and finally Publish > Deploy as web app. Set the ‘Execute as’ to your account and ‘Who has access’ to ‘Anyone within [your organization]’.

After publishing, you’ll get a URL. Share this URL with your team and ask them to visit it once while logged into their Google account. This should prompt them to grant the necessary permissions. Once done, they should be able to use the toolbar without issues.

It’s a bit of a workaround, but it’s the most straightforward solution I’ve found. Hope this helps!

From my experience working with shared Google Sheets and custom scripts, there’s a way to streamline this process. Instead of having each team member manually run the script, you can deploy it as an add-on for your organization. This approach requires some initial setup but offers a smoother user experience.

To do this, go to the Script editor, create a new version of your script, then choose ‘Publish > Deploy from manifest’. Follow the prompts to create a new deployment. Once approved by your G Suite admin, team members can install the add-on directly from the Google Workspace Marketplace.

This method eliminates individual permission requests and ensures everyone has access to your custom toolbar. It’s a more scalable solution, especially if your team grows or you need to update the script frequently. Just remember, you might need to coordinate with your IT department for the initial setup and approval process.