Check if record that has triggered automation still exists in conditional actions?
I use a lot of linked records.
Occasionally I have an issue where a [Record from table A]is deleted (by a user or automation with script) which triggers the deletion of a [Record from table B]it is linked to (by a user or an automation).
Because changes to from "Record from table A]look up fields in Table Btrigger other automations, these automations start running beforeRecord from table Bis deleted. However Record from Table B has finished deleting before the other automations have finished.
This isn’t really a major issue, but it is an alert in airtable and my emails that I need to check to make sure something else isn’t going wrong.
Is there a clever way I can simply check if the record still exists as a conditional action in running the automation? I realise this could be resolved by redesigning other automations, but that will require redesigning several dozen.
Page 1 / 1
The only way that you can check if a record still exists in the middle of an automation is to perform a “Find Records” action to search for that particular record.
The “Find Records” action will return a length. If the Length is 0, it means that no records were found.
However, note that Airtable will only let you perform one set of conditional actions per automation.
If you need to perform multiple sets of conditional actions per automation, you would either need to: a) figure out a way to trigger a different automation (like setting a value in a field that triggers another automation), or b) you can turn to a tool like Make’s advanced automations for Airtable, which lets you create unlimited conditional paths per automations.
Hmm, so this issue occurs when the record trigger is watching for a set field to be updated. Given that airtable’s “now” function only updates every 5 minutes (or maybe 15? Can’t quite remember), I don’t think there is a simple way to find the most recently updated record (i.e. the record that is triggering the automation)?
Sorry, I’m not sure I understand your question.
So, “find records” can only search by conditions (or a view) - it cannot “find” the record that triggered the automation.
The triggers of these automations are “When a record is updated,” watching specific fields.
Is there a way to use the “find records” action to only pull the record that has triggered the automation?
Background (and where I think I confused you):
After reading your suggestion, I tried to set something up like this. I added “Last modified” field for the field the automation watches for updates from. I then made a “datetimediff” formula, comparing “last modified” to “now()” in attempt to isolate the most recent record.
However, “now()” isn’t a live time field. It updates every 5 minutes. Therefore, this doesn’t let me isolate the most recently modified record using the “datetimediff” (it would need to keep a seconds timer).
Therefore the idea I had to isolate the most recent record doesn’t work.
Yes, you can find the record that triggered the automation.
Additionally, you can always pull in the field values from the triggering record as well.
But I think what you’re missing is the tiny little gear icon all the way to the right of your conditions, which lets you setup a dynamic find action.
Check out my screenshot below for where you can find this.
Ah! Total brain blank, thank you this should work! I’m not 100% of the sequence of actions that leads to this issue (its a less than once per week thing), but hopefully this resolves it :)