Help

Re: Get notified when a record is Deleted

875 0
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

You could probably use either Zapier or Integromat for this. The first time this zap/scenario runs, it would list every record in your target table, and store their record IDs in a table in a completely different base. The next time the sync runs, it would first go through that stored list and try to find each record by ID in your target table. Any ID it can’t find would represent a deleted record, and would trigger an email. Once that matching phase is done, it stores any new record IDs for the next sync check.

Aside from simply telling you if a record is deleted, though, there’s not much this system could do. It couldn’t tell you precisely when the record was deleted, or who deleted it. But maybe this bare-bones notification system would be enough for your use case.

ivan_paudice
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks Justin, even a simple notification would be ok for my scenario. But the zapier solutions you mentioned would require a HUGE amount of actions to be performed every time the check is performed (ideally should be every 5 min).
My DB has about 10.000 records. I need something leaner…

@openside can your tool help here?

openside
10 - Mercury
10 - Mercury

Yes, we do handle deletes. But it works a bit different. Instead of deleting via the Airtable ui, you would create a checkbox called something like “Mark for Deletion”. And then when that box is checked our product will pick up that record and automatically delete that record and provide the record info to be used in your zap. There are other ways to do it besides a checkbox but that is easiest.

Https://openside.com/product/on2air-actions

ivan_paudice
5 - Automation Enthusiast
5 - Automation Enthusiast

thanks man. I read your link already, but I have got a completely different use case.

Thanks to Airtable (hard to believe) unrestricted access policy and lack of even basic data access control, anyone in my base can delete anything he pleases.

Now… I need to prevent users from deleting records without anyone noticing. I understand there is a trash, and I can restore records, but if I never get notified that someone deletes the record… how can I react to it?

openside
10 - Mercury
10 - Mercury

To restrict access, you’d have to give just readonly access to those users and allow them to interact with the data via forms instead of directly within Airtable.

Until they improve permissions that is the standard approach

ivan_paudice
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks, Openside,

Looks like I’m stuck with no solution then.
My users need to edit bases and manipulate data, I just need to protect my flow from someone accidentally deleting a record.

Thanks a lot. I’m an avid openside user btw.
Your zaps are saving me tons of work! Keep up with the good work.

Hi Ivan. Did you ever find a workaround for this? I have exactly the same problem as you. Thanks!

Amber_O_Neill
4 - Data Explorer
4 - Data Explorer

Hi, checking in on this one! Did anyone find a workaround?

Could you please give me which tools I should use to make this scenario happen. Thanks.

@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.