When a record is deleted is a trigger that starts an automation every time a record in a database app is deleted (the trigger decides when an automation starts, and the filter decides whether it continues). It's meant to help you keep people informed and clean up related data when a record disappears.
You can use this trigger for many things, including:
Emailing the sales manager when someone deletes a deal from your pipeline.
Adding a comment to a related project when a task is deleted.
Note:
A deleted record is gone from the database app. The automation can still use the field values the record had when it was deleted, in the filter and in actions.
Records that are still being created don't count. Discarding a record before it's been created doesn't start the automation.
Test with care. A manual run has real effects.
Who can use the When a record is deleted trigger?
Automations are available on all plans: Free, Plus, and Premium. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.
To create, edit, pause, run, or delete automations, you need to be a
Workspace adminin the workspace the database app belongs to. Only workspace admins see the automations button in a database app.
Set up the When a record is deleted trigger
To set up the trigger:
Open the database app and click the automations icon at the top right (
Create and view automations).Select
New automation.Select
When a record is deletedfrom the list of triggers.Add a filter if the automation should only continue for certain values. Learn more about filters below →
Select
Add actionand choose what should happen.Select
Create automation.
The trigger reads like a sentence: When a record is deleted in {app}. It has no settings of its own, so there's nothing to choose except the database app.
To give the trigger your own name, select its name and type a new one.
Filter the When a record is deleted trigger
The filter decides whether the automation continues after it's been triggered. Under And if the following conditions are met, select Add filter and build a condition: Where {field} {option} {value}. For example, continue only when the Amount of the deleted record is over a limit. Learn more about filters →
Let's look at an example
Let's say you want to know when a deal is deleted from your pipeline. Here's how:
Set the trigger to
When a record is deletedinDeals.Add the filter
WhereStageIsNegotiation.Select
Add action→Send email.Enter the address of your sales manager in
To, for example[email protected].Enter "A deal was deleted" as the
Subject, and write a short message.Select
Create automation.
The next time someone deletes a deal in negotiation, the manager should get the email!
When a record is deleted errors
If the status next to the automation's name shows
Brokenin red, part of the automation doesn't fit the trigger, often an action that needs a current record. The part that doesn't fit is shown in red. While the automation isBroken, it doesn't run and you can't start a manual run. Tape then showsTrigger runs manually not possible because of broken automation.If a run fails, you can see each step and its message in the automation's runs. To see the runs of an automation, click the play button next to
Manual runat the top right of the editor (View all runs), or usecmd/ctrl+1. TheRunspanel lists the runs of the last 30 days. Select a run to see each step and its message. To see the runs of all automations, selectRunsin the sidebar of the Automation Center.Lots of automation activity in a short time can delay automations across your organization. The delay is temporary. Tape checks the load again shortly and runs waiting automations automatically. Learn more about limits and throttling →
Test, pause, edit, or delete an automation with this trigger
Manual runruns the automation on existing records you choose, as if they had been deleted. The records aren't deleted.New automations you create in the editor are
Activeright away. To pause one, selectActivenext to the automation's name. It switches toPaused. Select it again to turn the automation back on.To edit an automation, open the database app, click the automations icon at the top right, then select the automation. Select
Save changeswhen you're done.To delete an automation, open it and click
•••at the top right, then selectDelete. Confirm withDelete. You can also click•••next to the automation in the list of automations, then selectDelete. Deleting can't be undone.To switch to another trigger, hover over the trigger and click
•••to the right of it, then selectTurn intoand choose a trigger. The filter and the actions stay. If an action or a filter condition doesn't fit the new trigger, for exampleUpdate recordafter switching to a schedule, orHas changedafter switching away fromWhen a record is updated, the status next to the automation's name turns red and showsBrokenuntil you change or remove it.
Learn more
FAQs
Can I restore a record from the automation?
Can I restore a record from the automation?
Yes! Add Restore record to an automation with this trigger. It brings the deleted record back right away, and the record shows in the database app again. Learn more about Restore record →
Does this trigger run when another automation deletes a record?
Does this trigger run when another automation deletes a record?
Only if Trigger automations is turned on in the settings of the Delete record action. It's off by default. Learn more about action settings →
Does it run when I delete a whole app?
Does it run when I delete a whole app?
No. When you delete a whole app, Tape deletes its automations first, so its records don't start When a record is deleted. If you delete several records at once, the automation runs once for each record.
How can I see what was in the record before it was deleted?
How can I see what was in the record before it was deleted?
You don't need Get previous values. The automation can use the field values the record had when it was deleted, in the filter and in actions. Learn more about Get previous values →
Are there other triggers I can use?
Are there other triggers I can use?
Yes! An automation can start when a record is created, updated, or deleted, when a comment is added, when a date arrives, on a schedule, and more. See every trigger in Automation triggers →
Are you a developer using the Tape API for automations?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: Triggers in the developer docs →
Still have more questions? Find answers and get help from community experts in the Tape community →.
