I want to use GAS to retrieve the specified folder in my google drive, but every time I run a script, I get an error message saying, "I couldn't find an item with the specified ID or I don't have permission to access it."
In order to gain access, you have already added the email address of your GAS account on the Sharing settings page of that folder.
I still get the above error message, but I would appreciate it if you could tell me what are the possible causes.
I'm sorry to ask you a rudimentary question.
Here is the actual code.
The folder ID name contains the folder / or later string of the URL.
function myFunction(){
var myFolder=DriveApp.getFolderById('folder ID name'); // Get folder
Logger.log (myFolder.getName());
}
There are various possible causes, so I think it would be better to start by separating the causes.
© 2024 OneMinuteCode. All rights reserved.