Skip to main content

Ok, So even after searching, I cant seem to find a same problem as mine. (possibly my search skills, so sorry if this answer exists)

The scenario is as follows: 

I have a trigger (saving data) that will then write a row with several fields to a google sheet. Then, same trigger, writes another row and so on. 

However, if a specific field changes, then we need to start a new sheet, and use that until the field changes, then the same again, start a new sheet. 

Basically, we are creating “batches” in one sheet, that will be used elsewhere later. 

 

So, how do I change the path in the zap to the new sheet each time? 

Hi @Jussi S!

Hmm, this is a tricky one, but I think it’s technically possible. As I understand it, you have two main challenges:

  1. You need the Zap to recognize the previous row and compare it to the new row, then take a different path based on the whether or not they are the same
  2. If the values are different, you need to create a new sheet and then create rows in the new sheet

Have I got that right?

For the first one, you can do that using a Lookup Spreadsheet Row step and a Path. Use the Lookup Spreadsheet Row to search the relevant column and for the search value, use the field that will be going into it (ie the data for the new row). There’s a field in the output of the step called ‘Zap data is found:’, if the information from the trigger matches a cell currently in the column, that will say ‘True’ and if there are no matching values, that will say ‘False’. Then add your Paths to the Zap, one Zap should continue if the data was found (and go on to add the row as usual) the other path should continue if the data found is ‘False’ (ie the new data doesn’t match the existing data) then create a new sheet and add the row two it. 

 

The second point is trickier because it involves a workaround. You would need to create the sheet in one step and then use the ID of that sheet to tell Zapier which Google Sheet to add the new row to, which currently involves a workaround. There’s a description of the workaround in this post: 

 

I recommend testing that workaround first as it isn’t always reliable, I’m sorry about that!

 

I think that solves the main points of what you’re trying to do - what do you think, can you get your Zap up and running with that?