Skip to main content

Automatically delete record after one year

  • August 13, 2021
  • 1 reply
  • 35 views

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

Justin_Barrett
Forum|alt.badge.img+21
  • Inspiring
  • 4647 replies
  • August 14, 2021

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.

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

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