GUIDE: How to DELETE an Airtable Record with via API or with JavaScript
Tips and Inspiration contributed by: Troy Tessalone - Automation Ace
UPDATES
Even easier now with these Airtable Actions (Authentication and Headers handled automatically):
- API Request
- Custom Action


API
Here’s how to use it in a Zap with the Webhooks app: https://zapier.com/apps/webhook/help
NOTE: Make sure to add the Authorization header with your API Key.
NOTE: Make sure to replace these values in the URL including the encased brackets []
- BASE_ID
- TABLE_ID
- RECORD_ID
- This should a dynamically mapped variable from a previous step


JavaScript
Here’s the JavaScript Code for using in a Run Script action of an Airtable Automation: https://support.airtable.com/hc/en-us/articles/360051792333-Run-a-script-Action-
INPUTS
- Table
- The Name or ID of the Table
- RecordID
- The variable for the ID of the Record
let config = input.config();
let Table = config.Table;
let RecordID = config.RecordID; // Record ID
// Delete a record in the Data table
let table = base.getTable(Table);
await table.deleteRecordAsync(RecordID);