Save in google sheet

Hey everyone,

Quick question: I’m using n8n to pull monthly signup metrics from my personal API into a Google Sheet. To keep things stable, the API only returns the last three months of data. That’s fine—until a fourth month arrives. At that point, my workflow clears the sheet and writes the newest quarter, which means older months disappear. For example, when June came in, my February row vanished and never came back.

What I’d love is a way to “freeze” each month’s row so it stays in the sheet forever one the month is finished. Ideally, n8n would check if a row for, say, May already exists—if yes, update it; if not, append it. That way I get a full year of data instead of a sliding three-month window.

Right now I have a trigger node that calls the API, then a “Clear Sheet” node and a “Write Rows” node. I suspect deleting the whole sheet is overkill. Is there a better approach—something like “Find or Create Row” based on the month, then only update or append? Has anyone solved this before?

Thanks for any pointers!

can you share some example data rows?

Hi @Theo3, you don’t need the Clear sheet operation. You have to choose the ‘Append or Update’ operation. Then select the Column to Match for the update. If the value exists, the row will be updated; otherwise, the row will be appended.

1 Like

It was as easy as this, thank you so much !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.