Best answer

How to automatically assign a contact to a deal (within Hubspot)

  • 12 January 2022
  • 31 replies
  • 4131 views

Userlevel 2
Badge

Dear Zapier Community,

I am trying to automate the automatic association of a contact to a created deal. What I have done is create two sales pipelines for which I have automatically created Deals via the Zapier integration from contacts that came in via a Hubspot form the past weeks (so existing contacts in Hubspot). The creation of these deals from the contacts (based on a contact property change) worked. But I now have the problem that none of my contacts are associated with my created deals. For context, my business does not operate with other businesses/companies but with private individuals, therefore the deal name is equal to the contacts first and last name. I have tried many versions through zapier but the issue seems to be that the automatic association from a contact to a deal cannot be resolved through the zapier options. Any idea how I can automatically assign my contacts to the created deals so I do not have to do this manually each time? Or if I may be missing an important step inbetween (tried it with find contact before association but also not successful).

Thank you a ton in advance and best

Daniela

 

 

icon

Best answer by christina.d 21 January 2022, 00:22

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

31 replies

Userlevel 7
Badge +9

Hi @danielajk, @DreTech , @AFM , @SeanWilson:

Thanks for reaching out and taking the time to surface this! I did some digging and was able to find the feature request related to adding associated fields to the “New Deal” trigger. 

While we don’t have an estimate when this will get implemented, I did go ahead and add votes for everyone in this topic to it. This way the HubSpot and Zapier teams can continue to track interest and send emails when and if this gets implemented.

Thank you to @Troy Tessalone and everyone for continuing to share your recommendations and what’s worked for you!

Userlevel 1
Badge

Hi,

I have the exact some problem as you. The legacy Hubspot API was great. The new one is not good. This is unfortunate. I am working on doing something with my own API key and seeing if I can get anything from there.

Until then, I have two workflows:

  1. New deals:
  2. Updated deals where the contact association has changed

Here is the issue: There is no way to have a trigger that notices a change to hubspot associations. That is, if you change a contact associated with a deal - there is no trigger for that.

A workaround I have created is to use the trigger ‘update on property change’ and use the property change ‘last modified time’.

 

But now there are a LOT of triggers that are created. Every chat, conversation, email, phone call, everything is a trigger.

So then I dealt with it in three parts:

  1. A trigger system that sends a webhook
  2. A catcher system that sorts and filters these triggers and passes on to the actual updater
  3. The updater that updates the database with all sorts of interesting things (looping through associated contacts to get their details and update them for example) but this is not a concern for the time being.

The Trigger goes like this:

  1. Receive trigger
  2. create a key in storage by zapier with Key: CID_{Deal_ID} and value {zap_meta_timestamp}
  3. send webhook

The Catcher goes like this:

  1. Receive webhook with Deal_ID
  2. Go into delay by zapier queue with queue name Q_{Deal_ID}
  3. once out of delay use storage by zapier to find key CID_{deal_ID}
  4. Filter by zapier to continue only if a value is found at CID_{deal_ID}
  5. It runs some other checks (not important) before sending a webhook to the actual updater and then:
  6. Uses storage by zapier to erase the key and value at CID_{Deal_ID}

The updater goes like this:

  1. Receive webhook with Deal_ID
  2. Find deal by Deal ID
  3. Find Associations by Hubspot type
  4. Loop through to do what I want with them.

In your case it seems you have:

  1. A deal
  2. A contact
  3. No way of associating the contact with the Deal

I would recommend:

  1. Once a deal is created with your other Zap
  2. Send webhook for sub routine and make the payload the DealID and contactEmail
  3. Sub routine searches for contact by email address (the unique key for contacts in HS)
  4. New association using dealID and ContactID

 

I am having this same issue! I can not find a way to automatically create a deal when a new contact shows up in my Hubspot account. 

 

I am commenting, as I would like the follow this thread as it gets solved. This will be huge for our business and eliminate a lot of work for my team.

Userlevel 7
Badge +14

Hi @AFM 

Try these Zap steps…

  1. Trigger: HubSpot - New Contact
  2. Action: HubSpot - Create Deal
  3. Action: HubSpot - Create Associations

 

Hi @Troy Tessalone, I am not seeing the option under Triggers to select “New Contact”. Maybe I am doing something wrong on my end?

Userlevel 7
Badge +14

@AFM 

Can you please post full screenshots of your Zap steps.

Unable to tell what HubSpot trigger event you are using.

NOTE: By default HubSpot will return certain properties for the chosen object.

We are having this same problem.

 

