APIs & Integrations

nikan
Participant | Elite Partner
Participant | Elite Partner

Association Triggered Workflows

I'm currently using a property on a custom object to handle associations for the object. It is a comma-separated list of object id's that the custom object instance is associated with. Removing or adding an id  to the list will result in the association or dis-association of the instance and the object associated with the id. 

It works great but is uni-directional. I'm looking for a way to populate that property value when a user creates / removes an association using HS's UI, so that the list updates automatically and the relationship between the property and the object instance's associations is biderectional. I don't see a workflow that is triggered by associations. Is there an alternative event that is triggered by associations that I could tap into?

8 Replies 8
matheus_jiran
Participant

Association Triggered Workflows

@nikan this is really needed. 

 

I found this post in the ideas forum, please upvote that. 

 

In my use case, I need to trigger a workflow to update other systems based on Appointment (custom object) updates.

Whenever a new Member (custom object) is associated with that Appointment, I need to trigger this workflow. I managed to use the Member's property Email as a trigger, but it only works for the first enrollment, not for reenrollments.

0 Upvotes
roland_deshane
Participant

Association Triggered Workflows

This is becoming increasingly important as we get improved functionality around associations. Have several use cases where I'd take advantage of an "Association trigger" for workflows, esspecially on enabling reenrollment of those workflows. 

 

Mike_Eastwood
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Association Triggered Workflows

Hi @nikan 

 

Assuming your code is Associating, or Disassociating, a Custom Object you can easily add a timeline event from your code.

 

We're about to do that with one of our integrations to make the events visible on the timeline – great improvement to User Experience.

 

Have fun

Mike

Mike_Eastwood
Key Advisor | Gold Partner
Key Advisor | Gold Partner

Association Triggered Workflows

Hi @nikan 

 

The docs are limited (but should improve over time).

 

The old docs have the CRM Associations API which doesn't mention Custom Objects.

 

There's a sneaky mention on this page if you search for "New Association Definition".

 

But, I don't know if it will work.

 

Have fun

Mike

 

nikan
Participant | Elite Partner
Participant | Elite Partner

Association Triggered Workflows

Hey @Mike_Eastwood ,


I'm already able to successfully associate the custom objects with other objects (custom objects included). My question is regarding how I can trigger a webhook to my web app when an object is associated / disassociated with another. Is there an event or something that I can tap into to capture that action and send a webhook with the object id's?

SDatE
Participant

Association Triggered Workflows

Hi nikan, did you get anywhere with this? It seems odd that there is no easy way to trigger a workflow when an association is made/cleared.

SDatE
Participant

Association Triggered Workflows

An update in terms of my work with this. I have found that if you know you'll only ever be doing a 1:1 association, you can trigger workflows by using the object you are associating with as a trigger. For instance, if you are associating a Company with your Custom Object, then you can have a Custom Object-based workflow where the trigger can be a Company field. And then you set the trigger as something like "Custom Object: Name" is updated after "Company: Name" or similar. It's not ideal at all, but it should work.

Really we just need an association event to work with!

dennisedson
HubSpot Product Team
HubSpot Product Team

Association Triggered Workflows

Hello @nikan 

This is a great question.

@Mike_Eastwood , I feel like  this is up your alley!