Forum Discussion

skodali's avatar
skodali
New Contributor III
6 years ago
Solved

Read/download files from Google Drive

I’m trying to read/download a CSV file from google drive. I’m able to get the web content link but unable to download the file using it. Can anyone suggest how to download a file using the REST Get?

  • It looks like it is returning CSV data, you need to change the “Response Entity Type” to TEXT or BINARY.
    It is trying to interpret the result as JSON or XML…

8 Replies

  • cstewart's avatar
    cstewart
    Former Employee

    Any reason yopu are using REST Get? If you have an HTTP URI, then why not use the File Reader with the URI, which then feeds into the CSV parser?

  • skodali's avatar
    skodali
    New Contributor III

    I have tried using a File Reader snap, it didn’t work.Don’t we need to pass authentication to download the file from a google drive?
    If I try to open URI in a new tab it is asking for the gmail credentials. If I logged in then the file is downloading. I can’t provide any credentials if I use file reader.

    • cstewart's avatar
      cstewart
      Former Employee

      Google Docs is not the same as Google Storage. We support Google Storage in the binary snaps using the gs:// protocol. For Google Docs/Spreadsheet etc, they are made for web interaction, and not direct access to the data. Which are you attempting to use?
      (It is a subtlety, so a pedantic approach is required)
      Thanks.

      • skodali's avatar
        skodali
        New Contributor III

        Trying to Read data from a CSV file uploaded into a Google Drive.

  • cstewart's avatar
    cstewart
    Former Employee

    It looks like it is returning CSV data, you need to change the “Response Entity Type” to TEXT or BINARY.
    It is trying to interpret the result as JSON or XML…