Trigger- New Form Submission

Action - Create or Update Contact

Action- Create Deal in hubspot

Action- Create Associations (this is where we are stuck, should this be contact to deal or deal to contact?) and which ID’s go on the object being associated and on the Id's of the objects the from object is being associated with)

 

Thanks so much for your help!

Userlevel 7
Badge +14

Hi @DreTech@AFM  & @danielajk 

 

Try this…

Zap Step 2 is related to the HubSpot Contact

Zap Step 3 is related to the HubSpot Deal

 

TIP: When in doubt, test it out!

Thanks for your response!

 

I tried it, however I don’t have a ID option for the second Field (I am assuming that’s the contact ID?)

Userlevel 7
Badge +14

@DreTech 

You’ll need to use static IDs and/or use Zap steps to Find the Contact/Deal you want to dynamically map via variables as shown below.

 

This relates to the Contact

 

This relates to the Deal

 

Here is the error I am getting:

 

I pulled the only “ID” option from the Contact field that appears. Which for me is : 37051 

 

I am getting this error but this isn’t another ID for me to choose from. 

 

Here is the full screenshot.

 

Honestly if its an option, I am happy to pay a fee to hop on a zoom and have you tell me what to click to get this to work.

Userlevel 7
Badge +14

@AFM

Please post screenshots with all your Zap steps, thanks.

Hi Troy,

 

Thank you for the response and continued help. Hopefully this is helpful: 

 

 

Should something be set under triggers for New Contact in Hubspot?

Userlevel 7
Badge +14

@AFM

Make sure to test each Zap step manually

 

Hi Troy, 

I just tested them all and each on is working accept for the last step #3. I am still getting the ID error. Screenshots below:

 

 

 

Userlevel 7
Badge +14

@AFM 

Try changing your Zap trigger step data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

@Troy Tessalone,

 

Thanks for your help. Maybe its best to wait for Hubspot to fix it? Do you think the New Deal trigger will be available in the next couple of weeks?

Userlevel 7
Badge +14

@AFM 

No timetables are provided for feature requests.

Could be tomorrow, could be never.

@Troy Tessalone

I dont know why its working but it is working now. Thank you for all your help and patience. I will try not to touch anything and hopefully it keeps working. 

 

Userlevel 7
Badge +14

Hi @danielajk 

Based on the error in the screenshot it seems to indicate there is no matching HubSpot Contact for that ID.

Make sure that Contact exists in HubSpot.

Help article about how to change your trigger test data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger

Please post screenshots with how your HubSpot Create Associations step is configured with the variables mapped.

NOTE: You’ll need to map the internal HubSpot IDs for the Contact and Deal, instead of the friendly names.

 

 

Userlevel 2
Badge

HI Troy,

Thanks for your fast reply. I have made another screenshot and included some further information:

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting. 

Userlevel 7
Badge +14

@danielajk 

Give this a try...

This is the ID of the Deal, but you are saying it’s a Contact Object, so try changing that.

This should also be a “Contact”.

 

Userlevel 1
Badge

@Troy Tessalone

I dont know why its working but it is working now. Thank you for all your help and patience. I will try not to touch anything and hopefully it keeps working. 

 

You had everything set up correctly. Sometimes it is best to then go into hubspot and do something to trigger again. Then you can go back to the zap, bring in the new data and do test & continue steps to ensure everything is OK.

some things that can cause issues I you create a test deal to start the zap build process then delete the test deal whilst doing the zap build and then subsequent tests fail for example. Can be confusing if you delete a deal or contact and then recreate it with the same information. The issue becomes that everything looks the same to us but the ID has changed.

Userlevel 2
Badge

Hi Troy,

it seems like it is an issue with Hubspot. They used to have a direct association of the ids of deals and contacts in their legacy CRM but removed the feature in the new version. I wrote to their support and she referred to some of these work arounds:

I am trying to get this to work via the Create New Deal In Stage initial trigger, but for some reason I cannot find a contact or update it before taking the next steps, I can find the value “vid” but  for some reason cannot identify the correct values for the contact information next steps. But maybe I’m also missing something

Some people are also suggesting to work with delays?

Here they somehow can also customize deals, which I could not in my zap:

https://community.hubspot.com/t5/APIs-Integrations/Help-Zapier-to-New-Contact-to-New-Deal/td-p/306822#:~:text=Hello%20everyone,,include-contact-ids...

Pretty consequential decision Hubspot made to remove this one feature

Userlevel 7
Badge +14

@danielajk 

Try using a HubSpot Find Associations step in your Zap: