Skip to content

Instantly share code, notes, and snippets.

@BinnyChanchal
Created February 11, 2020 13:19
Show Gist options
  • Save BinnyChanchal/161d3c5b9cb44187a2a174aecf0b86d1 to your computer and use it in GitHub Desktop.
Save BinnyChanchal/161d3c5b9cb44187a2a174aecf0b86d1 to your computer and use it in GitHub Desktop.
List files on Google Shared Drive(Team Drive)
function gettigAllTeamDrivesWithId(){
let drives = Drive.Drives.list();
return drives;
}
function gettingAllFilesOfTeamDrive(teamDriveId){
var query = 'mimeType = "application/vnd.google-apps.folder" and trashed=false ';
var param = {
corpora:'teamDrive',
includeTeamDriveItems:true,
supportsTeamDrives:true,
teamDriveId:teamDriveId,
q:query
}
var folders = Drive.Files.list(param);
return folders.items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment