Read and Write file from Google Drive

Hi,

I'm trying to read and write Excel files from Google Drive inside the workflow that I'm buiding. I have been reading several posts but still don't get any clues. Can somebody help me?  

 

Thanks in advance.

Hi,

Have you looked at this workflow: https://www.knime.com/nodeguide/data-access/common-type-files/google-sheet-meets-excel ? It should get you going.

best,

Gabriel

Hi,

I have already looked at that workflow, the thing is that the Google Sheets connectors only work with Google Sheets files and not with Excel files (.xlsx) stored in Google Drive, which are the ones that I am trying to read.

1 Like

Hi, @bromera
Take a look at this forum post, on how you can convert your xlsx sheets to google sheets and read them using the Google Sheets conector:

1 Like

Hi, I’m sorry to bump this conversation up, but in my case I need to download a file from Google Drive but I cannot convert it to Google Sheets, since it is not compliant for the customer.
In console.developers I added the Drive Api and the authorizations needed (at least I think so).

I modified the workflow so that after finding the file I’m interested to I do a GET request to download the file. this is the request: https://www.googleapis.com/drive/v3/files/1RWXcr2h1qJ4j74s55Gxo2-cN2lI_rRV9?alt=media&access_token=
The file is publicly accessible, but however I get a 403 error:
The user has not granted the app xxxx read access to the file yyyy."

My workflow follows this solution here: Google sheets Reader node read automatically a google spreadsheet file from Google Drive?

Does someone have an idea of what I’m missing? Is the workflow suggested the correct one to work with?
thanks

Solved, my problem was the SCOPE, it was still drive.metadata.readonly, once changed it works, so that it read an XLS file from drive without passing through Google Sheets

2 Likes