Polling-based integrations consume unnecessary API requests, introduce latency, and become increasingly difficult to scale as application complexity grows. Event-driven architectures solve these limitations by processing events only when state changes occur.
HubSpot webhooks provide this capability by pushing CRM events directly to your application in real time, eliminating the need for continuous polling.
This guide provides a practical implementation of HubSpot webhooks, covering configuration, event processing, security, error handling, and production readiness.
6 Easy Setup Steps to Build Event-Driven Apps with HubSpot Webhooks
Setting up HubSpot webhooks is a straightforward process as long as you follow the appropriate order of operations. The steps listed below will carry you through app creation and into real-time webhook events.
Step 1: Set Up Your HubSpot Developer Environment
To configure webhooks successfully, you must have a HubSpot Developer account.
- Go to the HubSpot Developer Portal.
- Use your HubSpot account to sign in.
- Create a developer account(If you don’t have)
- Create a Developer Test Account for securely testing your webhook integration.
- Install the latest version of HubSpot CLI (required by the new developer platform)
npm install -g @hubspot/cli@latest hs account auth What you’ll have after this step
What you will have after this step
- ✔ Developer Account
- ✔ Developer Test Account
- ✔ Connected to your HubSpot account with HubSpot
Step 2: Create a HubSpot App
Now create the application that will send webhook events.
Using HubSpot CLI
Run:
hs project create The CLI will ask several questions.
| Configuration | Select |
|---|---|
| Project Type | App |
| Distribution | Marketplace (Public) or Specific Accounts (Private) |
| Authentication | OAuth (for Public apps) or Static Authentication (for Private apps) |
| Features | ☑ Webhooks |
After creation, HubSpot generates a project similar to:
project-folder
│
├── hsproject.json
└── src
└── app
├── app-hsmeta.json
└── webhooks Step 3: Configure Your Webhook
Inside your project, create:
src/app/webhooks/ Create:
webhook-hsmeta.json {
"uid": "webhooks",
"type": "webhooks",
"config": {
"settings": {
"targetUrl": "https://yourdomain.com/webhook",
"maxConcurrentRequests": 10
},
"subscriptions": {
"crmObjects": [
{
"subscriptionType": "object.creation",
"objectType": "contact",
"active": true
}
]
}
}
} This configuration tells HubSpot:
- where to send webhook requests,
- how many concurrent requests to allow,
- which CRM events your app should receive.
Step 4: Subscribe to CRM Events
Choose the events your application should listen for.
Common subscriptions include:
Contact Created
Contact Updated
Deal Created
Deal Updated
Ticket Created
Company Updated
Property Changed Example:
{
"subscriptionType": "object.creation",
"objectType": "contact",
"active": true
} You can create multiple subscriptions inside the same configuration file depending on your business requirements
Step 5: Create a Webhook Endpoint
Next, build the endpoint that receives webhook requests.
Example (Node.js + Express)
const express = require("express");
const app = express();
app.use(express.json());
app.post("/webhook", (req, res) => {
console.log(req.body);
// Your business logic
res.status(200).send("Received");
});
app.listen(3000); Whenever a subscribed CRM event occurs, HubSpot sends an HTTP POST request to this endpoint.
For example:
New Contact
↓
HubSpot
↓
POST /webhook
↓
Your Application
↓
Execute Business Logic Your application can then:
- create records
- update databases
- trigger workflows
- notify other applications
Step 6: Upload, Test, and Deploy Your App
Once everything is configured, upload the project.
hs project upload Install the app into your Developer Test Account.
Then verify the integration by:
- creating a new contact
- updating a deal
- changing a ticket
- submitting a form
If your endpoint receives the webhook request successfully, your event-driven application is ready for production.
What Makes HubSpot Webhooks Essential for Event-Driven Apps
The real value of HubSpot webhooks is that they enable faster, more efficient, and scalable event-driven integration.
| Without Using HubSpot Webhooks | Use HubSpot Webhooks |
|---|---|
| Regular API requests | Notifications in real-time |
| Delayed workflow | Automation in real-time |
| More usage of API | Better API use |
| Slow integrations | Fast and efficient applications |
- ✓ Immediate notice of events
- ✓ Less API polling
- ✓ More efficient process automation
- ✓ Scalable Integration
- ✓ Improved system synchronization
Now that we have covered why HubSpot webhooks matter, we can proceed to the implementation phase and learn how to build an event-driven application with HubSpot webhooks.
How to Secure Your HubSpot Webhook Integration
Webhook URLs are publicly available, and every request needs to be verified before anything is done in your application. HubSpot suggests that you validate the webhook requests to ensure they are secure and safe to execute.
- HTTPS: Make sure your webhook is accessed only through HTTPS for better security.
- Signature verification: Use your app’s client secret in your application to determine that the request is from HubSpot.
- Event validation: Before performing any actions in the webhook, check the event type.
- Business logic: Do not take any action in the webhook until all security checks pass.
- HTTP 2xx Response: After the event is processed, send back an appropriate 2xx response to HubSpot that the event was received.
How to Handle Webhook Retries and Errors
Even with a good webhook integration, there could be network issues, server issues, or timeouts. Learning how HubSpot addresses these difficulties will enable you to build more robust event-driven applications. If your endpoint returns a result of 200 OK
If your endpoint reports a 200 OK.
This means that the webhook is successfully hit and is not sent again; what you have to do is return a 2xx response, which confirms that the webhook was received.
If your endpoint reports a 5xx error in this case.
Here,, which is a 5xx response, we have a server-side issue. HubSpot will keep trying to send to the webhook until it is successful.
If your endpoint is returning a 4xx Error.
A 4xx response indicates that we have made a mistake in config or auth. At present, HubSpot does not retry requests that return this status except for HTTP 429.
If your endpoint responds slowly
If a request does not get a response in 5 seconds, HubSpot will deem it a failure and will continue to try to send it.
It is important to respond with HTTP 200 as soon as possible and handle the webhook asynchronously. By doing so, we minimize any unwanted retries while maintaining the reliability of our integration.
Best practices for implementing HubSpot Webhooks in Production.
A webhook that functions in development is not always ready for production. Before you deploy your integration, check off the following to improve security, reliability, and long-term maintainability. Secure Your Endpoint.
- Deploy your webhook at a public HTTPS address and check each incoming request with HubSpot’s request signature. Respond Fast.
- Return a 2xx HTTP response within 5 seconds. For time-consuming tasks, use background processes to avoid unnecessary retries. Prevent Duplicate Processing.
- Webhooks will fire multiple times. Handle the events in such a way that your application processes them the same but doesn’t create duplicate records. Also watch all the webhooks!
- Log all requests, failed deliveries, and processing results, which in turn will help you to quickly identify and fix issues.
- Scale plan. Use background threads or workers for handling webhooks, which is key in high-traffic times. Test Before Going Live.
- Validate our subscriptions, payload handling, and error scenarios in a Developer Test Account before going to production.
Before going live, it also helps to run through a HubSpot audit checklist to make sure your broader portal is production-ready, not just your webhook endpoint.
Conclusion
HubSpot’s webhooks allow you to develop fast, event-based applications by responding to CRM changes in real time. If you’re exploring how developers are building AI agents with HubSpot, or want to understand why HubSpot MCP matters more than APIs, these are natural next reads.
Via the HubSpot Webhook Guide and implementation of secure HubSpot Webhook Integration, which includes secure Webhook Security, retries, and production best practices, you can put together dependable, scalable solutions that you build out with HubSpot Event Webhooks and the HubSpot Events API.
Frequently Asked Questions
With the regular API, you do the asking. Your app has to go out and ask if there is anything new. HubSpot webhooks work the other way around. HubSpot sends the notification to you the second a subscribed event fires, so you don’t have to wait for the next poll cycle.
Create a contact, update a deal, change a ticket, submit a form run through all of it in the test account first and confirm your endpoint’s actually catching and processing those HubSpot webhook events before you touch production.
Quite a few contact creation and updates, deal creation and updates, ticket creation, company updates, property changes. You pick which ones matter for your app inside your webhook configuration, and you can stack multiple subscriptions in the same file if you need HubSpot webhooks to cover several event types at once.
A 5xx means that HubSpot sees it as a server-related issue on your end, so it will just continue to try to send the webhook until it succeeds. A 4xx usually means something’s off with your config or auth, and HubSpot generally won’t retry those except for 429s. If your endpoint does not respond in 5 seconds, that too is treated as a failure and retried.
Respond fast (< 5 seconds if possible) with a 2xx status. Do any heavy processing in a background job so you are not blocking the response. Also log everything: incoming HubSpot webhook requests, failures, processing outcomes.


1 Comment
Pingback: HubSpot Salesforce Integration 2026: What Works, What Doesn’t