Best answer

Clearing Google Sheet rows after 21 days

  • 23 October 2020
  • 3 replies
  • 697 views

Userlevel 1

Hello everyone,

What I try to achieve

I ran into a little conception thinking issue here with what I try to achieve. I want all reccord more than 21 days old to be remove from a Google Sheet. For that, I have a date column I can use. 

First I though, ok let’s use a trigger on “new row” and then wait 21 days and then delete the row.

The issue

Issue is, meanwhile, maybe some manual operation have been made and the row number isn’t the same anymore. So I can’t be sure that my 21 days old rowID is still representing the correct row I need to delete.

Some thoughts

I thought I could use a daily trigger, then search for all reccord for who date value is 21 days old and then delete them, but I may have 50 rows to process (or more) and I think the search can’t return that amount of rows. Moreover, I don’t see how to then iterate over each rows and delete them.

 

I could use some zapier wisdom here 😃 

 

icon

Best answer by Troy Tessalone 23 October 2020, 16:54

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Add new column to the GSheets that does a formula calculation to determine if the Date is +/- 21 days.

If under 21 days, then FALSE, if over 21 days then TRUE.

Zap Trigger: GSheets - New/Updated Row (filter by new column = TRUE)

Userlevel 1

That’s brilliant. So simple and elegant. How over-engineering all of this I was.

Userlevel 1

Any way we can delete rows and not just clear them?