> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zwiron.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HubSpot Setup Guide

> Install, connect, configure, and sync HubSpot CRM data to your warehouse with Zwiron — OAuth setup, scopes, pipelines, disconnect, and uninstall.

**Zwiron** connects **HubSpot CRM** to your data warehouse so analytics, BI, and ops teams work from an up-to-date copy of CRM data — without manual exports or brittle scripts.

With this integration you can:

* Sync **contacts, companies, deals, tickets, products, and line items** from HubSpot into Snowflake, BigQuery, and other Zwiron destinations
* Use **Full Refresh** or **Incremental** sync (cursor: `hs_lastmodifieddate`)
* Authorize with **Sign in with HubSpot** (OAuth) — no long-lived private app tokens required for customers
* Schedule recurring syncs and monitor runs in one place

|                 |                                              |
| --------------- | -------------------------------------------- |
| **Source**      | ✅                                            |
| **Destination** | —                                            |
| **Sync modes**  | Full Refresh, Incremental                    |
| **Auth**        | OAuth 2.0 (recommended) or Private App token |

***

## Install and connect HubSpot

Zwiron uses a **partner sign-in** flow: users sign into Zwiron first, then authorize HubSpot.

### 1. Create a Zwiron account

1. Go to [zwiron.com/login](https://zwiron.com/login?mode=signup) and create an account (or sign in if you already have one).

### 2. Create a HubSpot source connection

1. In Zwiron, open **Connections** in the left sidebar.
2. Click **New Connection**.
3. Select **HubSpot** as the connector type.
4. Choose **Hosted** execution mode (HubSpot is a cloud API — no agent required).
5. Click **Sign in with HubSpot**.

### 3. Authorize HubSpot

1. HubSpot opens an OAuth screen — select the **HubSpot account** you want to connect.

2. Click **Choose account**.

3. Review the requested scopes. Zwiron requests **read-only** access to sync CRM data into your warehouse:

   | Scope                        | Purpose                      |
   | ---------------------------- | ---------------------------- |
   | `oauth`                      | OAuth authentication         |
   | `crm.objects.contacts.read`  | Contacts                     |
   | `crm.objects.companies.read` | Companies                    |
   | `crm.objects.deals.read`     | Deals                        |
   | `crm.schemas.contacts.read`  | Contact property definitions |
   | `crm.schemas.companies.read` | Company property definitions |
   | `crm.schemas.deals.read`     | Deal property definitions    |
   | `tickets`                    | Tickets                      |
   | `e-commerce`                 | Products and line items      |

4. Click **Connect app**.

5. You are returned to Zwiron with the connection authorized.

<Note>
  Add screenshots of the Zwiron connection screen, HubSpot account picker, and scope approval screen to this page before HubSpot certification review. Listing review requires clear install/configure steps; images are required for certification.
</Note>

### 4. Scan and save

1. Zwiron runs a **Scan** to discover available CRM object streams (contacts, companies, deals, etc.).
2. When the scan completes, click **Save** to store the connection.

***

## Configure the integration

### Profile the connection (recommended)

After saving, **profile** the connection so Zwiron can estimate table sizes before trial or production jobs.

### Create a pipeline (job)

1. Open **Jobs** in the sidebar.
2. Click **New Job** and name the job (e.g. `hubspot-to-snowflake-crm`).
3. Select your **HubSpot** connection as the **source**.
4. Select your **warehouse** connection as the **destination** (e.g. Snowflake or BigQuery).
5. Select the **streams** to sync (contacts, companies, deals, tickets, products, line\_items, etc.).
6. Choose a **sync mode**:
   * **Full Refresh** — reloads the full table each run (simplest; good for smaller datasets).
   * **Incremental** — syncs only records modified since the last run using `hs_lastmodifieddate`.
7. Set a **schedule** (e.g. hourly or daily) or leave manual.
8. Click **Save & Run** to start the first sync immediately.

Destination tables are created automatically if they do not exist.

### Optional: Private App token

OAuth is the recommended path for Marketplace installs. For advanced setups, you can use a **HubSpot Private App** access token instead:

1. In HubSpot: **Settings** → **Integrations** → **Private Apps** → **Create private app**.
2. Grant the scopes listed above.
3. In Zwiron, paste the token (`pat-na2-...`) into the connection form instead of using OAuth.

***

## What you can sync

| Stream       | Primary key | Incremental cursor    |
| ------------ | ----------- | --------------------- |
| `contacts`   | `id`        | `hs_lastmodifieddate` |
| `companies`  | `id`        | `hs_lastmodifieddate` |
| `deals`      | `id`        | `hs_lastmodifieddate` |
| `tickets`    | `id`        | `hs_lastmodifieddate` |
| `products`   | `id`        | `hs_lastmodifieddate` |
| `line_items` | `id`        | `hs_lastmodifieddate` |

Data flows **one way**: **HubSpot → Zwiron → warehouse**. Zwiron does not write back to HubSpot.

***

## Use the app

After a job is saved with a schedule, syncs run automatically on that schedule. You can also:

* Open **Jobs** → select a job → **Run now** for a manual sync.
* Open **Runs** to view status, row counts, and errors.
* Use **Catalog** and **Data Quality** after syncs to inventory and validate landed data.

Incremental jobs fetch only records where `hs_lastmodifieddate` is newer than the last successful cursor. First run behaves like a full load for each stream.

***

## Disconnect HubSpot from Zwiron

Disconnecting stops future syncs from that HubSpot portal but does **not** delete data already loaded into your warehouse.

1. Sign in to Zwiron.
2. Open **Connections**.
3. Select the HubSpot connection.
4. Click **Delete** (or disconnect/remove, depending on your Zwiron version).
5. Confirm deletion.

**Effect:** Zwiron can no longer call the HubSpot API for that portal. Scheduled jobs using this connection will fail until you connect a different source or delete those jobs. **Existing warehouse tables and historical data are not removed** by disconnecting.

***

## Uninstall Zwiron from HubSpot

To remove Zwiron's access from your HubSpot account entirely:

1. In HubSpot, go to **Settings** → **Integrations** → **Connected Apps**.
2. Find **Zwiron** in the list.
3. Click **Disconnect** or follow HubSpot's uninstall steps.

For full instructions, see HubSpot's article: [Connect apps to HubSpot — uninstall an app](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot#uninstall-an-app).

**Effect:** OAuth tokens are revoked. Zwiron connections using that portal stop working. Data previously synced to your warehouse remains until you delete those tables yourself.

***

## Notes

* HubSpot's CRM Search API returns up to 10,000 records per query; Zwiron paginates automatically.
* HubSpot enforces rate limits (typically 100 requests per 10 seconds per token). Zwiron backs off on `429` responses and retries.
* Bulk-imported records may have a `null` `hs_lastmodifieddate`; they are included in the first full refresh but may be skipped by incremental gap checks until properties change.

***

## Support

* Email: [support@zwiron.com](mailto:support@zwiron.com)
* Product: [zwiron.com](https://zwiron.com)
* Pricing: [zwiron.com/pricing](https://zwiron.com/pricing)
