CSV to JSON aggregation for Google Sheets

I needed this, went searching and found nothing satisfying, then discovered a good solution.

I’m webhooking in a CSV file with event registration data and need to convert each row to a separate collection inside of a JSON to send off to an API for some conversion and reformatting.

In my case, I’m taking the CSV and getting the file using HTTP and renaming/uploading/converting to Google Sheets (the first 3 modules).

This allows me to work with the file using Google Sheets modules.

From there, I’m using the Search Rows function in Google Sheets, using the fileid and name (for the sheet name) from the Google Drive upload.

This gives me each of the rows as a separate collection.

From there, aggregate to JSON using whatever your required custom data structure is.

In the future, if you add additional columns, the only thing you’ll have to update is your custom data structure in the aggregate to JSON module.