Folder getParents fails to get Team Drive name in Google Script
I'm trying to build up the full path to a document in a team drive using a script. The code looks like this: var path = [ ] var folder = id.getParents() while (folder && folder.hasNext()) { var f = folder.next() path.unshift(f.getName()) folder = f.getParents() } This script is bound to a document for testing. But when I get to the root, instead of returning the actual name of the Team Drive, such as "Accounting" or "Marketing" it instead returns "Team Drive". I need to know the actual name of the Team Drive, why am I not getting this info? If I run this in a script bound to a document in My