Creating directory in Google Drive from Webhook

I have a webhook coming from CSVBox.io that could contain hundreds of rows. However, the custom_fields > user_id value will be the same for every row. Here is the sample of what the data looks like from the webhook:

My plan is create a directory in Google Drive titled with the value of user_id, and then create a Google Sheet from a template in that new directory. Right now, I am having a Google Drive directory created for every row that is being sent by CSVBox.

How do I create just one directory? Once I have that part figured out, I will be able to create the Google Sheet in that directory and iterate through the rows, adding the values to the newly made Sheet.

You need to save each coming entry in Google sheet as it’s a “Master Google sheet” and then use the search module to check if you have an entry with User Id in the master sheet. If the entry already exists then do processing with the existing entry or directory

If the entry doesn’t exist then create a new entry and save new directory ID to process later on.

I did this for one of my client as he get leads in webhook and wanted to save them on basis of pincode

Princy Jain
Follow up Automated

2 Likes