# HubSpot

## 1. How to connect to HubSpot?

### OAuth 2.0

You can follow the following steps to build a connection with your HubSpot. If you need any help in setting up your integration, please [contact us](/master.md#how-to-contact-us).

1\. Go to the **Resources** page and click the **Add Resource** button.

2\. In the "Select a data source" step, select **HubSpot** under **Application**.

3\. Click the <img src="/files/ijnPpLusWPo9X5sbFykh" alt="" data-size="line"> button to log in with your HubSpot account.

4\. After successfully logging in, you'll be redirected back to Acho. Please fill in the required fields and click <img src="/files/DWMgVlTNK11fi1FdTZ2D" alt="" data-size="line">.

5\. Select the tables you wish to sync on the next page and click **Finish Setup**.

6\. You will see a  <img src="/files/-MgBo4LSmdK4OS-NqLZy" alt="" data-size="line"> icon next to your HubSpot resource. It may take a few minutes to several hours, depending on the data size and the number of your tables. Once your APP's data is ready, you will receive a notification email.&#x20;

### API Key

{% hint style="danger" %}
API key will be deprecated after November 30, 2022. See [HubSpot's post](https://developers.hubspot.com/changelog/upcoming-api-key-sunset?utm_campaign=customer-marketing\&utm_medium=email\&utm_content=220909393\&utm_source=hs_automation) for more details. If you set up your resource with an API key previously and need help migrating to OAuth 2.0, please [contact us](/master.md#how-to-contact-us).
{% endhint %}

1\. Go to the **Resources** page and click the **Add Resource** button.

2\. In the "Select a data source" step, select **HubSpot** under **Application**.

3\. In the "Configure the data source" step, enter the following information:

* **`Start Date (UTC)`**: Retrieve data from a specific date and time. The date should be defined in  UTC date and time, such as 2017-01-25T00:00:00Z.
* **`API Key`**: Find your API key [here](#2.-how-to-get-the-api-key-from-hubspot).

4\. Select the tables you wish to sync on the next page and click **Finish Setup**.

5\. You will see a  <img src="/files/-MgBo4LSmdK4OS-NqLZy" alt="" data-size="line"> icon next to your HubSpot resource. It may take a few minutes to several hours depending on the data size and the number of your tables. Once your APP's data is ready, you will receive a notification email. ready, you will receive a notification email.&#x20;

## 2. How to get the API key from HubSpot?

{% hint style="danger" %}
API key will be deprecated after November 30, 2022. See [HubSpot's post](https://developers.hubspot.com/changelog/upcoming-api-key-sunset?utm_campaign=customer-marketing\&utm_medium=email\&utm_content=220909393\&utm_source=hs_automation) for more details. If you set up your resource with an API key previously and need help migrating to OAuth 2.0, please [contact us](/master.md#how-to-contact-us).
{% endhint %}

To allow Acho to connect to your HubSpot account, you have to get the API key. Here are the instructions about how to acquire it.

{% hint style="info" %}
You must have [Super Admin permissions](https://knowledge.hubspot.com/settings/hubspot-user-permissions-guide?__hstc=45788219.78c31a6a1ef939bde78914f7fa0fd849.1624607212906.1624607212906.1624607212906.1&__hssc=45788219.1.1624607212907&__hsfp=1000307879&_ga=2.230712409.756209440.1624607210-1620574245.1624607210#super-admin) to access your account's API key.
{% endhint %}

1\. Go to your HubSpot account and click the **settings icon** on the top navigation bar.

2\. In the left sidebar menu, navigate to **Integrations** > **API key**.

* If a key has never been generated for your account, click **Generate API** **key**.
* If you've already generated an API key, click **Show** to display your key.

![](/files/-Mf4k9pFEONwInDnyLgV)

3\. With the key displayed, click **Copy** to copy the key. You can then paste the key to Acho.

## 3. How to set up Data Sync?

Acho supports creating schedulers to retrieve the latest data from your HubSpot account at a certain time interval. To see more details, you can visit [here](https://docs.acho.io/data-sync/untitled).

## 4. Available Data

* [Campaigns](https://developers.hubspot.com/docs/methods/email/get_campaign_data)
* [Companies](https://developers.hubspot.com/docs/api/crm/companies) (Incremental)
* [Contact Lists](http://developers.hubspot.com/docs/methods/lists/get_lists) (Incremental)
* [Contacts](https://developers.hubspot.com/docs/methods/contacts/get_contacts) (Incremental)
* [Contacts List Memberships](https://legacydocs.hubspot.com/docs/methods/contacts/get_contacts)
* [Deal Pipelines](https://developers.hubspot.com/docs/methods/pipelines/get_pipelines_for_object_type)
* [Deals](https://developers.hubspot.com/docs/api/crm/deals) (including Contact associations) (Incremental)
* [Email Events](https://developers.hubspot.com/docs/methods/email/get_events) (Incremental)
* [Engagements](https://legacydocs.hubspot.com/docs/methods/engagements/get-all-engagements) (Incremental)
* [Engagements Calls](https://developers.hubspot.com/docs/api/crm/calls) (Incremental)
* [Engagements Emails](https://developers.hubspot.com/docs/api/crm/email) (Incremental)
* [Engagements Meetings](https://developers.hubspot.com/docs/api/crm/meetings) (Incremental)
* [Engagements Notes](https://developers.hubspot.com/docs/api/crm/notes) (Incremental)
* [Engagements Tasks](https://developers.hubspot.com/docs/api/crm/tasks) (Incremental)
* [Feedback Submissions](https://developers.hubspot.com/docs/api/crm/feedback-submissions) (Incremental)
* [Forms](https://developers.hubspot.com/docs/api/marketing/forms)
* [Form Submissions](https://legacydocs.hubspot.com/docs/methods/forms/get-submissions-for-a-form)
* [Line Items](https://developers.hubspot.com/docs/api/crm/line-items) (Incremental)
* [Marketing Emails](https://legacydocs.hubspot.com/docs/methods/cms_email/get-all-marketing-email-statistics)
* [Owners](https://developers.hubspot.com/docs/methods/owners/get_owners)
* [Products](https://developers.hubspot.com/docs/api/crm/products) (Incremental)
* [Property History](https://legacydocs.hubspot.com/docs/methods/contacts/get_contacts) (Incremental)
* [Quotes](https://developers.hubspot.com/docs/api/crm/quotes) (Incremental)
* [Subscription Changes](https://developers.hubspot.com/docs/methods/email/get_subscriptions_timeline) (Incremental)
* [Tickets](https://developers.hubspot.com/docs/api/crm/tickets) (Incremental)
* [Ticket Pipelines](https://developers.hubspot.com/docs/api/crm/pipelines)
* [Workflows](https://legacydocs.hubspot.com/docs/methods/workflows/v3/get_workflows)

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acho.io/acho-studio/resources/import-data/hubspot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
