Being relatively new to Google Apps Script, I created / put together a script for a Spreadsheet that would be shared with other users (can edit). The script is working fine from my account, but when run by other users, the following message comes up:
"No item with the given ID could be found, or you do not have permission to access it."
I'm assuming the reason for this is that the script sends emails, creates new files, and copies data from the shared Spreadsheet to other Spreadsheets in my Drive folders that are not shared with the other users (and I do not want to share them).
Question 1: Is there a way in the permission settings around it?
Since the script clears the content of the shared Spreadsheet after data is entered by other users, I thought of creating a script that does the following:
Question 2: If the answer to question 1 is no, could anyone think of better way to do it other than the steps above?
Thanks.
Deploy it as "You" (Execute the app as: Me
) with the sharing option Who has access to the app:
either Anyone
, Anyone within [your domain]
or Anyone, even anonymous
.
The WebApp will have all the access permissions you have, no matter which user runs the app.
See here for a sample.