Hey Guys,
I’m looking for a (simple) automation that automatically deletes all empty records.
My Airtable is being feeded with empty records due to a dirty API.
So I need to run a script automation on schedule to clean up these blank records…
I have zero experience writing scripts. I tried to use some older script from the airtable community but it does not have the most up to date syntax i guess – because it’s full of errors.
Hey Kuovonne,
I found something that works.
For code-dyslexics like me – here is something that works using a View and deleting anything in that view based on a trigger,
let table = base.getTable("User Register");
let view = table.getView("Empty Records");
let query = await view.selectRecordsAsync();
let recordId = query.records[0].id;
await table.deleteRecordAsync(recordId);
console.log("Deleted a record!");
All you need to do is setting up a filter in a separate view that is like: Show all records that are Empty in “field X” or do “not contain” @ in “Email-Field”