I have a googleform that collects excel file from the users and uploads to drive. As I understand, I should transfer from excel file to spreadsheet to open and get the data.
So I use Drive.Files.insert()
to convert the file, which requires additional approvals for the script.
I enabled the Google Drive API under Resources > Advanced Google Services on google script and linked this google script to a google cloud project.
Google Drive API is also enabled on google cloud with "OAuth 2.0 Client IDs ".
But my script still cannot pass the google login process and only returns a word file with google login page.
the script:
var Blob01 = UrlFetchApp.fetch(thelink).getBlob();
var fileInfo = {
title: "test1",
mimeType: MimeType.GOOGLE_SHEETS,
"parents": [{
'id': FolderId
}],
};
Drive.Files.insert(fileInfo, Blob01, {convert: true});
OAuth settings: Scopes for Google APIs >> ../auth/drive and ../auth/drive.file credentials: OAuth client ID >> Web application google drive api has been enabled and credentials are added as "Google drive api" & "web browser" & "User data"
thanks in advance
thelink
? From these information, I would like to think of the reason of your issue and solution. – Tanaike