VERY new to scripting - Error code help

101 views
Skip to first unread message

Jake Oshinsky

unread,
Jun 2, 2022, 12:42:19 PM6/2/22
to Google Apps Script Community
Info:  I have written a script that takes info from a Google Sheet and inputs it into a Docs template and then saves it as a new document in a specified folder. The script is contained within the initial Google Sheet and when I use it (I am the author/owner of all these files) it works great, however when one of my coworkers tries to run it it has an error. I followed a guide that can be found here and made some slight modifications to suit my needs. Screenshot of my code will be attached. Through my searching I've found others with similar issues though no resolutions.

Error:  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. at createNewGoogleDocs(Code:11:38)

I have ensured that the other users have editor access to the original sheet, the drive folder where the newly created documents are saved (called by ID), and the template that is used to create the documents (also called by ID).

Goal: I'd simply like the other members of my team to be able to run the script and have the new files deposited in this shared folder.

Screenshot 2022-06-02 093021.png

Note: This is the first piece of code I've ever written but hopefully not my last so if there's any additional helpful, constructive input I'm interested in hearing it!

Scott Bennett

unread,
Jun 2, 2022, 12:51:35 PM6/2/22
to google-apps-sc...@googlegroups.com
I often have received that error when one of the documents or sheets I’m trying to access is in a shared drive. Just FYI

Scott Bennett


Sent from my iPhone 

On Jun 2, 2022, at 11:42 AM, Jake Oshinsky <josh...@samueliacademy.org> wrote:

Info:  I have written a script that takes info from a Google Sheet and inputs it into a Docs template and then saves it as a new document in a specified folder. The script is contained within the initial Google Sheet and when I use it (I am the author/owner of all these files) it works great, however when one of my coworkers tries to run it it has an error. I followed a guide that can be found here and made some slight modifications to suit my needs. Screenshot of my code will be attached. Through my searching I've found others with similar issues though no resolutions.
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/d4535fb5-cfc5-4480-97fd-b93d79eb7bd3n%40googlegroups.com.
Screenshot 2022-06-02 093021.png

Витя Коледа

unread,
Jun 20, 2022, 8:33:07 AM6/20/22
to google-apps-sc...@googlegroups.com

чт, 2 июн. 2022 г., 19:42 Jake Oshinsky <josh...@samueliacademy.org>:
Reply all
Reply to author
Forward
0 new messages