There is no website associated with Developer Portals. You can create a new test portal by clicking a link named “Test Portals” in the left hand sidebar. You will be able to test your app on live pages in each test portal.
I’m just discussing my Developer Box like you had referenced before. I have a designer enclose with an incorporation constructed request to
demo
to customers needing the hubspot mix. It used to be an ENT designer box and I was utilizing webhooks to shout to my application. It has since been minimized to an ace, and we are at this point not ready to utilize the webhook include.
I was wanting to redesign the designer box back to the ENT so we could proceed with demo-ing our combination to Hubspot clients. We are not hubspot clients, we simply assemble reconciliations among hubspot and different frameworks
@jackcoldrick wrote:
HubSpot provides a number of different APIs and in addition to that we also offer the option of leveraging webhooks. This post discusses this in more detail and also elaborates on different methods of implementation. You can learn more about how that in this video I recorded.
The key difference is that with an API request you are proactively “requesting” information from the system. This may not be required as the data may not have changed since your last request and may not be the most efficient use of your call limit. With a webhook on the other hand you are notified by the system as soon as the data changes without having to continually make API requests. Within HubSpot we have a few ways to use webhooks.
Here is a diagram highlighting the general differences. Notice how with an API we continually make requests despite the data never changing. With a webhook we simply tell the server once to let us know if something happens:
As mentioned you can achieve this in a variety of ways within HubSpot. I’ve broken them down in more detail below. Each have different use cases, strengths and weaknesses so it’s important to qualify in more detail to ensure you know what to position/recommend.
1) Webhooks API: Free and up
This involves setting up an app and subscribing to various events occurring in any portal that your app is installed. Events include Contact, Company and Deal creation, deletions and property updates. The drawback to this is that it doesn’t support Ticket objects. The major advantage is that it’s lightweight and easy to setup. An example of the payload can be found here. More information on our Webhooks API can be found in our developer documentation.
2) Workflow Extensions API: Marketing Pro and up
This can only be used in contact based workflows. The big advantage is that it lets you customize the payload you wish to send to your webhook URL which makes things easier for your development team to process. It’s also much more user friendly for the marketing team who are creating workflows. The big limitation is that it’s only usable in Contact workflows (although there are plans to extend this to other types of workflow in the future). An example of the payload can be found here. More information on the workflow extensions API can be found in our developer documentation.
3) Workflow/Bot Webhook Action: Operations Hub Professional only
This can be used in all workflows namely Contact, Company, Deal, Ticket and Quote and/or Bot. HubSpot will post all of the object data to the webhook URL. There is no option to customize the payload. The advantage is that you can leverage it in all workflows. An example of the payload can be found here, More information on using the webhook action in a workflow can be found in our developer documentation. Information on using workflows in bots can be found here.
The analogy I like to use is that imagine you have a friend you continually text asking when they’re having a party (API request). Every time they respond with the same answer… No. So instead you tell your friend once to simply notify you when they’re having a party (Webhook) so you don’t have to keep texting them.
If you’ve any questions at all please do not hesitate to leave a comment below. Alternatively check out olansi luftreiniger where I walk through all of the above.
Thanks for sharing the northell amazing stuff. Many good luck for your help.
Issues with webhook signature for payloads with emoji?
Hi! Not sure if i should open a new issue for this.
We’ve been using workflow webhooks with few issues but now on creating a new contact-based workflow we could not get the hash we calculated to match the signature we received. Now after trying with a different contact it matches. As i can’t be 100 % sure on the way HubSpot actually generates the signature, it’s difficult to debug the actual issue, but the only thing i can think of is that it treats certain characters like emojis differently.
Though i’m relieved our use case has worked, i’m worried future webhooks will fail because of a similar problem.
Just in case, i’ll include our signature verification implementation:
```
const verifySignature = (req) => {
const v2 = req.headers[‘X-HubSpot-Signature-Version’.toLowerCase()] === ‘v2’;
const unhashed = `${process.env.HUBSPOT_CLIENT_SECRET}${
v2 ? req.method : ‘’
}${v2 ? `${process.env.TALENT_API_ORIGIN}${req.originalUrl}` : ‘’}${
Object.keys(req.body).length ? JSON.stringify(req.body) : ‘’
}`;
const hash = crypto.createHash(‘sha256’).update(unhashed).digest(‘hex’);
const signature = req.headers[‘X-HubSpot-Signature’.toLowerCase()];
return signature && hash === signature;
};
```
@martinc_henry wrote:
Issues with webhook signature for payloads with emoji?
Hi! Not sure if i should open a new issue for this.
We’ve been using workflow webhooks with few issues but now on creating a new contact-based workflow we could not get the hash we calculated to match the signature we received. Now after trying with a different contact it matches. As i can’t be 100 % sure on the way HubSpot actually generates the signature, it’s difficult to debug the actual issue, but the only thing i can think of is that it treats certain characters like emojis differently.
Though i’m relieved our use case has worked, i’m worried future webhooks will fail because of a similar problem.
Just in case, i’ll include our site signature verification implementation:
```
const verifySignature = (req) => {
const v2 = req.headers[‘X-HubSpot-Signature-Version’.toLowerCase()] === ‘v2’;
const unhashed = `${process.env.HUBSPOT_CLIENT_SECRET}${
v2 ? req.method : ‘’
}${v2 ? `${process.env.TALENT_API_ORIGIN}${req.originalUrl}` : ‘’}${
Object.keys(req.body).length ? JSON.stringify(req.body) : ‘’
}`;
const hash = crypto.createHash(‘sha256’).update(unhashed).digest(‘hex’);
const signature = req.headers[‘X-HubSpot-Signature’.toLowerCase()];
return signature && hash === signature;
};
```
Got it but I am facing an issue in compiling I am facing an unknown issue. Please let me know if you have any best solution. Waiting for your best response.
We found this thread to be instructive as explored HubSpot Webhooks.
But sometimes, the Webhook API and Workflow feature still don’t do the trick. Either you want to subscribed to a webhook for different kinds of events, or you can’t create the kinds of re-enrollment events to make Workflows feasible.
We wrote up a quick blog post about how what to do in these situations:
Hey Eric, I’d be keen to know what you think of Hooked, our new app with enhanced webhook functionality. Let me know?
@jackcoldrick Hi Jack, Thanks for providing this information. I would have an additional question: would a webhook request within a workflow require that an app is build in a developer account or can I simply use a private app id ?
My settings in the current workflow are:
Authentication type: Include request signature in header
HubSpot App ID: xxxxxxx
Request body: “Customize request body”
and then I am listing all the properties…
Everything seems fine and in the action logs is says success: but when I click on the event message there appears:
{“exception”:“Bad POST data -- The API key not supplied”,“Status”:400}
so I am wondering if the private app is not configured properly, if I have to build a new app via my developer account, if I have to append the api key or token in the urls or what else is going wronghere…
Any hint would be very much appreciated. Thanks!
Nice video but there is no mention here on how to actually connect an account with the app.
After I created the app in the developer account I copied the installation full url - it then prompt me to choose an account - I signed into it (live, produciton account) and granted access but I still don’t see ANY webhooks. This part is not described anywhere, I posted a question and got no response and HS support is unable to answer why it’s not working… Can you help with this?
Hey! I just wanted to make this thread aware of our new app, Hooked.
Hooked allows you to easily send a webhook through our app, with a subscription to Marketing, Sales, or Service Professional.
You can send via GET, POST, PATCH, PUT, or DELETE. Super easy to use, and free for up to 60 requests a month.
Cheers,
Matt from Unmatched
@jackcoldrick wrote:
HubSpot provides a number of different APIs and in addition to that we also offer the option of leveraging webhooks. This post discusses this in more detail and also elaborates on different methods of implementation. You can learn more about how that in this video I recorded.
The key difference is that with an API request you are proactively “requesting” information from the system. This may not be required as the data may not have changed since your last request and may not be the most efficient use of your call limit. With a webhook on the other hand you are notified by the system as soon as the data changes without having to continually make API requests. Within HubSpot we have a few ways to use webhooks.
Here is a diagram highlighting the general differences. Notice how with an API we continually make requests despite the data never changing. With a webhook we simply tell the server once to let us know if something happens:
As mentioned you can achieve this in a variety of ways within HubSpot. I’ve broken them down in more detail below. Each have different use cases, strengths and weaknesses so it’s important to qualify in more detail to ensure you know what to position/recommend.
1) Webhooks API: Free and up
This involves setting up an app and subscribing to various events occurring in any portal that your app is installed. Events include Contact, Company and Deal creation, deletions and property updates. The drawback to this is that it doesn’t support Ticket objects. The major advantage is that it’s lightweight and easy to setup. An example of the payload can be found here. More information on our Webhooks API can be found in our developer documentation.
2) Workflow Extensions API: Marketing Pro and up
This can only be used in contact based workflows. The big advantage is that it lets you customize the payload you wish to send to your webhook URL which makes things easier for your development team to process. It’s also much more user friendly for the marketing team who are creating workflows. The big limitation is that it’s only usable in Contact workflows (although there are plans to extend this to other types of workflow in the future). An example of the payload can be found here. More information on the workflow extensions API can be found in our developer documentation.
3) Workflow/Bot Webhook Action: Operations Hub Professional only
This can be used in all workflows namely Contact, Company, Deal, Ticket and Quote and/or Bot. HubSpot will post all of the object data to the webhook URL. There is no option to customize the payload. The advantage is that you can leverage it in all workflows. An example of the payload can be found here, More information on using the webhook action in a workflow can be found in our developer documentation. Information on using workflows in bots can be found here.
The analogy I like to use is that imagine you have a friend you continually text asking when they’re having a party (API request). Every time they respond with the same answer… No. So instead you tell your friend once to simply notify you when they’re having a party (Webhook) so you don’t have to keep texting them.
If you’ve any questions at all please do not hesitate to leave a comment below. Alternatively check out this video where I walk through all of the above.
In the context of integrating with HubSpot, can anyone share their experiences or best practices when choosing between Webhooks and APIs? Specifically, how do you determine when to use the Webhooks API versus the Workflow Extensions API or the Workflow/Bot Webhook Action for different project requirements?
