Pipelines
DocsGitHub5
HubSpot logo

HubSpot

Pull your up-to-date HubSpot CRM data into your data warehouse.

Tables
  • hubspot_raw_contacts5
  • hubspot_raw_companies5
  • hubspot_raw_deals5
  • hubspot_raw_tickets5
  • hubspot_raw_engagements6
Legend
Primary Key
Foreign Key
React Flow mini map
HubSpot Database Schema

Getting started

This package provides a HubSpot CRM v3 connector. It exposes a simple lifecycle and typed domain methods for common objects.

Install

  • Navigate to your project, specifically where you want to install the connector
  • Run bash -i <(curl https://connectors.514.ai/install.sh) hubspot v3 514-labs typescript
  • In the hubspot directory, run npm install && npm run build
  • Update your project's package.json to understand the new connector folder. LLM is great for this!
  • Run npm install from your project root to update your node_modules with the new connector

Quick start

import { createHubSpotConnector } from "@workspace/connector-hubspot";

async function main() {
  const hubspot = createHubSpotConnector();

  hubspot.initialize({
    auth: { type: "bearer", bearer: { token: process.env.HUBSPOT_TOKEN! } },
  });
  await hubspot.connect();

  for await (const contact of hubspot.streamContacts({ pageSize: 100 })) {
    console.log(contact.id);
  }
}

main().catch((err) => {
  console.error(err);
  process.exit(1);
});

See docs/configuration.md for all configuration options.