How to Parse CSV from Google Drive?

Hi all

i try to read a csv file.

Here the scenario:

  1. Someone uploads a CSV File to Google Drive folder
  2. My Make scenario watch for new files and triggers if a new file is uploaded
  3. I download the file csv file
  4. I want to parse the CSV and get Column 4,5,6 and so on as data for building filters for the next step

Here is the scenario:

From the “Download File” Google Drive Module I get the Binary Data:

When I parse the Data, I use the data Variable and the “toString” function:

Then I got this error:

I found some Threads here for simliar errors, but nothing helped here.

For any reason, the uploaded csv seems to be some kind of xml, when i fetch it from google.

Any Idea?

Thank you much

Got it. The following worked:

I added a HTTP Get File

And then in Parse CSV Module:

2 Likes

There is an encoding issue when downloading certain files especially from Google Drive.

I have mentioned more details, and a possible workaround for this here: Read text in .txt file stored in google drive - #4 by samliew

You can try using a “Convert encoding” module using the same input and output encoding, then you can use the output of this module in a subsequent module (like Parse CSV or JSON).

Alternatively, you can simply try using the toString built-in function in the mapped field, something like this:  toString(data)  – however this method doesn’t work in some cases where the encoding actually has to be converted.

3 Likes