Best answer

Adding Associations to a HubSpot Custom Object Record

  • 23 January 2024
  • 5 replies
  • 165 views

Userlevel 1
Badge

I am using the API request action in Zapier to create a record for a Custom Object in HubSpot, and also trying to create one association to a Company. When I test the step, the creation of the record works perfectly, but the association is not being created. Am I doing something wrong? Any help would be greatly appreciated! Below is the JSON of how I’m making the record and also trying to create the association:

PS. I have also tried to create the association on a separate step, but it says that the action I am trying to take is out of scope. Even though I have added all of the necessary things to the HubSpot private app.

 

icon

Best answer by Troy Tessalone 23 January 2024, 23:46

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.

5 replies

Userlevel 7
Badge +14

Hi @MichelleT 

Can you link to the HubSpot API endpoint you are referencing to configure the Zap action step?

We would also need to see the screenshots with how the full Zap step is configured.

Userlevel 1
Badge

Hi @Troy Tessalone 

The URL I’m using for the “successful” request is this: https://api.hubapi.com/crm/v3/objects/2-22839721

And the one for the associations alone that won’t work is this: https://api.hubapi.com/crm/v3/schemas/2-22839721/associations

Userlevel 1
Badge

Oh, hi @Troy Tessalone sorry I missed the screenshots for the full steps. Here they are!

This is for the “success”:

This is for the “out of scope”:

 They both have the same additional request headers:

 

These are the settings other than the JSON body already shared.

Userlevel 7
Badge +14

@MichelleT 

Have you tried using the newest HubSpot API v4?

https://developers.hubspot.com/docs/api/crm/associations

Userlevel 1
Badge

@Troy Tessalone 

I had tried that path very briefly before, but didn’t really find much documentation on my own and thought it was going to be more complicated. Just tried with the help of the link you shared, and it works. Thank you!