Help

Get notified when a record is Deleted

6992 12
cancel
Showing results for 
Search instead for 
Did you mean: 
ivan_paudice
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello all

Is there a way to be notified when someone deletes a record? I mean… not just included in Airtable. I’m ok also with using zapier or other solutions… is there a way ANYWHERE to receive a mail when someone deletes a record?

Thanks in advance

Ivan

12 Replies 12

@JPP_DATABASE The scenario that I described above was purely theoretical. I never built such a setup myself. The concept would probably still work using Zapier or Make (formerly Integromat), but if I were to do something similar today, I would probably build it directly in Airtable using synced tables.

In the primary base, create a view in the desired table that can be synced to another base. I’ll refer to this as the source sync. Make sure that this view has every field visible. It’s also vital that the view has no filters on it, or the setup won’t work.

In another base—I’ll call this the “tracker” base because it’ll be used to track when records are deleted from the primary base—add a table that syncs from the desired table and view in the primary base. I’ll call this the destination sync. When setting up the sync configuration, the default option for dealing with deleted or hidden records from the source is to delete them from the synced table. Change this to leave these records in the table.

In the destination sync table, add a button field, and choose “Open source record” as the action. Next add a {Source URL} formula field, with the name of the button field as the only contents in the formula. This will display the URL pointing to the original record for each of the synced records. However, when a record is deleted from the source table, this URL will disappear.

With this in mind, create a “Deleted records” view in this destination sync table, with a filter that only shows records with an empty {Source URL} field. You can now use this view in an automation using the “When record enters a view” trigger, sending an email or doing any other action that you wish when a record is deleted from the source table.

Because all of the original data is still in the synced record you’ll know exactly which record was deleted, and you’ll have a copy of the original data if you need to restore it. Unfortunately there’s no way to track who deleted the record, but you’ll know the approximate time that the record was deleted (depending on your sync frequency).

Justin this is a great technique.

A few notes for anyone else who may stumble upon this thread:

  • The original data will only be as recent as the last sync, which may not match the values at the time the record was deleted.

  • If a record is created and then deleted quickly before the original record ever makes it to the synced table, the system will have no way of detecting its deletion.

  • If you setup the automation to notify you of the deleted record, you can go to the trash of the original base and probably find the record that was deleted. That will tell you who deleted the record, and you can also restore it (if you want to).

  • Make sure you lock the view and don’t let anyone mess with the filters. Otherwise, you risk having the deleted record automation running like crazy if any records are filtered out.

  • If you want to have a system where some records are deleted on purpose and you don’t want to be notified about those deletions, you may need a two phased approach where you set some values that indicate the record will be deleted, have that info sync, and then actually do the deletion.

Thank you Justin. You just solved what I’m facing.