How to sync large amounts of contacts from the HubSpot API
Blog post from Nango
Building a production-ready HubSpot contacts sync involves addressing the limitations of HubSpot's API endpoints, which restrict searches to 10,000 results and lack filtering capabilities on the basic list endpoint. A two-phase sync approach is recommended, using the basic list endpoint for an initial backfill without a cap, followed by the search endpoint for incremental updates filtered by lastmodifieddate. This solution requires durable checkpoints, resumable execution, and handling OAuth token refreshes, rate limits, and webhooks. Nango provides a platform to simplify this process by offering managed authentication for over 700 APIs, including HubSpot, and tools like the AI Function Builder skill to help generate the necessary sync logic efficiently. The integration is enhanced with infrastructure support for token management, retries, rate limit handling, and webhook routing, making it suitable for syncing not only contacts but also companies, deals, tickets, and more.