How to update existing rows and append new ones between two Google Sheets in n8n?

Hi everyone :waving_hand:

I have a Google Sheet that acts as my data source ,it gets updated frequently.
Here’s what I’ve done so far in n8n:

  • I’m using a Google Sheets trigger to watch the source sheet.

  • I normalize the email (trim + lowercase).

  • I skip blank rows using an IF condition.

Now I want to look up the target sheet to check if the new or updated row already exists.
I’m using the Google Sheets → Lookup node, which correctly returns duplicates (existing rows).

But I’m stuck here:
I need the workflow to update the existing rows (duplicates) and append the new ones (non-duplicates).
However, since the Lookup node only returns the matching rows, I can’t seem to separate the duplicates from the new data properly.

What’s the best way to handle this logic in n8n?
Basically, I want:

  • If Email exists → update the row in Target sheet.

  • If Email doesn’t exist → append it as a new row.

Any help or example on how to structure this flow would be awesome :folded_hands: