How to add to my Google Sheet only data that doesn't exist

Hi Guys, would like to add to my Google Sheet only the new rows (that it doesn’t find into my Google Sheets); I tried the merge node with “Remove Key Matches”, but I have all the datas returned (I put 3 rows in my Google Sheet for the test and some ID that I know I get from the HTTP request). Do you have any idea on how to solve this ? Thanks !


Hey @jeremy_FRANCOIS!

Welcome to the community :sparkling_heart:

Is the data from the HTTP Request node and the Google Sheet node exactly the same? I would check for any whitespace that can cause the result.

Another approach for this is to use use the Lookup operation in the Google Sheets node. You can add an IF node after this Google Sheets node and check if the incoming data is empty or not. Based on the output, you can proceed with the workflow. Here’s a small workflow. If you check the Settings tab in the Google Sheets node, you will notice that I’ve switched the Always Output Data to true. This will return an empty object and keep your workflow running.

Hope this helps :slight_smile:

Thanks Harshil, I will have a look !

1 Like

Hi @harshil1712 , is that normal that I don’t get any data for the true output ? (I see 10 items and my goal is to add them to the sheet)

And I checked my ID for the merge node but I don’t have any whitespace but with the lookup it works (compare if the ID exists or not). :slight_smile:

It works finally ! I had to put “id” into the merge as a string and not use the json id (from the output data). Thanks !!Screenshot 2021-08-26 at 19.02.27

1 Like

Awesome! I am glad that you found the solution. I don’t know how I missed it :sweat_smile:

Anyways, have fun :slight_smile:

1 Like