I have tried multiple ways to get some custom code in a workflow to create an association to either standard or custom objects. Like many others on here I have failed.
In the end, I found out you can create it at the same time as creating the object itself by passing the association data with the http call to the create endpoint.
Has HubSpot declared that the v4 associations api doesn’t actually work in custom code - whether using the api client or a http call? It exists in the sample codes, but I can’t get them to work either.
Hi @DaveParry,
Thanks for reaching out to the Community!
I’d like to share some similar threads that might help you:
- The solution from @michaelrandrup on this post “Problem with the v4 association API (Create default association)”
- The solution from @ArdenM on this post “Basic Node Example from Associations v4 not working”
- This post “Creating an association through the Associations API v4 not working with Node”
Please let me know if that helped!
Thanks and have a lovely day!
Best,
Bérangère
Thanks @BérangèreL - I’ve come across those threads as part of my general search. The one with hidden characters in the sample code wasted a good few hours of my life too!
It seems to all reach the same conclusion: that the documentation is incomplete or wrong, and that the v4 endpoints aren’t available in the api client at all.
What puzzled me was that I couldn’t even get the associations api to work using https calls in Custom Code, whereas I can in Postman and using MS PowerAutomate. I can however make the associations using the v3 create api at the point of creating one.
It sounds like others have hit the same problem and there is no easy solution.
Hi @DaveParry,
Thanks for getting back to me and for the precious feedback!
I am checking internally on this for you!
I’ll get you updated as soon as I hear from the Team!
Thanks for your patience!
Best,
Bérangère
Hi @DaveParry, I hope that you are well!
Thanks for your patience!
For the Team to investigate further, would you please be able to share some links to the documentation used and code example (without confidential data)?
Thanks a lot!
Best,
Bérangère