Question

Can anybody suggest an alternative approach ... ? (involves Google Sheets spreadsheet)

  • 14 February 2021
  • 3 replies
  • 76 views

Hi everybody,

 

I am pretty new to zapier and just figuring out how things can best be done …

 

I have a zap set up that successfully captures and sends 5 pieces of data from my website when a user enters their email address there in a special popup. The zap sends this data to a Google Sheets sheet.  (via instant webhook). The data arrives in GS almost as soon as it is entered on the website.

 

When this data lands in the GS sheet, I then wanted a script to immediately run that uses these 5 pieces of data to look up 3 more pieces of data from another GS sheet, and update the spreadsheet row with these 3 new pieces of data. (So I now have a row in GS sheets with 8 pieces of data in it).

 

I then have another zap set up that, as soon as those 3 new pieces are data are added to the spreadsheet row, the zap fires and sends all 8 pieces of data off to Mailchimp, which then automatically sends an email to the email address that was entered on the website.  Again, this zap is triggered instantly as soon as the row is updated. That’s all great.

 

My problem is the bit the middle: getting a Google sheets spreadsheet to fire a script as soon as a new row is created there. I have just learned that, apparently this cannot be done, you can only check every 5 minutes or so if a new row has been added, and then if a new row is found, fire the script.

 

This is too long a delay for somebody waiting to receive an email from our website. Can anybody think of a better solution for what I am trying to achieve? For example, rather than use Google Sheets, is there anywhere else you could recommend I can send the first zap data set off to (i.e. some other application) that would let me do the required processing on the data, before I have the processed data zapped off to Mailchimp? (The processing is fairly simple: just a bit of string manipulation on one of the bits of data, and the looking up and adding of some new pieces of data.

 

Or maybe not bother with an intermediate application at all and somehow use the Javascripting capabilities of Zapier to achieve the middle bit? (maybe as an Action after the data is received from the website, and as a Trigger to inject the processed data into Mailchimp?). Would I be on the right lines with this, or way off the track? (I do code a bit, but don’t know what Zapier JS is capable of).

 

Any thoughts would be greatly appreciated - ! 

 

 

 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @pete 

Try this GSheet search action in the Zap:

 

Else try using GSheet formulas to lookup the desired 3 data points.

 

Look into these formulas...

VLOOKUP: https://support.google.com/docs/answer/3093318?hl=en

ARRAYFORMULA: https://support.google.com/docs/answer/3093275?hl=en

or

QUERY: https://support.google.com/docs/answer/3093343?hl=en

 

Userlevel 7
Badge +11

Hi @pete!

You mentioned that you’re sending the data to Google Sheets via an instant webhook. Have you considered using Webhooks by Zapier as the trigger, with the Catch Hook option? That would trigger instantly. You could add things to Google Sheets, look up the other sheet (maybe add a short delay step, like 1 minute, between the Google Sheets steps to make sure they happen in the correct order) AND send it to MailChimp in the same Zap. 

Just a thought that came to mind :)

Userlevel 7
Badge +14

Hi @pete 

Were you able to get this squared away based on the previous suggestions?

Please let us know, thanks.