Help

Re: Automatically delete record after one year

389 0
cancel
Showing results for 
Search instead for 
Did you mean: 
DerekPotter
4 - Data Explorer
4 - Data Explorer

Hello! I am trying to set up records to expire (and be deleted) one year after being created. How can I do this? I do have Zapier, if needed. Thank you!

1 Reply 1

Welcome to the community, @DerekPotter! :grinning_face_with_big_eyes: This can be done natively inside of Airtable, but it will require a Pro account because the only way to non-manually remove records is with a script.

Add a “Created time” field to your table. Create an automation that uses the “When record matches conditions” trigger, with the condition being that this created time field’s date is on or before 365 days ago (it’d be nice if there was a “years” option but sadly there isn’t).

Add a “Run script” action. You’ll need to configure an input variable to pass the record ID of the triggering record.

Screen Shot 2021-08-13 at 11.48.04 PM

With that, your script only needs to be one line (after replacing “TABLE NAME” appropriately):

await base.getTable("TABLE NAME").deleteRecordAsync(input.config().recordId)