May 29, 2022 7:27 AM
I'm working on a custom integration for our virtual event app, and trying to use webhooks to receive information about when a customer's attendees have been updated in Hubspot.
I'm having trouble connecting the webhook data coming in to a specific event in our system. We have an API key system that is event specific, but Hubspot won't send that key. I thought about adding the key to the TargetURL, but the target URL is app wide and doesn't seem to allow it to be variable per oauth connection.
I can use the HubID, but that only works if the users of our platform only have one event taking place at a time. If a user has two events, then when the data comes in, we can narrow the data down to two events, but no way to specify which is which.
Any thoughts on how you would solve for this? We could just not use the webhook system and transition to a polling mechanism, but that seems like a poor solution.
Thanks in advance for your insight.
a month ago
@Mike_Eastwood we're using OAuth2 for our integration. Are you saying that there is a way to identify the subscription to webhooks for a specific authorization that we can unsubscribe from those webhooks?
My understanding of how the webhooks seems to work is that the app is created in hubspot, and anybody who authorizes the app, our system will receive all the webhooks defined by the app itself.
We can't seem to find a way to unsubscribe from those webhooks without the user logging into hubspot and deauthorizing the app... which seems like a horrible user experience...
Really appreciate your support here.
a month ago
There are two ways (that I know of) to leverage Webhooks:
1. Webhook Subscriptions which triggers based on an object being created, updated or deleted.
2. Webooks in Workflows which trigger when conditions are met in a Workflow (will depend on which HubSpot products you use).
With normal Webhooks (#1) the HubSpot API will hit your endpoint every time the conditions are met e.g. Property Change, Object Creation, etc.. If you add some data in the JSON (sent from the Webhook) you can process the data with your system if, and when, the data meets your conditions. With this approach your probably going to end up with lots of data flying back and forth for no gain.
Using Webhooks in an Automation (#2) means you'll have much more control over if and when the Webhook calls your endpoint. So, much less noise if the conditions aren't met. But, that requires every portal to have Marketing Pro or Enterprise.
There may be a creative solution in Ops Hub but it sounds to me like that will add more complication?
a month ago
May 29, 2022 6:12 PM - edited May 29, 2022 6:13 PM
It's worth the effort to set up OAuth for your app. OAuth will handle multiple accounts easily.
Then, with your Webhook, you can specifiy any data (see Managing subscriptions via the UI) that should be included in the JSON e.g. event_id. And, when you include the data in the Webhook JSON it often saves you an API call to fish the data out of HubSpot.
When you implement both you will get the Hub ID and the Event ID (or whatever information you need).