Clear (delete records) table every morning

Topic Labels: Automations
2479 6
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

Just getting back into airtable…is it possible to clear (delete all records in a table) every morning? In a perfect world this would be automated at/for a certain time. Seeing scripting and/or automations could be an option, yes?
Full disclosure, an automated scenario from integromat populates the table once a day.
Thank you for your time and effort!

6 Replies 6

Use Integromat’s “Delete A Record” Airtable module:

Does Integromat delete records one at a time, and does each deleted record count against the quota?

If so, using an Airtable Scripting automation to delete all of the records in the table might help. A single run of an automation script could delete up to 1250 records.

Yes and yes.

@Anthony_Rizzi mentioned that he was already using Integromat, but it is a great point to mention that each deletion will count towards the monthly quota.

Can you share this script?

Sorry, I don’t have this script because I haven’t had a reason to write it yet. I’ve written scripts that delete multiple records automatically, and app scripts that can delete all the records in a table at the click of a button. However, so far no-one has hired me to write a script to delete thousands of records at a time in an automation.

I came up with the 1250 number because you can delete up to 50 records per batch, and you can have up to 25 batches in an action. The script would also take a bit of finessing because you can only submit 15 requests per second. To achieve maximum record deletion, the script would need to find a way of dealing with the rate limiting without using setTimeout (which is unavailable in automation scripts). Thus, in practice, it might be difficult to reliably delete the full 1250 records in a single action script. On the other hand, deleting 750 in a single action shouldn’t cause rate limit problem, and with up to 25 actions in a single automation, deleting up to 18,750 records with a single automation run might be possible.

I have a hard time picturing an Airtable base that needs to automatically delete more than 18,000+ records per day.

Eta. I just check the documentation, either they upped the number of mutations per script to 50 instead of 25, or I am remembering incorrectly.

Hi Kuovonne,

Is it possible to share the app script that can delete all records in a table at a click of a button ?

I am designing an AirTable Base that can models decisions by creating records in a specific table. If we want to restart the modelling, we have to delete the previous one, i.e. all the records in the modelling table. I would like to be able to do this with a simple button.

Thanks in advance !

Welcome to the Airtable community!