First up, absolutely love GAMADV, only wish I had occasion to use it more often. And this community (plus the web in general) is an amazing source for tips, tricks and all round general assistance.<3
Now to my situation. I'm using "gam create teamdrive" to create multiple Shared Drives, referencing a Google Sheet for Drive names (amazing feature). Once the Shared Drives have been created, there are multiple folders that need to be "created within" as a standard folder structure. I'm using the following command:
gam csv gsheet user <username> 1234......XYZ 'Shared drives' gam create teamdrive '~topLevelName'
"1234......XYZ" is the ID of the gSheet being used to hold the names of the required Shared Drives
'Shared drives' is the name of the actual tab that holds the names of the required Drives
topLevelName is column that lists the names of the required Drives
All good so far, the Shared Drives are created without issue. Now, in order to create folders within these Shared Drives, I need to obtain the Drive ID of the newly created Shared drives. If I allow the command to output to the console, I get the following information:
User: <username>, Shared Drive ID: ZYXW.....4321, Created
which is fine if I'm creating just one Shared Drive. If I'm creating multiple Shared Drives at once however, it's not easy to match up Shared Drive "names" (as requested) with Shared Drive IDs.
If I use "csv todrive" at the end of the command, as has been mentioned in a previous thread the output is generated as one sheet per new Shared Drive, but it's in the format
User,name,id which is what I'm looking for. This is totally workable if it's a just one or a handful of Shared Drives being created, but incredibly tedious to obtain the ID of each new Shared Drive if more than 10 are being created, and impossible if we're talking 100's.
A couple of asks....
1. is it possible to standardise the output to the console so that the Drive name is also included? eg User: <username>, Name: <Shared Drive name> Shared Drive ID: ZYXW.....4321, Created
then it would be possible to copy-paste mulitple lines to Sheets and manipulate the output for the next stage of creating the subfolders within the newly created Shared Drives
2. is there any way to string some commands together so that the required output can be obtained via uploading to a single Sheet rather than once Sheet per "create teamdrive" command?
I'm still getting to grips with chaining GAM commands, but was thinking maybe something along the lines of using the console output to then generate more commands, eg gam config csv_output_row_filter "name:regex:
^<Text to Search>.*<Text to Search>" print teamdrives todrive fields id,name
Any suggestions/recommendations massively welcome
Mark