Back to Case Studies
2024-06-05

Bulkifying HubSpot: How I Built hubspot-bulkify

By Kilian Trunk
#HubSpot#Node.js#Open Source

Bulkifying HubSpot

When working with large-scale HubSpot implementations, one of the biggest bottlenecks is data ingestion. HubSpot's API is powerful, but rate limits and batch size constraints can make bulk uploads a headache.

That's why I created hubspot-bulkify.

The Problem

Standard API calls are often too slow for thousands of records. You need:

  1. Batching: Grouping records into chunks of 100 or 1000.
  2. Rate Limiting: Ensuring you don't hit the 429 error.
  3. Error Handling: What happens if 1 record in a batch of 100 fails?

The Solution

hubspot-bulkify handles all of this out of the box. Using Bottleneck for rate limiting and a robust batching logic, it ensures your data gets where it needs to go, safely and quickly.

import { batchAndUpload } from "hubspot-bulkify";

await batchAndUpload({
  data: myLargeArray,
  batchSize: 100,
  uploadFunction: myHubspotUploadFunc,
  rateLimit: { maxConcurrent: 2, minTime: 1000 }
});

Check it out on GitHub.

Need similar results?

Let's discuss how we can engineer a custom solution for your HubSpot environment.

Start a Project