Best answer

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

  • 12 January 2022
  • 31 replies
  • 3961 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 +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 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:

 

Userlevel 2
Badge

@Troy Tessalone

unless I manually associate the contact in the Deal, I think there will be no chance for the system to know to which deal which contact should be associated to or vice versa. Actually the only way for it to know is to get the first and last name of the contact as they are identical with the deal name (the deal name was created from the first and last name of the contact as no company is involved) but I think it only works in the zap with the respective ids. 

I can also only choose the deal id (41406..) which it then seems to take for the contact id.

Reversind deal and contact gives you the same result

 

Userlevel 7
Badge +14

@danielajk 

If the Deal Name is the same as the Contact Name, then try adding a Find Contact step to the Zap before doing a Create Association step:

 

Userlevel 2
Badge

@Troy Tessalone mmh, ok but why won’t it let me choose the respective value in Hubspot

 

Is it because it is already retrieving these standard properties? How can I then define that the “ID” is one from the standard properties list?

 

Userlevel 7
Badge +14

@danielajk 

You need to map variables from a previous step.

For example, if your Deal Name is the Contact Name, then you may need a Formatter step to split the Deal Name into Contact First Name and Contact Last Name: https://zapier.com/help/create/format/get-started-with-formatter#using-the-lookup-table

NOTE: Splitting Full Names by spaces may not work as expected due to these reasons:

  1. Multiple first names
  2. Multiple last names
  3. Middle names
  4. Name prefixes (e.g. Dr.)
  5. Name suffixes (e.g. Jr.)

 

Userlevel 2
Badge

@Troy Tessalone Thanks a lot for this tip. I could get it to work now. I have an trigger in place that creates a deal from a contact list in Hubspot. Once triggered, the zap will now include first and last name aswell as the contact id. It will separate the three with tha Formatter. With the Contact ID it is then easy to find the contact and create the association. I have one more issue with the contact association and automatic deal creation. So it seems that once a deal is automatically created with a zap based on another trigger, the contact association zap does not trigger (or recognize the new deal?). I have tested this by comparing the deals created via the zap from the Hubspot contact list vs. creating a deal manually. The contact association zap only triggers when a deal is manually created (only my test deal from 14.19).

 

 

Userlevel 7
Badge +14

@danielajk

The HubSpot New Deal Zap trigger is NOT instant.

Polling trigger: the majority of triggers are polling triggers.
With a polling trigger, Zapier will check for new data from your trigger every 1 to 15 minutes in order to start your Zap, depending on your pricing plan.

Check your Zap Runs to further troubleshoot: https://zapier.com/app/history/

 

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: