Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

feat: add HubSpot component #199

Merged
merged 19 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
338 changes: 338 additions & 0 deletions application/hubspot/v0/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
---
title: "HubSpot"
lang: "en-US"
draft: false
description: "Learn about how to set up a VDP HubSpot component https://github.com/instill-ai/instill-core"
---

The HubSpot component is an application component that allows users to use HubSpot application to do various tasks.
It can carry out the following tasks:

- [Get Contact](#get-contact)
- [Create Contact](#create-contact)
- [Get Deal](#get-deal)
- [Create Deal](#create-deal)
- [Get Company](#get-company)
- [Create Company](#create-company)
- [Get Ticket](#get-ticket)
- [Create Ticket](#create-ticket)
- [Get Thread](#get-thread)
- [Retrieve Association](#retrieve-association)



## Release Stage

`Alpha`



## Configuration

The component configuration is defined and maintained [here](https://github.com/instill-ai/component/blob/main/application/hubspot/v0/config/definition.json).




## Setup


| Field | Field ID | Type | Note |
| :--- | :--- | :--- | :--- |
| Token (required) | `token` | string | Fill in your HubSpot private app access token. Go here for more information: https://developers.hubspot.com/docs/api/private-apps |




## Supported Tasks

### Get Contact

Get contact information using contact ID or Email


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_CONTACT` |
| Contact ID or Email (required) | `contact-id-or-email` | string | Input contact ID or email. If the input has @, it will search the contact using email |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Email Address (optional) | `email` | string | Email address |
| First Name (optional) | `first-name` | string | First name |
| Last Name (optional) | `last-name` | string | Last name |
| Phone Number (optional) | `phone-number` | string | Phone number. Preferably, format is in country code + phone number. Example: +886xxxxxxxxx |
| Company (optional) | `company` | string | Company |
| Job Title (optional) | `job-title` | string | Job title |
| Lifecycle Stage (optional) | `lifecycle-stage` | string | Lifecycle stage. Default format is in small letters, all words are combined. Example: salesqualifiedlead. However, remember to check internal value for custom fields. |
| Contact ID | `contact-id` | string | Contact ID |
| Lead Status (optional) | `lead-status` | string | Lead status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. |






### Create Contact

Create new contact


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_CONTACT` |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Email Address (required) | `email` | string | Email address |
| First Name | `first-name` | string | First name |
| Last Name | `last-name` | string | Last name |
| Phone Number | `phone-number` | string | Phone number. Preferably, format is in country code + phone number. Example: +886xxxxxxxxx |
| Company | `company` | string | Company |
| Job Title | `job-title` | string | Job title |
| Lifecycle Stage | `lifecycle-stage` | string | Lifecycle stage. Default format is in small letters, all words are combined. Example: salesqualifiedlead. However, remember to check internal value for custom fields. |
| Lead Status | `lead-status` | string | Lead status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Contact ID | `contact-id` | string | Contact ID |






### Get Deal

Get deal information using deal ID


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_DEAL` |
| Deal ID (required) | `deal-id` | string | Input deal ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Deal Name | `deal-name` | string | Deal name |
| Pipeline | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Deal Stage | `deal-stage` | string | Deal stage. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. |
| Amount (optional) | `amount` | number | The total amount of the deal |
| Deal Type (optional) | `deal-type` | string | Deal type. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. |
| Close Date (optional) | `close-date` | string | Close date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |






### Create Deal

Create new deal


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_DEAL` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with deal. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Deal Name (required) | `deal-name` | string | Deal name |
| Pipeline (required) | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Deal Stage (required) | `deal-stage` | string | Deal stage. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. |
| Amount | `amount` | number | The total amount of the deal |
| Deal Type | `deal-type` | string | Deal type. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. |
| Close Date | `close-date` | string | Close date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Deal ID | `deal-id` | string | Deal ID |






### Get Company

Get company information using company ID


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_COMPANY` |
| Company ID (required) | `company-id` | string | Input company ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Company Name (optional) | `company-name` | string | Company name |
| Company Domain (optional) | `company-domain` | string | The domain name of the company |
| Description (optional) | `description` | string | Description of the company |
| Phone Number (optional) | `phone-number` | string | Phone number of the company |
| Industry (optional) | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA |
| Company Type (optional) | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER |
| City (optional) | `city` | string | City |
| State (optional) | `state` | string | State |
| Country (optional) | `country` | string | Country |
| Postal Code (optional) | `postal-code,` | string | Postal code |
| Time Zone (optional) | `time-zone` | string | Time zone |
| Annual Revenue (optional) | `annual-revenue` | number | Annual revenue |
| Total Revenue (optional) | `total-revenue` | number | Total revenue. Calculated automatically by HubSpot |
| Linkedin Page (optional) | `linkedin-page` | string | Linkedin page of the company |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |






### Create Company

Create new company


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with company. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Company Name | `company-name` | string | Company name |
| Company Domain (required) | `company-domain` | string | The domain name of the company |
| Description | `description` | string | Description of the company |
| Phone Number | `phone-number` | string | Phone number of the company |
| Industry | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA |
| Company Type | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER |
| City | `city` | string | City |
| State | `state` | string | State |
| Country | `country` | string | Country |
| Postal Code | `postal-code,` | string | Postal code |
| Time Zone | `time-zone` | string | Time zone |
| Annual Revenue | `annual-revenue` | number | Annual revenue |
| Linkedin Page | `linkedin-page` | string | Linkedin page of the company |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Company ID | `company-id` | string | Company ID |






### Get Ticket

Get ticket information using ticket ID


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_TICKET` |
| Ticket ID (required) | `ticket-id` | string | Input ticket ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object |
| Ticket Name | `ticket-name` | string | Ticket name |
| Ticket Status | `ticket-status` | string | Ticket Status. Default format is number. Example: 0. However, remember to check internal value for custom fields. |
| Pipeline | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Category (optional) | `category` | array[string] | Category, main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. |
| Priority (optional) | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. |
| Source (optional) | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL |
| Record Source (optional) | `record-source` | string | How this record was created. |
| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Last Modified Date (optional) | `last-modified-date` | string | Last modified date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z |
| Associated Contact IDs (optional) | `associated-contact-id` | array[string] | Contact IDs associated with the object |






### Create Ticket

Create new ticket


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_CREATE_TICKET` |
| Contact ID or Email | `contact-id-or-email` | string | Use to associate contact with ticket. If the input has @, it will use email, otherwise, it will use contact id. |
| Owner ID | `owner-id` | string | The user who is assigned to the object |
| Ticket Name (required) | `ticket-name` | string | Ticket name |
| Ticket Status (required) | `ticket-status` | string | Ticket Status. Default format is number. Example: 0. However, remember to check internal value for custom fields. |
| Pipeline (required) | `pipeline` | string | Pipeline. HubSpot uses interval value rather than the name displayed in the view |
| Category | `category` | array[string] | Category, main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. |
| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. |
| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Ticket ID | `ticket-id` | string | Ticket ID |






### Get Thread

Retrieve all the messages inside a thread (conversation inbox)


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_GET_THREAD` |
| Thread ID (required) | `thread-id` | string | Input thread ID |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Messages | `results` | array[object] | An array of messages |






### Retrieve Association

Get the object IDs associated with contact ID (contact->objects). If you are trying to do the opposite (object->contacts), it is possible using the other tasks. Example: Go to get deal task to obtain deal->contacts


| Input | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Task ID (required) | `task` | string | `TASK_RETRIEVE_ASSOCIATION` |
| Contact ID (required) | `contact-id` | string | Input contact ID |
| Object Type (required) | `object-type` | string | Input object type (CRM objects or 'Threads'). Note: CRM objects include 'Deals', 'Companies', 'Tickets', etc |



| Output | ID | Type | Description |
| :--- | :--- | :--- | :--- |
| Object ID Array | `results` | array[object] | An array of object ID |







3 changes: 3 additions & 0 deletions application/hubspot/v0/assets/HubSpot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading