Not sure if this is your actual code or not. But usually a folder Id is a longer sequence of numbers and letters. What you have there as TBCInv is not a folder Id.
If you go into that folder on google drive, you will find the id in this space:
https://drive.google.com/drive/folders/575957... ?resourcekey=…
the id is after folders/ and before the ?resourcekey=….
Just copy that and paste it into your script.
Disclosure: I did not check the rest of your script to see if it is correct or not.
From: google-apps-sc...@googlegroups.com <google-apps-sc...@googlegroups.com> On Behalf Of Abilayne Liz
Sent: Tuesday, July 11, 2023 8:29 PM
To: Google Apps Script Community <google-apps-sc...@googlegroups.com>
Subject: [Apps-Script] DriveApp.getFolderById Error encountered
Hi all.
Noob question here. I'm getting this error on the getFolderByID. Unsure what's the issue here. I've already modified the name of the folder and removed the underscore or space.
The folder ID is correct.
Thanks in advance for any help
--
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/95496c8e-fb32-4f7e-ab9b-3077384ed42dn%40googlegroups.com.