Automatically associate contacts that are associated to a company with deal

Hi there,

Companies are associated to deals and displayed in the deal side bar.

How would I go about associating contacts to the deal based on company that is already associated to that deal?

I.e is there a way to automatically associate any contacts that are associated to the company to the deal?

Thanks

Hello @SRobinson4

you can associate contacts to deals based on the company that is already associated with the deal using HubSpot’s API and a custom script. You have to Retrieve the company associated with the deal from HubSpot CRM using the Deals API. Use the company information to retrieve all contacts associated with that company from HubSpot CRM using the Contacts API. For each contact retrieved in step 2, associate the contact with the deal in HubSpot CRM using the Deals API.

You can use a variety of programming languages to interact with the HubSpot API, such as Python, Java, or JavaScript.

Note that you’ll need to have access to a HubSpot API Key to be able to make API calls to HubSpot.

It is recommended to write tests and run them before deployment to make sure that the automated process works as expected and to catch any bugs or errors before they cause problems in production.
Thanks & Regards
Himanshu Rauthan

can you provide link to get contacts assosiated with company to put these contacts to deals

Would this same process work for two contacts that are associated with one another? Our organization is B2C, so we don’t work with companies, but we have spouses that may be linked together with deal information.

Hi @ELessert
Thanks for your comment! To ensure your question or topic gets the best visibility and a wider range of responses from the community, it’s usually best to start a new thread rather than adding to an older one.
A fresh post will help your query stand out to everyone who browses the forum, increasing the chances of someone with relevant insights or solutions seeing and responding to it quickly. Feel free to tag me in the post and I’m happy to get you started.
Best, Victor

Hey @SRobinson4, and @himanshurauthan,
I’m a little late to the party but have you heard of Associ8? It lets you automatically create associations between objects based on parameters you set. There’s some documentation showing how it works here.
Let me know if you have any questions! I’d be happy to talk with you about it in more detail.
Best,
-David Staat

Hey @SRobinson4,

Yes, there is an open request for this feature, it is sorely needed!. I believe there can be a way to do it with a custom coded solution and the API (or potentially ops hub) but that would be the only ways, currently.

However, Insycle, recently launched this feature. Full disclosure, I work for Insycle. You can tell Insycle to “look at contacts that are associated to this company, but are not associated with the deal that the company is associated to.”

Best,

Ryan