Hello!
I have an automation set up that when a record enters a view, a script is run to delete the record. Almost every time it runs it throws some failure notices and I get multiple notifications from Airtable. But, it seems to work though. All records are deleted from the view when it runs. Usually there are only 20ish records that enter the view at a single time. And if I watch the view the records will disappear usually in under 10 seconds. Yet, I still receive the failure notices.
Here is the script.
//Identify the table you'd like to delete records from
let table = base.getTable("🗹 Checklists");
console.log(table)
//Identify the view you'd like to delete records from
let view = table.getView("⚙️🅰️ Delete Records View");
console.log(view)
//Select the records that you wish to delete
let recordQuery = await view.selectRecordsAsync();
let recordsToDelete = recordQuery.records;
console.log(recordQuery.records)
//Delete records
for (let deleteRecord of recordsToDelete){
await table.deleteRecordAsync(deleteRecord.id);
}
Here is an example error message.
Any ideas on this would be greatly appreciated!