I encountered a scenario where I needed to capture a change in a property value within a Quote Line Item field (e.g., Margin), and update a corresponding property in the associated Deal record based on some calculations.
To address this, I implemented the following workaround:
1. Created a webhook to detect changes in the Line Item property.
2. Developed a Node.js application to process the webhook's POST requests and hosted it on a third-party platform (Heroku).
3. Utilized standard HubSpot APIs in Node app to fetch the relevant data from HubSpot and update the corresponding field.
I would like to know if this workaround is an appropriate approach to handle the described scenario.
Do you have any suggestions for improvement or alternative solutions?
A couple of tips regarding HubSpot APIs and webhooks:
You might like to consider using an established HTTP requests library (e.g. Python's 'requests' or Node's 'axios') to interact with HubSpot's APIs (rather than using a HubSpot API Client Library). The client libraries have many known issues, especially with documentation and backwards comptability.
A couple of tips regarding HubSpot APIs and webhooks:
You might like to consider using an established HTTP requests library (e.g. Python's 'requests' or Node's 'axios') to interact with HubSpot's APIs (rather than using a HubSpot API Client Library). The client libraries have many known issues, especially with documentation and backwards comptability.
Not really. Sometimes it's possible to handle this kind of use case via HubSpot's "Serverless functions" feature. But it's not really designed for that. I generally recommend hosting outside of HubSpot for these kinds of use cases.
I work mostly with Google Cloud Run (either via a "service" or a "function"). I find it works well and is generally cost effective.
Hope that helps.
All the best,
Zach
--
Zach Klein HubSpot Integrations & App Developer Meanjin / Brisbane, Australia