# Trigger workflow on record deletion

**URL:** <https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188>\
**Category:** CRM\
**Tags:** workflows\
**Created:** [February 23, 2021, 8:34pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188 "2021-02-23T20:34:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nikan/32/57633_2.png) [@nikan](https://community.hubspot.com/u/nikan)\
**Post date:** [February 23, 2021, 8:34pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/1 "2021-02-23T20:34:47Z")

</div>

I am working on a project where products are created and updated according to a custom object record and its properties. If the custom object is updated, the product gets updated.  
Is there a way to trigger a workflow when the custom object is deleted? I wasn’t sure if I could use Object Id and “is unknown” as a trigger for “deletion” or if there is another way. I haven’t found any documentation on this yet.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [February 24, 2021, 5:44am UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/2 "2021-02-24T05:44:42Z")

</div>

Hi @nikan,

This is currently not supported in workflows, unfortunately. Workflows enroll records one by one and then execute the workflow actions – if a record has been deleted before, it can’t enroll in the workflow anymore.

Could you provide more context as to why the object records needs to be deleted? There are probably ways of putting the custom object records out of sight and trigger your workflows in a different way.

Best regards!

---

<div class="post-metadata">

**Author:** ![Rafs](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Rafs](https://community.hubspot.com/u/Rafs)\
**Post date:** [April 8, 2024, 3:35pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/3 "2024-04-08T15:35:30Z")

</div>

Hi Karsten,

For custom objects it is a conundrum.

The API does not support custom objects while it supports deletion events for standard objects.

Workflows support custom objects, but do not support deletion events.

No idea what to do 😞

---

<div class="post-metadata">

**Author:** ![Rafs](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Rafs](https://community.hubspot.com/u/Rafs)\
**Post date:** [June 12, 2024, 9:06am UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/4 "2024-06-12T09:06:46Z")

</div>

Hi Karsten,

Thank you for your reply.

I can not give you the answer to your question - why the object needs to be deleted. I guess an end user could answer that question. There is the “Delete” button in the UI, sooner or later it will be clicked, for variety of reasons. I am just a dev not an end user, I need to replicate user’s actions in another application, be it insert, update or delete.

Positive regards!

Raf

---

<div class="post-metadata">

**Author:** ![cjkappen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cjkappen/32/59606_2.png) [@cjkappen](https://community.hubspot.com/u/cjkappen)\
**Post date:** [December 28, 2023, 3:51pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/5 "2023-12-28T15:51:20Z")

</div>

This would be a really nice addition to prevent orphaned object records from hanging out after a parent record is deleted.

---

<div class="post-metadata">

**Author:** ![cixondev](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cixondev/32/13521_2.png) [@cixondev](https://community.hubspot.com/u/cixondev)\
**Post date:** [January 15, 2024, 2:31pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/6 "2024-01-15T14:31:42Z")

</div>

As a possible workaround, maybe you can create a list with all custom objects and record id is known. As a trigger you can than select removed from list. This would trigger the workflow if the custom object is deleted I think.

---

<div class="post-metadata">

**Author:** ![Rafs](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Rafs](https://community.hubspot.com/u/Rafs)\
**Post date:** [April 8, 2024, 3:31pm UTC](https://community.hubspot.com/t/trigger-workflow-on-record-deletion/32188/7 "2024-04-08T15:31:32Z")

</div>

I have tried the above, it did not work.
