Airtable Automation to Delete Records

For: Airtable
Written by: Dan Leeman

Automatically delete associated tasks after a project has been cancelled with this easy-to-use Airtable Script.

Want to delete records in bulk inside of Airtable?

In the video we create a quick automation to find records (by whatever criteria makes sense to you) and then we feed those records to a Script action which handles the actual deletion of the records.

When you add the scripting action, you'll need to pass a list of your recordIds (from the Find Records step) to your script via the Input Variables.

Input Variables for Airtable Script

Now you can copy and paste the code into the script editor.

delete.js
const table = base.getTable('NAME OF YOUR TABLE');
const recordsToDelete = input.config().recordIds;
table.deleteRecordsAsync(recordsToDelete);

Make sure to leave the quotes, but insert the name of the table you are using.