# CRM

CRM integrations bring your sales pipeline into Peaky: deals and their stages, contacts, and — depending on the CRM — leads and companies. Peaky turns them into pipeline metrics on **Metrics**, which you can use in driver formulas, chart widgets on **Views**, and questions to the AI assistants. You find them under the **CRM** tab on the **Integrations** page.

The general flow is on [Connecting an Integration](/doc/connecting-integrations-XTfOCgvGYz). When your company has more than one legal entity, connect the CRM from the **Integrations** page of the entity that owns the pipeline; connect it again from another entity if that one has its own.

| Integration | How you connect | What Peaky syncs |
|-------------|-----------------|------------------|
| [Hubspot](#hubspot) | Sign in to HubSpot | Deals with their stage history, contacts, leads |
| [Teamleader](#teamleader) | Sign in to Teamleader | Deals and contacts |
| [Twenty](#twenty) | Choose cloud or self-hosted, then sign in | Opportunities with their stage history, people, companies |
| [Attio](#attio) | Sign in to Attio | Not synced yet   |


---

## Pipeline Metrics

The CRM metrics describe your pipeline the way it stood at each month end, not only how it looks today:

* **Opportunities** — how many open deals sat in each stage **as of each month**.
* **Pipeline Value** — how much those deals were worth, per stage, **as of each month**.
* **Pipeline Movements** — deals that moved during the month. For Hubspot and Twenty that is the deals that **entered** a stage; Teamleader does not share stage history, so there it counts the deals that were **updated** during the month.

To build these, each sync reconstructs how long every deal spent in each stage (Hubspot and Twenty). Teamleader only reports a deal's current phase, so Peaky counts each open deal in its current phase from the day it was created until it closes.

When custom metrics are enabled for your company, the synced records are also tables on the **Data** page, so you can build metrics of your own on them — for example lead volume by source.


---

## Hubspot

For HubSpot's step-by-step install, configure, use and disconnect guide, see the [HubSpot Setup Guide](/doc/hubspot-setup-guide-ogYpEJVxKo).

Peaky connects to HubSpot with **read-only** access. It never creates, changes or deletes anything in your HubSpot account, and there is nothing to install or map inside HubSpot: you start the connection from Peaky, and Peaky reads the fields it needs by itself.

### Connect Hubspot


1. Open **Integrations** (during first-time setup, the **Connect your sources** step) and find **Hubspot** under the **CRM** tab.

   ![](https://docs.peaky.ai/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzg2MTc4YjA4LTJjMzMtNGEzMi1iNDJiLWU2MDdlMGY2Mjk3ZC9iNGM1YzA1ZS03OTU1LTRmZWQtYmNhZS1jNWJjZjIxMzBjYjcvU2NyZWVuc2hvdCAyMDI2LTA1LTA4IGF0IDExLjQ0LjQxLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk0OTU3MzAwLCJleHAiOjE3OTUwNDM3MDB9.GgdcUS9xYJ_spNnzlM1YAg1qerjr0fPpRzrohEsWJQw " =903x102")
2. Click **Connect**. HubSpot opens.
3. Sign in if you aren't already, pick the HubSpot account to connect, and click **Choose Account**.
4. Review the access Peaky asks for — read-only access to your **contacts**, **deals**, **leads** and **owners** — and click **Connect app**.

   ![](https://docs.peaky.ai/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzg2MTc4YjA4LTJjMzMtNGEzMi1iNDJiLWU2MDdlMGY2Mjk3ZC85ZjZlZTZhNC03OTg2LTQxNzItYjQzMS01YjQyNDRmMzhiYjEvU2NyZWVuc2hvdCAyMDI2LTA1LTA4IGF0IDExLjQ1LjQyLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk0OTU3MzAwLCJleHAiOjE3OTUwNDM3MDB9.WmXYj3NSNzlBwQgr0O65LzdZ85UVccz0NPshMg2vyis " =1059x741")
5. You return to Peaky. The Hubspot card is marked **Connected** and the first sync starts in the background.

   ![](https://docs.peaky.ai/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzg2MTc4YjA4LTJjMzMtNGEzMi1iNDJiLWU2MDdlMGY2Mjk3ZC80ZGJkYjk3MC1lN2ExLTQ2YTktYjQ5Ni0yMjE1MmVhZDE3MmYvU2NyZWVuc2hvdCAyMDI2LTA1LTA4IGF0IDExLjQ3LjM0LnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk0OTU3MzAwLCJleHAiOjE3OTUwNDM3MDB9.N_rjlmdOQUMytnObYfHnucCVeHRKPuFsP1xhaCU9BT8 " =1257x807")

### What Hubspot syncs

* **Deals** — name, pipeline, stage, amount, currency, exchange rate, ARR, MRR, owner, close date, and the history of stages each deal went through.
* **Contacts** — lifecycle stage and source.
* **Leads** — pipeline, stage and source.

From those, Peaky builds these metrics:

| Metric | What it shows |
|--------|---------------|
| **Opportunities** | Open deals per pipeline and stage, as of each month |
| **Pipeline Value** | Their value per pipeline, stage and currency, as of each month |
| **Pipeline Movements** | Deals that entered a stage during the month, per pipeline and stage |
| **Contacts** | Contacts created in the month, by source |
| **ARR** and **MRR** | ARR and MRR of the deals created in the month, per pipeline, stage and currency |
| **Average Sales Cycle Length** | Per pipeline  |
| **FX Rate** | The average exchange rate on your deals, per currency |

On the **Data** page (when custom metrics are enabled), the **HubSpot** tables are **Deals**, **Contacts**, **Leads** and **Deal Stage Intervals** — how long each deal spent in each stage.

**Leads need a permission that older connections may not have.** Without it, deals and contacts still sync, leads stay empty, and the card shows **Partly synced** with *Not synced: leads.* Click **Reconnect** and approve the access again — see [Fixing a Connection](/doc/fixing-a-connection-jKz29zCMG7). Reconnecting to a **different** HubSpot account resets the connection's settings, because they described the old account's data.

 ![](https://docs.peaky.ai/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzg2MTc4YjA4LTJjMzMtNGEzMi1iNDJiLWU2MDdlMGY2Mjk3ZC8xY2ZiMGIwOC1hZjAzLTQwOWItOTBjYi04NzE2OGEzZWIxYzYvaHVic3BvdC0xLmpwZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk0OTU3MzAwLCJleHAiOjE3OTUwNDM3MDB9.ks--vIW_2_TfjJDqGMyQyBwivV0RSFI6Sl1D-XS9Jf8 " =1600x900")

### Disconnect Hubspot

Open the **more** menu (**...**) on the Hubspot card, choose **Remove** and confirm **Yes, remove** in *Remove Hubspot? Your data will no longer sync.*

 ![](https://docs.peaky.ai/api/files.get?sig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJ1cGxvYWRzLzg2MTc4YjA4LTJjMzMtNGEzMi1iNDJiLWU2MDdlMGY2Mjk3ZC84ZjNiMjBkYi0zMDZkLTQ3MzItOTVlNi1iNjkyNjYzN2NiMmIvU2NyZWVuc2hvdCAyMDI2LTA1LTA4IGF0IDExLjQ5LjAwLnBuZyIsInR5cGUiOiJhdHRhY2htZW50IiwiaWF0IjoxNzk0OTU3MzAwLCJleHAiOjE3OTUwNDM3MDB9.lixBCzl8CjoDR0oPqNvkBd3CLSZTK0uDNIYCyuzWzOQ " =474x100")

The card is no longer marked **Connected** and Peaky can no longer reach your HubSpot account. Nothing changes inside HubSpot. Driver formulas that use Hubspot metrics stop receiving new values; see [Removing an Integration](/doc/fixing-a-connection-jKz29zCMG7#removing-an-integration) for what happens to the data already synced.


---

## Teamleader


1. Find **Teamleader** under the **CRM** tab and click **Connect**.
2. Sign in to Teamleader and approve access.
3. You return to Peaky; the card is marked **Connected** and the first sync starts.

**What syncs:** your **deals** (title, amount, currency, pipeline, current phase, owner, status, and when each was created, closed or last updated) and **contacts**. Teamleader has no leads.

**Metrics:** **Opportunities** and **Pipeline Value** as of each month, **Pipeline Movements** (deals updated in the month), **Average Sales Cycle Length**, and **Contacts** created in the month. Because Teamleader does not keep full stage history, a deal counts in its **current** phase for its whole open life — see [Pipeline Metrics](#pipeline-metrics).


---

## Twenty

Twenty runs on **Twenty Cloud** or on your own server, so Peaky asks which before you sign in.


1. Find **Twenty** under the **CRM** tab and click **Connect**.
2. In **Connect Twenty**, choose **Twenty Cloud** or **Self-hosted**.
3. For a self-hosted instance, enter its **Instance URL** (for example `https://crm.mycompany.com`). It has to be reachable from the internet — see [On-premise and self-hosted servers](/doc/fixing-a-connection-jKz29zCMG7#on-premise-and-self-hosted-servers).
4. Click **Connect**. Peaky registers itself with your instance — there is nothing to create in Twenty yourself — and sends you to your Twenty workspace to approve access.
5. You return to Peaky; the card is marked **Connected** and the first sync starts.

**What syncs:** **opportunities**, **people** and **companies**, plus the stage changes of each opportunity.

**Metrics:** **Opportunities** and **Pipeline Value** per stage as of each month, **Pipeline Movements** (opportunities that entered a stage in the month), **Contacts** (people created in the month) and **Companies** (created in the month). On the **Data** page the tables are **Opportunities**, **People**, **Companies** and **Opportunity Stage Intervals**.


---

## Attio

Attio can be connected — **Connect**, sign in to Attio and approve access — but Peaky does not sync Attio data yet: no metrics or tables come from it, and its syncs show as failed in **Logs**.

---

**Documents**

- [HubSpot Setup Guide](https://docs.peaky.ai/s/052dba34-0c8e-4a5d-90a7-c0572642e54f/doc/hubspot-setup-guide-ogYpEJVxKo)