I’m brand new to Javascript and Marketing Ops and I’ve recently been following a guide Jack Coldrick created on building a referral program.
Since he wrote the guide, the syntax used to connect to the API has changed a little bit which is reflected in lines 12-15 in the code I’ve attached.
In this particular action, Hubspot is supposed to be able to find a contact with the Referrer ID that matches a number that a prospect put into a form when they signed up for a demo. The action then updates a number of things on that same contact. (See the guide link for more details.)
I’ve spent the better part of this week running through every troubleshooting tip and article that I’ve been able to find, but my code still runs an error when enrolling a contact. Any idea what might be wrong with my syntax?
Any and all help would be appreciated!
Hi @spen_wood,
I’ve recently implemented this for my company and had a similar issue I managed to fix! I can’t see the code snippet attached, could you send it again and I’ll have a look?
@timo1 Good catch, forgot the screenshots… thanks.
@spen_wood What error are you getting? Can you take a screenshot?
Verify that your code syntax aligns with the updated standards. Double-check API connection and Referrer ID matching. Review error messages and debug using coding tools. Explore relevant API documentation and seek community support. Persistence pays off in debugging!
One thing I would try is using the hubspot api with axios instead of the node hubspotclient – I’ve never had any luck with that thing






