# Hubspot

The Hubspot skill enables you to interact with Tickets and Contacts from your own Hubspot environment.&#x20;

## Installing the Hubspot skill

The Hubspot skill isn't installed automatically with your Smart App. Therefore you need to install it manually in the DialoX studio.

Go to Packages -> Browse skills and search for the Hubspot integration skill.

{% hint style="info" %}
If you don't see this skill here, it needs to be added to your account. Please consult your partner or Enreach DialoX support team.
{% endhint %}

## Creating Hubspot API Token

To connect the bot to your Hubspot environment you will need an API token.

The API Token is your access token that needs to be created in the Hubspot 'Integrations' section. To create this token we need to create a **Private app**:

* Log in with your admin user in Hubspot and go to **Hubspot Settings** > **Account Management** > **Integrations** > **Private App**
* Create a private app

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FFYLyWE0XOXFsmq0qAMr1%2Fimage.png?alt=media&#x26;token=ebb3f044-201d-4013-bca8-735a790cecbc" alt=""><figcaption></figcaption></figure>

* Fill in the **Basic information** *(name, logo…)*:

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FHfURdo5xLTqQI6Bi9HA6%2Fimage.png?alt=media&#x26;token=bcafcfcc-cdb3-4c77-b5e3-1517847931fc" alt=""><figcaption></figcaption></figure>

* Choose the **Scopes for the App** *(the scopes are the access permissions to the app: read contacts, create tickets…). For example:*
  * To **create and search tickets** choose the scopes&#x20;
    * **Other** > **tickets**
  * To **create and search contacts** choose the scopes:
    * &#x20;**CRM** > **crm.objects.contacts.read**
    * &#x20;**CRM** > **crm.objects.contacts.write**

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FFO131Sdb3GJDgfI9Lx4J%2FCleanShot%202025-01-29%20at%2012.31.04%402x.png?alt=media&#x26;token=5cb5dd32-7167-42a8-8e99-a6f910ffb911" alt="" width="563"><figcaption></figcaption></figure>

* Create the app and copy the access token

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FKDGkXW2kUvrE30MYFklG%2FCleanShot%202025-01-29%20at%2012.32.51%402x.png?alt=media&#x26;token=cd95d1db-530f-4eb5-b1fe-af9f2845f021" alt="" width="375"><figcaption></figcaption></figure>

* Navigate back to your app in DialoX, then to 'Integrations - Secrets'.
* Paste the token which was provided when creating the private app

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2F3fY7kLjQUN7ET1iLr7ZS%2FCleanShot%202025-01-29%20at%2012.34.33%402x.png?alt=media&#x26;token=9dbf62ce-30c6-499c-8131-b40347c3e842" alt=""><figcaption></figcaption></figure>

## Implement Hubspot in your Flow

After installing the skill and storing the credentials. You can use the Hubspot nodes in your flow.&#x20;

1. Hubspot: Create ticket\
   This will allow you to create new tickers in your Hubspot environment.&#x20;
2. Hubspot: Get ticket\
   Retrieve the current status of a ticket. Useful for customers when their ticket might be pending.
3. Hubspot: Create contact\
   Create a Hubspot contact based on contact details extracted in the conversation.
4. Hubspot: Search contact\
   Look up a Hubspot contact via their phone number or email address. The details of the user found will be stored in the Hubspot contact variables.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FVIXDge68oYgeziAIgC0z%2FCleanShot%202025-01-29%20at%2012.38.18%402x.png?alt=media&#x26;token=a781b9dc-ef16-43c6-a136-c9a931bcbf05" alt="" width="375"><figcaption></figcaption></figure>

## Hubspot variables

When looking up a ticket or a user from Hubspot, the following "Hubspot Ticket" and "Hubspot contact" variables will be filled:

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FA7odEhYtonPHVgw7s6OR%2FCleanShot%202025-01-29%20at%2012.39.04%402x.png?alt=media&#x26;token=702e0b7d-3c22-451b-adb3-f93a8013f183" alt=""><figcaption></figcaption></figure>
