Hi @Ruriko this is quite tricky in n8n and I think Google Sheets might not be the best database if you need to delete rows automatically. You’d essentially need to get the index for each row and can then build something like below to do the job. I am using the $position expression here to get the index:
This assumes your data starts in the second row like so:
If not you’d need to adjust the “Start Index” expression of the Delete row node in the above example accordingly.
It’s also important to only run this for a single row only (that’s what the Keep 1 node does in the example) as after each run the ID of each row would change, so this example would need to be executed multiple times.
If you don’t necessarily require Google Sheets, you could for example take a look at a database like Baserow instead. Fetching rows from Baserow gives you a unique ID for reach row which will make the deletion of data much easier (it also allows searching for data older than 14 days without having to use the IF node):