Dec 27, 2021 12:42 AM
Hi!
We sync Airtable records to our own bases via Airtable API.
The thing is when a record is deleted in Airtable it just vanishes from Airtable API.
To discover deleted records in API we have to iterate all records in both source and destination bases. Then delete records in destination with Airtable Ids that are missing in source.
Is there a way to track deleted records in Airtable to delete them in destination base without a one-by-one comparison?
Thank you.
Dec 27, 2021 03:26 AM
You would need to delete your records in a different way than using Airtable’s built-in delete function. You would need to mark your records for deletion in some way.
For example, you could check a checkbox that indicates that you want to delete a record, or you could set a single-select field that says something like “Delete This Record”.
Then you could use the API to search for those records that you’ve marked, and then use the API to delete the appropriate records from both bases.
I’m not sure how you’re using the API, but you could use Airtable’s built-in automations to (1) run a script as soon as you mark the records for deletion, or (2) search your records on a schedule for marked records, and then run a script.
You can also use an external automation tool like my personal favorite Integromat to either:
These 2 options are the same options as Airtable’s automations, but no scripting required:
Dec 28, 2021 11:25 PM
Scott, thank you for the direction. We’ll try this way.