Sharing a Google Sheet with a script

3,074 views
Skip to first unread message

Karl Wurster

unread,
Mar 24, 2021, 12:30:20 PM3/24/21
to Google Apps Script Community
Hello all,

I have a Google Sheet that is shared with three other users. I wrote several scripts which create a toolbar with buttons to allow easy use of the sheet and the automated creation of new Google Docs based on information in the sheet. I would like others to be able to use the toolbar, but when others try they get an error message, saying "Exception: No item with the given ID could be found. Possibly because you have not edited this item or you do not have permission to access it."

I asked another user (with editing rights) to try running the script manually (entered script editor --> selected function --> pressed run), but he got the same error. 

Does anyone have any advice on how I can solve this problem and allow the three other users to run the scripts?

Thanks for the help!

Karl

Kim Nilsson

unread,
Mar 25, 2021, 4:45:42 AM3/25/21
to Google Apps Script Community
You need to make sure all users have access to all referenced resources in the script, or have the script run as you, since you obviously have access to them.
Or, re-write the script so it doesn't use resources those other people don't have access to.

If people create a copy of your entire Sheet, then (I'm fairly sure) it can't run as you, as you are no longer part of the new Sheet. Then the script must absolutely  refer to resources that other user has access to.

Arnie Michael Arazo

unread,
Sep 12, 2022, 10:09:11 PM9/12/22
to Google Apps Script Community
Thanks for the answer, Kim. I did have the same problem with Karl. Now it's resolved thru your answer. thanks to you!
Reply all
Reply to author
Forward
0 new messages