Trouble Running Google Apps Script in shared drive

45 Views Asked by At

I am encountering an issue while attempting to run a Google Apps Script attached to a Google Sheet stored on a shared drive which was created using Node.js and the Google Drive API with a service account.The specific error message I am facing is: "The script cannot be run because it is owned by a service account. Please copy or transfer the project to a valid account before running."

I have tried programmatically transferring ownership of the file to my user account using the Google Drive API to update the permissions, but I received the following error: "Owner role is invalid for shared drive items."

My user account already has the "organizer" and "fileorganizer" permissions.

I would appreciate any insights or guidance on how to resolve this issue.

Thanks in advance!

0

There are 0 best solutions below