Import File from Google drive, convert to a string from binary, and check Airtable to see if record exists

I want to set up an automation that will watch my google drive for a csv file, then send it to the csv module, convert it to a string, and then check my airtable for a matching record by the ticket ID field. If the file exists, I want to update the 7 fields included in the file. If the ticket ID does not exist, I want it to create a new record. I saw a good demo of this, but cannot make mine work. Here is what I did in make.

  1. Set up my Google Drive connection.
  2. Added Google Drive Watch Files in a folder module. I set it to watch files by created time, and selected the correct folder to watch on my google drive.
  3. Added csv module and set to 7 columns. I answered yes to CSV contains headers. Selected Comma as my delimiter. No to Preserve quotes inside unquoted field. In the CSV field I know I want to use the toString function, but do not know the proper way to set this up. toString(what do I call the data from my google file?).
    This is where it seems to break. The CSV parse does not parse or convert to a string. I tried {{toString(15.data)}}. When I run the automation up to this point I get the following:

Here is the configuration part for the google drive module:

Any assistance would be greatly appreciated.

When asking your question, please include:

:footprints: The steps you have taken
:camera_flash: Relevant screenshots
:link: Any links you have
[ Code { "and": "JSON", "in" : "code block"} ]
:x: Exclude Personal Information.

Hi @Pat_Baker,

After the Watch Module, Use download a file module and then do the toString(although not necessary) in CSV module.

2 Likes

Data seems to be coming in as binary. My issue in setting up the toString() is I don’t know what to put in the brackets. I want all of the data to be converted to a string, but not sure how to reference that.

You can pass the data, something like this.


Screenshot from 2023-07-26 00-05-34

2 Likes

This is how I set up the Set Variable module.

Output bundle is still empty.