Relative Content

Tag Archive for google-apps-scriptgoogle-drive-api

DriveApp.getFolderById returns null

I’m trying to access the files within my Google Drive folder. I have the folder ID and using the following lines of code, but the folder returned is empty

Try-Catch not working as expected with Drive Service

I have a Google App Script with this try-catch below. The script is return a 302 html stating “<!– GSE Default Error –><H1>Moved Temporarily</H1>The document has moved.” How can I fix my code to catch the error. The issue is that someone else owns the file and I cannot delete it so, it is getting “Moved Temporarily.”