# Automation triggered on entity deleted

**URL:** <https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654>\
**Category:** Ideas & Features\
**Tags:** automations\
**Created:** [December 5, 2022, 11:13am UTC](https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654 "2022-12-05T11:13:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![julien.erny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/julien.erny/32/5833_2.png) [@julien.erny](https://community.fibery.io/u/julien.erny)\
**Post date:** [December 5, 2022, 11:13am UTC](https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654/1 "2022-12-05T11:13:33Z")

</div>

You can trigger an automation on entity creation (potentially creating linked sub-entities) but unless I’m mistaken, you cannot trigger au automation on deletion (to destroy the linked sub-entities).  
Would that be feasible?  
I see this as a complement to this : [[Automations] Deleting entities with nested collections](https://community.fibery.io/t/automations-deleting-entities-with-nested-collections/33)

---

<div class="post-metadata">

**Author:** ![zazy](https://avatars.discourse-cdn.com/v4/letter/z/a4c791/32.png) [@zazy](https://community.fibery.io/u/zazy)\
**Post date:** [December 5, 2022, 12:16pm UTC](https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654/2 "2022-12-05T12:16:09Z")

</div>

If there is a link (relation) between entities, try the “Entity unlinked from…” in the **When** part of the automation rule.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [December 5, 2022, 12:27pm UTC](https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654/3 "2022-12-05T12:27:54Z")

</div>

> [@julien.erny](#):
>
> you cannot trigger au automation on deletion (to destroy the linked sub-entities).

If you’re talking about deleting child items when a parent item is deleted, the solution is to create an automation on the ‘child’ database (not the ‘parent’ database). The trigger should be ‘Parent field is updated’ with filter ‘Parent field is empty’, and the action is ‘Delete’.

---

<div class="post-metadata">

**Author:** ![julien.erny](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/julien.erny/32/5833_2.png) [@julien.erny](https://community.fibery.io/u/julien.erny)\
**Post date:** [December 5, 2022, 12:44pm UTC](https://community.fibery.io/t/automation-triggered-on-entity-deleted/3654/4 "2022-12-05T12:44:47Z")

</div>

Thanks, that should do the trick indeed 🙂
