DriveApp.getFolderByID doesn't work after linking GAS to a Google Cloud Platform Project

86 views
Skip to first unread message

Matt McDonald

unread,
Jun 8, 2020, 2:45:57 PM6/8/20
to Google Apps Script Community
I have a script that has been working for a while now, and within it, it calls DriveApp.getFolderById({folderID}). I wanted to add better logging to my script, so I connected it to a Cloud Platform Project through the UI: 



After I set this script to be connected to a new project, I now receive this error every time I call the script on the line that calls DriveApp.getFolderById({folderID}): 



Any idea how I can fix this without setting up a whole new script?

Alan Wells

unread,
Jun 8, 2020, 3:10:05 PM6/8/20
to Google Apps Script Community
I'd enable the Google Drive API.
APIs and Services Dashboard
Enable APIS and Service
Search Drive
Enable it

Matt McDonald

unread,
Jun 8, 2020, 3:37:32 PM6/8/20
to Google Apps Script Community
That worked, thank you!
Reply all
Reply to author
Forward
0 new messages