Google Sheets Update Row or Add New Row if Doesn't Exist

I know this sounds simple and it’s really easy in Zapier, but I’m having trouble figuring out how to do it in Make.

I have a scenario that adds records to a Data Store that has a unique id/key for each row and what I’m wanting is for when a record is added to the data store, it triggers the scenario to search a google sheet for a row with that key and update it if it exists, otherwise, add a new row for that key in the google sheet. Can anyone help guide me? I’m pretty new to Make.

Hi Serena, this isn’t super easy but here’s some guidance.

Before you iterate the data you are adding to the Data store - Search your Google sheet and use an array aggregator to combine it all into 1 ‘bundle’. In your aggregator select the column from the sheet that holds the key and the row number. This will aggregate only the fields we are concerned with.

Now after you add the record to the Data store, add a router, now in 1 route setup a condition like this:


Replace the ‘0’ with the column from the Google sheet, you can hover over the field to see what this should be (raw value). Also, replace the ‘uniqueId’ with the current key that you are checking the sheet for.

Now in our Update module we get the row number with this IML, again replace the 0 with the column of you key, and replace ‘uniqueId’ with the current key from your iteration (the dynamic value):

Now add another route for where you will add a row, with a filter something like this:

You will end up with a scenario that looks something like this:


Note that this doesn’t include how you iterate the initial data to add to the Data Store.

2 Likes