I would like to use Google Apps Script to transfer a file from MyDrive to Team Drive. I can do this manually (so I know I have permission) and I enabled the Drive API (so was a
It appears I was overthinking it as the following works:
var file = DriveApp.getFileById(fileId); var parentFolder = DriveApp.getFolderById(TEAM_DRIVE_ID); parentFolder.addFile(file);