Skip to main content
Hubspot API
SLINKY avatar
Written by SLINKY
Updated over a week ago

The Hubspot API syncs deal and contact information into Airtable. Currently only available for STAFFLINK and Airtable.

Once implemented, please do not change the names of any tables used by the API. Consequently, please also do not change any of the fields that the API feeds data into for each record. If you change data in any of the fields, the API will overwrite it on the next run.

Not all data is available from Hubspot, only selected data that is provided by the Hubspot API.

The following jobs run to syncronise data.

Contacts Job

The Contacts job syncronises Contact data into Airtable and runs every 10 minutes, updating all records modified since the last run time.

Fields For Contacts Table

Hubspot Data

Field Name

Field Type

Owner of the contact

Owner

Single Select

Where the contact came from

External_Source

Single Select

If it was referred by someone

Referred_By

Single Select

First name of contact

First_Name

Text

Last name of contact

Last_Name

Text

Contact email

Email

Text

Contact phone number

Mobile

Text

Job title of the contact

Job_Title

Single Select

Lead statuses as per the list in HS

Lead_Status

Single Select

Persona as per the list in HS

Persona

Single Select

Lifecycle stage

Lifecycle_Stage

Single Select

How they want their comms

Communication_Preferences

Single Select

Contact's hubspot score

Hubspot_Score

Number

Web lead status

Web_Lead_Status

Single Select

Hub membership ID

Agency_Hub_Membership

Number

Internal hubspot ID

_Hubspot_Id

Number

How long to close the contact

Days_To_Close

Number

Where they originally came from

Original_Source

Single Select

Applicants Job

The Applicants job syncronises Seat Applicant data into Airtable and runs every 10 minutes, updating all records modified since the last run time.

Fields For Applicants Table

Hubspot Data

Field Name

Field Type

Name of applicant

Name

Text

Internal Hubspot ID

_Hubspot_Id

Number

Email of applicant

Email

Text

Person who referred the applicant

Referrer

Single Select

Source of the applicant

Lead_Source

Single Select

Persona based on the Hubspot List

Persona

Single Select

Location of the applicant

Location

Single Select

Link to their Resume

Resume

Link

Clients Job

The Clients job syncronises client company data into Airtable and runs every 10 minutes, updating all records modified since the last run time.

Fields For Applicants Table

Hubspot Data

Field Name

Field Type

Stafflink owner of the company record

Owner

Text

Name of the office

Office_Name

Text

Status of the lead

Lead_Status

Single Select

Internal Hubspot ID

_Hubspot_Id

Text

State the company is in

State

Single Select

Address of the company

Address_Line_1

Text

Address of the company

Address_Line_2

Text

Stage of the client lead

Lifecycle_Stage

Single Select

Xero Id from STAFFLINK Xero

Xero_Id

Text

Country of client

Country

Single Select

Is the client archived in HS

Archived

Checkbox

Contact Association Job

The Contact Association job matches a contact to all of the companies it's associated with. It adds to the Contacts table. Runs every 10 minutes.

Additional Fields For Contacts Table

Hubspot Data

Field Name

Field Type

Company Ids linked to contact

Company_Id

Text

Internal Hubspot ID

_Hubspot_Id

Number

Client Association Job

The Client Association job determines the place of the company in the company's heirachy. For example, is it the parent company. Runs every 10 minutes.

Additional Fields For Contacts Table

Hubspot Data

Field Name

Field Type

Company's relation to the hierarchy

RelatedToCompany

Text

Internal Hubspot ID

_Hubspot_Id

Number

Deals Job

The Deals job syncronises Deal data into Airtable and runs every 10 minutes, updating all records modified since the last run time.

Fields for Deals Table

Hubspot Data

Field Name

Field Type

A list of line items in the deal

Line_Items

Text

The owner of the deal (stafflink)

Owner

Single Select

Internal Hubspot Id

_Hubspot_Id

Number

If seat, last working date

Final_Working_Day

Date

Date the deal was lost

Deal_Lost_Date

Date

The name of the deal

Deal_Name

Text

The value of the contract total

Contract_Value

Currency

The date the retainer starts

Retainer_Start_Date

Date

The stage of the deal

Deal_Stage

Single Select

The type oft he deal

Deal_Type

Single Select

The amount of recurring revenue

Monthly_Recurring

Currency

The reason the deal was won

Won_Reason

Single Select

The reason the deal was lost

Lost_Reason

Single Select

The url to the proposal

Proposal_URL

URL

The amount the deal is worth

Amount

Currency

The date the deal was closed

Closed_Date

Date

The pipeline the deal fits into

Pipeline

Single Select

The Hubspot company id

Company_Id

Number

The Hubspot contact person id

Contact_Id

Number

If the deal has been archived

Archived

Checkbox

Hours recommended for CSM support

CSM_Recommended_Hours

Number

When deal was last modified in HS

Hubspot_Last_Modified

Date

Deal Line Items Job

The Deal Line Items job gets the line items for deals and puts them into Airtable. Runs every 10 minutes updating records modified since the last run.

Fields for Deal Line Items Table

Hubspot Data

Field Name

Field Type

Internal Hubspot ID

Record_Id

Text

Name of the line item

Name

Text

Cost price

Cost

Currency

Price with quantity

Price

Currency

SKU

SKU

Text

Last modified date of that line item

LineItemLastModified

Date

Linking Jobs

Linking jobs link data between tables. There are four fields that are involved, two ID fields and two link fields. The API will match records based on the ID fields and link the data using the corresponding link fields for that record. The following links are available, defined by the link between Table A and (->) Table B. Linking threads run every five hours.

Clients -> Contacts

Data

Field Name

Field Type

Id of Table A

_Hubspot_Id

Text

Id of Table B

Company_Id

Text

Link in Table A

Clients

Link

Link in Table B

Contacts

Link

Contacts -> Staff

Data

Field Name

Field Type

Id of Table A

_Hubspot_Id

Text

Id of Table B

_Hubspot_Id

Text

Link in Table A

Contacts

Link

Link in Table B

OS Staff

Link

Contacts -> Deals

Data

Field Name

Field Type

Id of Table A

_Hubspot_Id

Text

Id of Table B

Contact_Id

Text

Link in Table A

Contacts

Link

Link in Table B

Deals

Link

Clients -> Deals

Data

Field Name

Field Type

Id of Table A

_Hubspot_Id

Text

Id of Table B

Company_Id

Text

Link in Table A

Clients

Link

Link in Table B

Deals

Link

Did this answer your question?