HubSpot to PostgreSQL: How to Move Your Data

Move HubSpot into PostgreSQL with Airbyte. Server-side versus client-side incremental, the account-wide rate limit, and giving your application stable views.

Summarize with AI:

Moving HubSpot into PostgreSQL puts CRM records where an application or an internal tool can query them. A customer portal, an onboarding workflow or an admin panel that needs a company's owner or lifecycle stage is far simpler to build against a database it already connects to than against HubSpot's API.

This guide covers the managed path with Airbyte. Nearly all the constraints are on HubSpot's side, and one of them is a distinction in how the connector syncs incrementally that determines whether your rate limit budget goes further or not at all.

HubSpot to PostgreSQL at a glance:

CapabilitySupportedWhat it means for this pipeline
Incremental modesTwo kindsClient-side filtering still pulls the full dataset from the API
Daily rate limitAccount-wideShared with every other app connected to the account
Association streamsConfigurableDefine from and to objects to generate a dedicated stream
Search-backed streamsNeed a lookbackThey can miss records due to API irregularities
VolumeAround 10GBAirbyte's guidance for relational destinations

Why move data from HubSpot to PostgreSQL?

Two situations account for most of these pipelines.

The first is giving an application CRM context without giving it HubSpot credentials. A portal that needs to show an account manager's name reads a local table rather than calling an API with a daily budget shared across the whole business.

The second is joining CRM data to whatever already lives in that database. If you want multi-year trends or cohort analysis across a large portal, a warehouse is the better destination, because HubSpot objects at that scale exceed what a relational destination comfortably holds.

What do you need before you start?

Two credentials, and two agreements with people outside your team:

A Private App or OAuth application. With read scopes on every object you intend to sync. Association streams need read scopes on both objects in the relationship, and custom objects need the custom object read scope.

An agreed share of the daily API budget. The burst limit is per app, so a surge from your sync will not immediately throttle anyone else. The daily limit belongs to the HubSpot account and every connected application draws from it, so find out what else talks to HubSpot before choosing a schedule.

A shortlist of objects your application reads. Select those rather than everything available. On a relational destination this is not only about API budget, it is about staying inside the volume guidance, and HubSpot instances accumulate objects and properties generously.

A PostgreSQL user with write access. On the target schema, ideally one dedicated to synced data. If you already run a Postgres destination on an older connector version, read the migration guide before upgrading.

If your organisation restricts inbound traffic by IP, add the Airbyte Cloud IP addresses to the allow list on the PostgreSQL side before you begin.

How do you build a HubSpot to PostgreSQL pipeline in Airbyte?

Step 1: Decide your objects and associations

List the objects your application reads, and separately list the relationships between them that matter. Those relationships do not fall out of the object streams on their own, and defining them is a configuration step rather than something you can add later without thought. Contacts to companies and deals to companies cover most cases.

Step 2: Configure the HubSpot source

Click Sources in the left navigation, then New Source, and select HubSpot, following adding a source. Authenticate, set a start date, and define each association stream by naming a from object and a to object. Then refresh the source schema, which is the step people forget when a stream they configured stubbornly fails to appear.

Step 3: Configure the PostgreSQL destination

Click Destinations, then New Destination, and select Postgres, following adding a destination. From version 3.0.0 the Postgres destination uses Direct Load architecture, writing records straight to final tables with no intermediate raw tables, and adds its own metadata columns alongside your data.

Step 4: Set a lookback window and expose views

Click Connections, then New connection, select your streams and a deduplicating incremental sync mode. Set a lookback window if you sync the search-backed streams, which include deals, companies, contacts, tickets, leads and the engagement streams, because those can miss records due to irregularities in HubSpot's API.

Then expose views to the consuming application rather than the raw tables, so Airbyte's metadata columns stay invisible and a future schema change can be absorbed in the view rather than breaking whatever reads it.

Why is my incremental sync not saving any API calls?

Because incremental means two different things depending on the stream. Server-side incremental asks HubSpot for records changed since the last sync, and the API returns only those. Client-side incremental asks for everything, receives everything, and discards what the connector has already seen.

Both produce correct data in PostgreSQL. Only the first reduces what you spend against the account's daily budget. Which one a stream uses is a property of that stream rather than a setting you choose, so the value of knowing this is diagnostic: when an incremental sync is unexpectedly slow, this is usually why, and the fix is dropping streams or reducing frequency rather than hunting for a misconfiguration.

Association streams are the pleasant exception. They sync incrementally, fetching associations only for records modified since the last sync, which makes them cheap against your rate limit and a good reason to model relationships properly rather than deriving them later.

What changes when an application reads the result?

Mostly your tolerance for staleness. A dashboard that is a day behind is mildly annoying; a portal showing a customer the wrong account manager is a support ticket. So the schedule on this pipeline is a product decision as much as a technical one, bounded by the API budget you agreed to share.

It also changes what a partial sync looks like. HubSpot records arriving late or missing from a search-backed stream present as an absent customer rather than a slightly wrong total, and whoever reports it will describe a product bug. Set the lookback window, and monitor row counts rather than only sync status.

Finally, give the application a stable interface. Views over the raw tables mean Airbyte's metadata columns stay hidden, association tables can be joined once rather than in every query, and a HubSpot schema change becomes a view edit instead of an incident.

Frequently asked questions

Why is my incremental HubSpot sync still slow?

Some streams use client-side incremental, where the API returns everything and the connector filters locally. The data is correct but there is no reduction in API usage or transfer time.

Is PostgreSQL big enough for HubSpot data?

For a focused set of objects, comfortably. Airbyte recommends relational destinations for roughly 10GB or less, so a large account syncing everything would be better served by a warehouse.

How do I get deal and company relationships into PostgreSQL?

Define an association stream with the from and to objects, grant read scopes on both, then refresh the source schema so the generated stream appears in the catalogue.

Why are records missing from the deals stream?

The search-backed streams can miss records due to irregularities in HubSpot's API. Set a lookback window, which is free against a deduplicating destination.

Can I do this without writing code?

Yes. The setup above is entirely UI-driven. You will want PostgreSQL views so your application reads a stable interface rather than the raw synced tables.

Get your HubSpot data into PostgreSQL

Agree your share of the account's daily API budget, keep the object list tight given the volume guidance, define the association streams you need, set a lookback window on the search-backed streams, and expose views so your application reads a stable interface.

Airbyte's connector catalog includes 600+ pre-built connectors, so CRM data can reach an application and a warehouse at once. For the analytical version, see HubSpot to BigQuery, and for another CRM feeding an application database, Salesforce to PostgreSQL.

Start syncing now →

Integrate with 700+ apps using Airbyte

Move data from 700+ sources into warehouses, lakes, and beyond. Set up pipelines in minutes with pre-built connectors and the Connector Builder.