Best answer

Lookup Row in Google Sheets and either create new row (if entry doesn't exist) or update existing row with new data.

  • 15 December 2020
  • 5 replies
  • 1659 views

Userlevel 2

HI there, I am having difficulty setting up my desired workflow, or at least understanding how to get Zapier to do what I want.

The desired workflow is: When a form is submitted on Gravity forms on our website (i.e when a reccouring donation is set up) I want Zapier to check a google sheet to see if that person has already done this in the past. If not, then it should add a new row to the bottom of the sheet with their details, including monthly donation amount. If they HAVE done this process before (often happens if someone chooses to raise or lower their monthly amount) - then I want Zapier to find the person and update the “donation amount” column for them with the amount submitted in the Gravity Form.

So far, I am confident in what I have set up under the “Find or Create Row in Google Sheets” action as the initial step after bringing in the data from Gravity Forms.

Next I have added an action of “Update Spreadsheet Row in Google Sheets” but have got stuck on trying to work out what I should put in the “Row” box.

Under it the description reads: “If you want to update the same row each time select a row from the dropdown box. To dynamically update the row, click open the dropdown and choose the "Custom" tab, then the "Add a search step" button.”

So, I do want to dynamically update the row, but am A) wondering if I really need to add a search step, can I not just use the existing “lookup” step that is already there; and B) what is the “value” that I should choose? Do I choose the “first name” row? That should then search for any row that has the submitted name from gravity forms, right? But what if there are two people with the same first name or last name? Would it work if I add two columns of data into the “row box”? Or do I need to merge them into one “full name” box?

I hppe this is all clear enough,
Thanks in advance for any and all support.

Kind regards,
Jake

icon

Best answer by Ecovillage.org 15 December 2020, 17:46

View original

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

5 replies

Userlevel 2

Okay, short update.

I went ahead and merged the first name and last name columns into one, set up the “replace” row to use the existing “lookup” actions search for the new “name” column to search for the row with the entries name and filled out the area below with the data to be used for the update, and then I get an error message saying “There was an error writing to your Google sheet.”

 

I don’t get why the previous step can update the spreadsheet but this one won’t.

Any ideas?

Userlevel 2

Another update: after a walk in the forest I came back fresh and work it out! I was being silly and choosing the wrong thing. 

I get it now that in the “lookup” step it notes down the id/number of the “row” that was found - so if I choose that (“row”) then it all works!

HELLO, I'm trying to do the same thing and I'm stuck on the row to choose. Were you able to find ? Thanks

 

I don't understand how you found it. you say  “it notes down the id/number of the “row” but I cannot select the id / number in the "lookup" step.

I added the update step. It offers me to update the line number while I want the update to be done dynamically.

 

thank you for your answers

Userlevel 7
Badge +12

Hi @PICARD-DEYME 

If you use the row ID from the Lookup step then each time the Zap runs it will get the ID for the relevant Row and pass it to the next step. In other words, if you use the output of the Lookup step then it will dynamically pass the correct row. I hope that helps!