Jeff
Jeff

Reputation: 31

Get HubSpot Contact From Deal

I'm triggering a Zap from HubSport when a Deal moves to a specific stage. This is so that Zapier can hit a WebHook on my backend, and I can get the contact info (email, name, other properties).

It's not clear to me that I can get the contact info from the Deal.

Here is the Deal API: https://developers.hubspot.com/docs/methods/deals/deals_overview

Here is the Deal structure I'm getting passed to the Webhook:

{
    'closedate': '1575154955284', 
    'createdate': '1573686155284', 
    'days_to_close': '17', 
    'dealId': 'xxxxxxx', 
    'dealname': 'Jeff Chandler - New Deal', 
    'dealstage': 'decisionmakerboughtin', 
    'hs_all_owner_ids': 'xxxxxx', 
    'hs_analytics_source': 'DIRECT_TRAFFIC', 
    'hs_analytics_source_data_1': 'xxxxxxxx', 
    'hs_closed_amount': '0', 
    'hs_closed_amount_in_home_currency': '0', 
    'hs_created_by_user_id': 'xxxxxxxx', 
    'hs_createdate': '1573686157136', 
    'hs_deal_stage_probability': '0.8000000000000000444089209850062616169452667236328125', 
    'hs_is_closed': 'false', 
    'hs_lastmodifieddate': '1581127561944', 
    'hs_object_id': 'xxxxxxxxxx', 
    'hs_sales_email_last_replied': '1577566247000', 
    'hs_updated_by_user_id': 'xxxxxx', 
    'hubspot_owner_assigneddate': 'xxxxxxx', 
    'hubspot_owner_id': 'xxxxxx', 
    'id': 'xxxxxx-decisionmakerboughtin-xxxxxxx', 
    'isDeleted': 'False', 
    'notes_last_contacted': '1577565662000', 
    'notes_last_updated': '1577566247000', 
    'num_associated_contacts': '1', 
    'num_contacted_notes': '12', 
    'num_notes': '16', 
    'pipeline': '', 
    'portalId': ''
}

Upvotes: 0

Views: 1400

Answers (1)

Jeff
Jeff

Reputation: 31

Ok, think I found the answer.

Associations API: https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview

Calling associations API on my dealId with association type 3 (Contacts), gives me the contact id. Boom!

API for for association types: https://developers.hubspot.com/docs/methods/crm-associations/crm-associations-overview

Upvotes: 1

Related Questions