Description
n8n-nodes-hubspot-advanced


Advanced HubSpot nodes for n8n with intelligent rate limiting, batch operations, association hydration, file management, and list operations.
π View detailed version history
Features
- β Intelligent Rate Limiting β Respects HubSpot API limits with adaptive throttling
- β Automatic Pagination β ReturnAll option across all nodes for effortless large dataset retrieval
- β Batch Operations β Efficient bulk create, update, delete, read, and association hydration using HubSpot’s batch APIs
- β Field-Name Mapping β User-friendly property mapping for batch operations with dropdown selection
- β Association Hydration β Fetch full associated objects in a single workflow step with batch support
- β Association Labels β Create associations with custom labels during object creation
- β Multi-API Version Support β v1, v3, v3-legacy, and v4 endpoints
- β
Type-Safe β Full TypeScript implementation with improved type safety (74% reduction in
anytypes) - β Modular Architecture β Clean separation of concerns with dedicated field descriptions and operations
- β Test-Driven β Comprehensive test coverage
- β File Management β Upload, replace, update properties, and search files in HubSpot File Manager
- β List Operations β Retrieve list members efficiently with object type filtering
- β Marketing Events β Create, manage, and track marketing events with participant registration
- β HubDB Operations β Manage HubDB tables and rows with full CRUD support and publication control
- β CMS Blog Management β Create, update, schedule, and manage blog posts and blog tags
- β CMS Pages Management β Manage site pages and landing pages with publish, schedule, and batch delete
- β Dynamic Property Loading β Enhanced property selection with real-time options
- β Association Label Support β Filter and manage associations with custom labels using AND/OR logic
- β Field Validation β Comprehensive validation with helpful error messages and hints
Installation
Community Nodes (Recommended)
1. Open n8n
2. Go to Settings β Community Nodes
3. Search for n8n-nodes-hubspot-advanced
4. Click Install
Manual Installation
npm install n8n-nodes-hubspot-advanced
For self-hosted n8n, add to your package.json and rebuild.
Nodes
1. HubSpot CRM
Advanced CRM operations with search, filtering, and batch support.
Operations:
Key Features:
Example Workflow:
[HubSpot CRM: Search]
Operation: Search
Object Type: Contacts
Filters:
- email CONTAINS "@acme.com"
- lifecyclestage IN "lead;customer;opportunity" // semicolon-separated
- email IN {{ $json.emails }} // or array expression
- amount BETWEEN 1000 and 5000 // range filter
Properties: firstname,lastname,email,company
Sort: createdate DESC
Limit: 100
Batch Create Example:
[Input: 100 deals from CSV] β [
{ "name": "Deal 1", "value": "1000", "stage": "qualified" },
{ "name": "Deal 2", "value": "2000", "stage": "proposal" },
...
]
β
[HubSpot CRM: Batch Create]
Object Type: deals
Property Mappings:
- HubSpot Property: "dealname" β Input Field: "name"
- HubSpot Property: "amount" β Input Field: "value"
- HubSpot Property: "dealstage" β Input Field: "stage"
β
Output: 100 created deals
API Calls: 1 (instead of 100!)
Batch Update Example:
[Input: 50 contacts to update]
β
[HubSpot CRM: Batch Update]
Object Type: contacts
ID Field: "contact_id"
Property Mappings:
- HubSpot Property: "firstname" β Input Field: "new_firstname"
- HubSpot Property: "lastname" β Input Field: "new_lastname"
β
Output: 50 updated contacts
API Calls: 1 (instead of 50!)
2. HubSpot Associations
Read and enrich object associations with optional hydration and batch operations.
Operations:
Key Features:
Batch Hydrate Example:
[HubSpot CRM: Search Contacts] β 500 contacts
β
[HubSpot Associations: Batch Hydrate]
From: contacts
To: companies
Properties: name,domain,industry
β
Output: 500 contacts with full company objects embedded
API Calls: ~4 (instead of 500!)
3. HubSpot Forms
Work with HubSpot forms and submissions with advanced field mapping, automatic pagination, and GDPR compliance.
Operations:
Key Features:
Get Submissions Example:
[HubSpot Forms: Get Submissions]
Form: Contact Form
Return All: β (automatically fetches all submissions)
β Retrieves all submissions with automatic pagination
β Internal: 50 submissions per API call
Submit Form Example:
[HubSpot Forms: Submit Form]
Form: Contact Form
Email: john@example.com
Additional Fields:
- Contact: firstname = John
- Contact: lastname = Doe
- Company: name = Acme Corp
Consent & Subscriptions:
- Marketing Emails: β Opted In
- Newsletter: β Opted In
Endpoint: Secure (recommended)
4. HubSpot Object Schema
Retrieve metadata about object types and properties.
Operations:
Key Features:
5. HubSpot Files
Work with HubSpot File Manager for uploading, replacing, updating, and searching files.
Operations:
Key Features:
6. HubSpot Lists
Manage HubSpot lists with full CRUD, member retrieval, and search capabilities.
Operations:
Key Features:
7. HubSpot Marketing Events
Create and manage marketing events with participant tracking.
Event Operations:
Contact Operations:
List Operations:
Key Features:
Example Workflow:
[HubSpot Marketing Events: Create]
Event Name: Product Launch Webinar 2024
Event Organizer: Marketing Team
External Event ID: webinar-2024-q1
Start Date: 2024-03-15T14:00:00Z
Event Type: WEBINAR
β
[HubSpot Marketing Events: Register]
Event: Product Launch Webinar 2024
Identifier Type: Email
Email: john@example.com
β
[HubSpot Marketing Events: Get Participants]
Filter: State = REGISTERED
8. HubSpot HubDB
Manage HubDB tables and rows for dynamic content storage and retrieval.
Table Operations:
Row Operations:
Key Features:
Example Workflow:
[HubSpot HubDB: Get Table]
Table: Product Catalog
β Returns table schema and metadata
β
[HubSpot HubDB: Get Rows]
Table: Product Catalog
Return All: β
Filters: category = "electronics"
Sort: price ASC
β Returns all matching rows with automatic pagination
9. HubSpot CMS Blog
Manage HubSpot CMS blog posts and blog tags.
Operations:
Key Features:
10. HubSpot CMS Pages
Manage HubSpot CMS site pages and landing pages.
Operations:
Key Features:
11. HubSpot CMS Redirects
Manage HubSpot CMS URL redirects with full CRUD support and search capabilities.
Operations:
Key Features:
Example Workflow:
[HubSpot CMS Redirects: Search]
Filters:
- Route Prefix: /old-blog
- Redirect Style: 301
Sort: createdAt
Return All: β
β Returns all matching redirects
12. HubSpot Site Search
Search content across HubSpot-hosted sites and retrieve indexed data for specific assets.
Operations:
Key Features:
Example Workflow:
[HubSpot Site Search: Search]
Query: marketing tips
Content Type: Blog Posts, Site Pages
Domain: blog.example.com
Boost Recent: 10d
Limit: 10
β Returns search results with relevance scoring
Rate Limiting
Adaptive, response-based rate limiting β works reliably even in n8n Queue Mode with multiple workers.
How it works:
1. No pre-counting β doesn’t track requests locally (unreliable in multi-worker setups)
2. Response-header-based β reads X-HubSpot-RateLimit-* headers from every response
3. Adaptive throttling β automatically slows down when Remaining gets low
4. 429 handling β exponential backoff + jitter + Retry-After header support
5. Global coordination β all nodes in the same worker process share pause state via globalThis singleton
6. Concurrent-safe β when 11 requests hit simultaneously, they queue up cleanly
What happens when you hit limits:
Request 1-10: β
Success (remaining: 90)
Request 11: β 429 Rate Limited
β All nodes pause for 10s (exponential backoff)
β Retry automatically (up to 5 attempts)
β Success on retry
No configuration needed β the limiter adapts automatically to your HubSpot tier.
Authentication
Uses existing n8n HubSpot credentials:
1. App Token (recommended for private apps)
– Create a private app in HubSpot
– Copy the access token
– Add as credential in n8n
2. OAuth2 (for public apps)
– Configure OAuth app in HubSpot
– Use n8n’s OAuth2 flow
Development
Setup
git clone https://github.com/yourusername/n8n-nodes-hubspot-advanced.git
cd n8n-nodes-hubspot-advanced
npm install
Scripts
npm run dev # Watch mode (TypeScript)
npm run build # Build for production
npm test # Run tests
npm run test:watch # Test watch mode
npm run test:coverage # Coverage report
npm run lint # Lint code
npm run lint:fix # Fix linting issues
Lokales Testen in n8n
Quick Start:
1. Package bauen und verlinken
npm run build
npm link2. In n8n verlinken
mkdir -p ~/.n8n/nodes
cd ~/.n8n/nodes
npm init -y
npm link n8n-nodes-hubspot-advanced3. n8n starten
n8n start
Bei Γnderungen:
Rebuild
npm run buildn8n neu starten (Strg+C, dann:)
n8n start
Detaillierte Anleitung: Siehe .windsurf/workflows/local-testing.md
Testing Rate Limiter
Um das Rate Limiting zu testen:
1. Erstelle einen Workflow mit 11+ parallelen HubSpot-Requests
2. Verwende einen Free-Tier HubSpot Account (100 req/10s)
3. Beobachte die Logs fΓΌr Backoff-Meldungen
4. Erwartetes Verhalten:
– Requests 1-10: Sofort durchgelassen
– Request 11+: Pause β Retry β Erfolg
Project Structure
src/
βββ nodes/
β βββ HubSpotCrm/ # Main CRM node
β βββ HubSpotAssociations/ # Associations with hydration
β βββ HubSpotForms/ # Forms API
β βββ HubSpotObjectSchema/ # Schema metadata
β βββ HubSpotFiles/ # File Manager operations
β βββ HubSpotLists/ # List member retrieval
β βββ HubSpotMarketingEvents/ # Marketing events and participants
β βββ HubSpotHubDb/ # HubDB tables and rows
β βββ HubSpotCmsRedirects/ # CMS URL redirects
β βββ HubSpotCmsBlog/ # CMS blog posts and tags
β βββ HubSpotCmsPages/ # CMS site pages and landing pages
β βββ HubSpotSiteSearch/ # Site search
βββ transport/
β βββ RateLimiter.ts # Adaptive rate limiting
β βββ HubSpotApiRequest.ts # API wrapper
βββ types.ts # Shared TypeScript typestests/
βββ unit/ # Unit tests
βββ integration/ # Integration tests
βββ fixtures/ # Test data
API Version Support
| Feature | API Version | Node |
|—|—|—|
| CRM Objects (CRUD) | v3 | HubSpot CRM |
| Search | v3 | HubSpot CRM |
| Associations | v4 | HubSpot Associations |
| Batch Read | v3 | All nodes |
| Forms List | v3 | HubSpot Forms |
| Form Submissions | v1 (legacy) | HubSpot Forms |
| Submit Form | v3-legacy (api.hsforms.com) | HubSpot Forms |
| Object Schema | v3 | HubSpot Object Schema |
| File Upload | v3 | HubSpot Files |
| File Replace | v3 | HubSpot Files |
| File Search | v3 | HubSpot Files |
| List Members | v3 | HubSpot Lists |
| Marketing Events (CRUD) | v3 | HubSpot Marketing Events |
| Event Participants | v3 | HubSpot Marketing Events |
| Contact Registration | v3 | HubSpot Marketing Events |
| HubDB Tables (CRUD) | v3 | HubSpot HubDB |
| HubDB Rows (CRUD) | v3 | HubSpot HubDB |
| HubDB Batch Operations | v3 | HubSpot HubDB |
| CMS URL Redirects | v3 | HubSpot CMS Redirects |
| CMS Blog Posts (CRUD) | v3 | HubSpot CMS Blog |
| CMS Blog Tags (CRUD) | v3 | HubSpot CMS Blog |
| CMS Site Pages (CRUD) | v3 | HubSpot CMS Pages |
| CMS Landing Pages (CRUD) | v3 | HubSpot CMS Pages |
| Site Search | v3 | HubSpot Site Search |
Roadmap
any types)Contributing
Contributions welcome! Please:
1. Fork the repository
2. Create a feature branch (git checkout -b feature/amazing-feature)
3. Write tests for your changes
4. Ensure tests pass (pnpm test)
5. Commit your changes (git commit -m 'Add amazing feature')
6. Push to the branch (git push origin feature/amazing-feature)
7. Open a Pull Request
License
MIT
Support
Credits
Built with β€οΈ for the n8n community.
—
Note: This is a community node. It is not officially maintained by n8n or HubSpot.