This script allows you to create a folder structure in a Shared Drive. You can also import an existing folder structure.
Very useful if you want the same structure on multiple Shared Drives.
The Google Drive API must be enabled. However, this should be included when you copy the document. So start by copying the document the script is linked to.
The Google Sheets document should only have one worksheet named after the shared drive ID. You can find this ID by opening the shared drive in your browser in Drive. You will see it in the URL (address bar) and can therefore copy it from there to name the sheet.
Now you will look for the "Folder Manager Menu" at the top of the document. There you will select "Import Folder Structure". The first time the script will need to authenticate and you will then select your Google Workspace account to do so. The script will then list all existing folders for the sheet. If you are starting from scratch with a blank sheet and want to structure the sheet, it makes more sense to send your new structure to the shared drive: Then select "Push Folder Changes".