I could follow Wesley Chun to upload local csv file to a Team Drive alright as described in Managing Team Drives with Python and the Google Drive API, but it's not easy to append a csv file to a Google Sheet spreadsheet when both the csv file and the Google Sheet spreadsheet are in the same Team Drive. DriveApp.searchFiles()
, getBlob().getDataAsString()
and Utilities.parseCsv()
work perfectly and get the job done in My Drive, but not in a Team Drive.
The challenge is to upload a local csv file to a Team Drive regularly; append the uploaded csv file to a Google Sheet spreadsheet in the same Team Drive. I got stuck at the second part. Do you have any clue?