# Trigger workflow based on object associations

**URL:** <https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332>\
**Category:** Data Hub\
**Tags:** filters, data-quality-automation\
**Created:** [September 13, 2024, 3:02pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332 "2024-09-13T15:02:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kieranknock](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kieranknock/32/92388_2.png) [@kieranknock](https://community.hubspot.com/u/kieranknock)\
**Post date:** [September 13, 2024, 3:02pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332/1 "2024-09-13T15:02:25Z")

</div>

Is there any way to trigger a workflow (in this case for deals) based on an association, or lack thereof with another object?  
I need to identify deals that have no company associated with them so that we can attempt to link it to a company.

---

<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:** [September 13, 2024, 3:05pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332/2 "2024-09-13T15:05:24Z")

</div>

Hi @kieranknock,

Yes, this is best done by creating a calculation property, in this case a deal property of the type calculation which I would call ‘Number of associated companies’. For the calculation, use the count method and count all associated companies by record ID, for example.

> **[Create calculation and rollup properties](https://knowledge.hubspot.com/properties/create-calculation-properties)**
>
> Learn how you can create calculation, time since, time between, time until, or rollup properties in HubSpot based on property values.

Once you have this property, you can use it for enrollment or branches.

Let me know if you have any follow-up questions!

---

<div class="post-metadata">

**Author:** ![kieranknock](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kieranknock/32/92388_2.png) [@kieranknock](https://community.hubspot.com/u/kieranknock)\
**Post date:** [September 13, 2024, 3:51pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332/3 "2024-09-13T15:51:17Z")

</div>

Hey @karstenkoehler,  
Thanks for your prompt response. This worked!  
For clarification, I’ll note that I had to use “rollup” instead of a “calcuation” property.  
Cheers!

---

<div class="post-metadata">

**Author:** ![springboardjade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/springboardjade/32/1529_2.png) [@springboardjade](https://community.hubspot.com/u/springboardjade)\
**Post date:** [April 14, 2025, 7:58pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332/4 "2025-04-14T19:58:00Z")

</div>

Hi- I’m also trying to trigger workflows based on associations, but in this case a contact \<\> contact association. I’m having an issue with this solution- I’m trying to set up a “rollup” property and would love to rely on the **association labels existing** as the condition for the count (ie when mentor label is applied to an associated contact), so am having trouble given it seems like you can only use the associated property fields as the conditioning. How can I set up this property so that it’s based on the association label existing?

---

<div class="post-metadata">

**Author:** ![springboardjade](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/springboardjade/32/1529_2.png) [@springboardjade](https://community.hubspot.com/u/springboardjade)\
**Post date:** [April 14, 2025, 10:00pm UTC](https://community.hubspot.com/t/trigger-workflow-based-on-object-associations/116332/5 "2025-04-14T22:00:37Z")

</div>

Nevermind! This process works great- I didn’t expect for this property to populate with “0” for all contacts without an association. Used this to count associations based on several labels, which is exactly what I was hoping for.
