pipedream
pipedream copied to clipboard
[Refactor] Update Hubspot Sources to use Webhooks
We should update all relevant Hubspot sources to use webhooks instead of polling, wherever possible.
https://developers.hubspot.com/docs/api/webhooks#create-a-new-subscription
When registering webhooks in Hubpot, you'll need the Pipedream App ID: 208642
Let's make sure to support the logic outlined in this ticket as well.
I have a hunch for why this wasn't implemented. The hubspot subscription api requires a developer account API key - not OAuth api key - to create a subscription. So, it wouldn't be possible for each component to create its own subscription to an event like "deal.propertyChange"
for the account they are connected to.
From Hubspot documentation:
Webhooks are set up for a HubSpot app, not individual accounts. Any accounts that install your app by going through the OAuth flow will be subscribed to its webhook subscriptions.
@dannyroosevelt could we set up a second Hubspot app, much like we do for Twitter vs Twitter Developer App?
Then @dangub and others could use their own account API key and utilize webhooks?
Oh, yes or it sounds like we may want to configure an apphook to make this work more seamlessly. I'll run this by eng to make sure my understanding is correct.
Good catch @dangub!