Delete Empty Records on automation

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.

Greets from Germany
Pascal

Welcome to the Airtable community!

Can you link to the script that you are trying to use?

Do you want …

  • a link to a free script (if one exists)
  • someone to write the script for free (if someone is willing)
  • help learning to write the script yourself
  • to pay for someone to write a script

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”

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.