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

# HubSpot

> Connect 4MINDS to HubSpot to import CRM data for AI-powered analysis

## Overview

The 4MINDS platform integrates with **HubSpot**, allowing you to import CRM data directly into your 4MINDS models. You can pull in contacts, companies, deals, tickets, and other CRM objects — making them available for AI-powered querying, knowledge graph construction, and retrieval.

***

## Getting Started

### Prerequisites

* A HubSpot account with access to the CRM objects you want to import
* A 4MINDS account with access to the Integrations page

### Connecting Your HubSpot Account

1. Sign in to [4MINDS](https://app.4minds.ai).
2. Navigate to the **Integrations** page from the main navigation bar.
3. Locate the **HubSpot** integration card and click on it.
4. Click **Connect with HubSpot**. You will be redirected to HubSpot's OAuth authorization screen.
5. Sign in to HubSpot (or use an existing session) and approve the requested scopes.
6. Once authorized, you will be redirected back to 4MINDS and the connection will be established.

### Disconnecting

To disconnect your HubSpot account, open **Integrations** from the main navigation bar, find HubSpot, and click **Disconnect**. This removes your stored credentials and revokes access.

***

## OAuth Scopes

When you connect your HubSpot account, 4MINDS requests the following OAuth scopes:

| Scope                        | Description                |
| ---------------------------- | -------------------------- |
| `crm.objects.contacts.read`  | Read contact records       |
| `crm.objects.companies.read` | Read company records       |
| `crm.objects.deals.read`     | Read deal records          |
| `crm.objects.orders.read`    | Read order records         |
| `crm.objects.owners.read`    | Read owner/user records    |
| `crm.schemas.custom.read`    | Read custom object schemas |
| `crm.import`                 | Import CRM data            |
| `tickets`                    | Read ticket records        |
| `files`                      | Access file attachments    |
| `oauth`                      | OAuth authentication       |

> **Note:** You must have sufficient permissions in your HubSpot account for each scope. If a scope is not available for your HubSpot plan, the corresponding data type may not be importable.

***

## Importing Data

### Creating a Model with HubSpot Data

1. Navigate to the **Models** page and click **Create Model**.
2. Provide a **name** and **use case** for the model (e.g., "HubSpot CRM Test" / "Analyze imported CRM data"). Press **Next**.
3. On the **Upload Data** step, select the **Integrations** option.
4. Scroll down to the **Enterprise** group.
5. Choose **HubSpot** from the connected integrations list.
6. Select the objects you'd like to import (contacts, companies, deals, tickets, etc.).
7. Confirm the import and create the model.

Once processing completes, the dataset will be available for AI-powered querying, knowledge graph construction, and retrieval on the **Models** page.

### Querying Your Data

1. Find the model you created on the **Models** page.
2. Click the **Run** button.
3. On the chat interface, send a prompt or query to get AI-generated responses about your HubSpot data.

### Combining with Other Sources

HubSpot data can be combined with files from other sources in the same model. For example, you can import HubSpot contacts alongside Google Drive documents or uploaded files.

***

## Available Data Types

The following HubSpot CRM objects can be imported into 4MINDS:

| Data Type     | Description                                                                            |
| ------------- | -------------------------------------------------------------------------------------- |
| **Contacts**  | Contact records — names, emails, phone numbers, lifecycle stage, and custom properties |
| **Companies** | Company records — name, domain, industry, revenue, and associated contacts             |
| **Deals**     | Deal records — deal name, stage, amount, close date, and pipeline information          |
| **Tickets**   | Support ticket records — subject, status, priority, and associated contacts            |
| **Orders**    | Order records — order details and associated deal/contact information                  |
| **Owners**    | HubSpot user/owner records — name, email, and team assignment                          |

***

## Troubleshooting

| Issue                             | Solution                                                                                                             |
| --------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **"No HubSpot connection found"** | Open Integrations from the main nav and connect your HubSpot account via OAuth.                                      |
| **OAuth authorization fails**     | Ensure you have admin or sufficient permissions in your HubSpot account to authorize third-party apps.               |
| **Missing data types**            | Some CRM objects may not be available depending on your HubSpot plan (Starter, Professional, Enterprise).            |
| **No data returned**              | The selected object type may be empty in your HubSpot account (e.g., no deals created yet).                          |
| **Connection expired**            | The platform automatically refreshes OAuth tokens. If issues persist, disconnect and reconnect your HubSpot account. |
| **Popup blocked during OAuth**    | Enable popups for the 4MINDS site in your browser settings, then try again.                                          |

***

## Security & Privacy

* **OAuth 2.0:** Connections use industry-standard OAuth 2.0. Your HubSpot credentials are never stored by 4MINDS.
* **Encrypted tokens:** All access tokens are encrypted at rest.
* **Automatic token refresh:** OAuth tokens are refreshed automatically before they expire, so you stay connected without re-authenticating.
* **Per-user access:** Each user connects their own HubSpot account. Your HubSpot connection is not shared with other users on the platform.

***

## FAQ

**Q: What HubSpot data can I access?** A: You can access contacts, companies, deals, tickets, orders, and owners — any CRM object that your HubSpot account has permissions for.

**Q: Can I import HubSpot data into an existing model?** A: Yes. You can add HubSpot data to both new and existing models, and combine it with data from other sources.

**Q: What happens to my data if I disconnect my HubSpot account?** A: Previously imported data remains in your models. However, you will not be able to import new data from HubSpot until you reconnect.

**Q: Do I need a specific HubSpot plan?** A: The integration works with HubSpot Free, Starter, Professional, and Enterprise plans. However, some CRM objects (like custom objects) may only be available on higher-tier plans.

**Q: Can I connect multiple HubSpot accounts?** A: Each user account on 4MINDS supports one HubSpot connection at a time. To switch accounts, disconnect the current one and connect with a different HubSpot account.
