Package Information
Documentation
n8n-nodes-hubspot-guard
Community node that calls the HubSpot API safely by throttling requests to stay under the 10-second rolling limit and retrying 429 responses with a wait (defaults to 60 seconds fallback).
Why this exists
If you hit an n8n webhook 5 times, you can end up with 5 workflow executions calling HubSpot at the same time. HubSpot enforces a rolling 10-second burst limit and returns 429 when exceeded. This node coordinates requests across concurrent executions (within one n8n process) using a shared limiter.
HubSpot documents the 10-second rolling limit and rate-limit headers here: https://developers.hubspot.com/docs/api/usage-details.
Publish this package
Option 1: Publish to npm (public)
- Create an account at npmjs.com if you don’t have one.
- (Recommended) Use a scoped name so the name isn’t taken. In
package.jsonset:"name": "@YOUR_NPM_USERNAME/n8n-nodes-hubspot-guard"- Example:
@jane/n8n-nodes-hubspot-guard
- Log in and publish:
For a scoped package that should be public:npm login npm run build npm publishnpm publish --access public - In n8n: Settings → Community Nodes → Install and enter the package name (e.g.
@jane/n8n-nodes-hubspot-guard).
Option 2: Publish to a private registry
- Point npm at your registry (e.g. set
registryin.npmrcor usenpm config set registry https://your-registry.example.com). - Run
npm login(if required) andnpm publish. Then install the same package name from that registry in n8n (if n8n is configured to use it).
Option 3: Use without publishing (local tarball)
- In this project folder:
This creates a file likenpm run build npm packn8n-nodes-hubspot-guard-0.1.0.tgz. - In n8n Settings → Community Nodes → Install, choose “Install from a file” (or similar) and select that
.tgzfile.- Or from the machine where n8n runs:
npm install /path/to/n8n-nodes-hubspot-guard-0.1.0.tgzin n8n’s custom nodes directory, depending on your setup.
- Or from the machine where n8n runs:
Install
Install into n8n (Community Nodes UI)
- Publish this package to a registry (private npm is fine), or use the tarball method above; then install it via Settings → Community Nodes in n8n.
Local dev install (Custom extensions)
If you run n8n yourself, you can load this node as a custom extension:
- Build this package:
npm installnpm run build
- Point n8n at the folder (examples):
- Set
N8N_CUSTOM_EXTENSIONSto the absolute path of this project folder, or - Copy the
dist/folder into your configured custom extensions directory.
- Set
Restart n8n, then search for the node HubSpot Guard.
Usage
- Create credentials: HubSpot Private App (Guarded) and paste your private app token.
- Add the node HubSpot Guard and configure:
- Method and Path (e.g.
/crm/v3/objects/contacts) - burstLimit (default
110per 10 seconds; adjust for your app type/tier) - fallbackWaitMs (default
60000ms = 1 minute)
- Method and Path (e.g.
Quick test (reproduces your “5 webhooks at once” case)
- Create a workflow with:
- Webhook Trigger
- HubSpot Guard (calls any lightweight endpoint, like listing a small page of contacts)
- Trigger the webhook 5+ times quickly. You should see:
- Calls are queued, not all executed at once
- If HubSpot returns
429, the node waits (Retry-After / headers / fallback 60s) then retries
The node returns:
statusCodebodyheaders(optional)retriesand totalwaitedMs
Notes / limitations
- The limiter is in-memory per n8n process. If you run multiple n8n instances/workers, you’ll want a Redis-backed shared limiter (Bottleneck supports clustering).
- HubSpot Search endpoints may not include rate-limit headers; in that case the node uses
Retry-Afteror the fallback wait.