Skip to main content

Programmers reference for HubSpot Writer

In TQL, you specify the writer type by providing its fully qualified name. To use this writer, specify Global.HubSpotWriter when creating a target. This identifies the specific writer implementation to use and allows you to configure its connection and behavior through the available properties.

HubSpot Writer properties

property

type

default value

notes

Application error count threshold

Integer

0

Maximum number of errors before stopping the application. Set to 0 for unlimited errors.

Auth mode

OAuth | PrivateAppToken

OAuth

Authentication method. Required.

Batch policy

String

eventCount:100, Interval:60

Batch processing configuration. Defines when to flush batches based on event count or time interval (in seconds).

Client ID

String

OAuth client ID. Required for OAuth authentication mode.

Client secret

Password

OAuth client secret. Required for OAuth authentication mode.

Connection profile name

String

Name of the connection profile. Required if Use connection profile is true.

Ignorable exception

String

Exception patterns to ignore. Errors matching this pattern will not count toward the error threshold.

Private app token

Password

Private app token for simplified authentication. Required for PrivateAppToken authentication mode.

Refresh token

Password

OAuth refresh token. Required for OAuth authentication mode.

Tables

String

HubSpot object mapping configuration. Required. The keycolumns property is mandatory.

Format: <schema>.<table>,<hubspot_object> keycolumns(<col1>,<col2>) columnmap(<tgt_col1>=<src_col1>,<tgt_col2>=<src_col2>)

Sample: hubspot.customers2,contacts keycolumns(EMAIL) columnmap(FIRST_NAME=name,EMAIL=email)

Use connection profile

Boolean

false

Enable connection profile usage. When set to true, authentication credentials are read from the specified connection profile.

Supported HubSpot Objects

The HubSpot Writer supports writing to the following HubSpot CRM objects. Ensure that your HubSpot app has the appropriate write scopes configured for the objects you want to use.

Core CRM Objects

  • Companies

  • Contacts

  • Deals

  • Line Items

  • Owners

  • Quotes

Additional Objects

  • Appointments

  • Carts

  • Commerce Payments

  • Courses

  • Custom Objects

  • Goals

  • Invoices

  • Leads

  • Listings

  • Marketing Events

  • Orders

  • Partner Clients

  • Partner Services

  • Products

  • Services

  • Subscriptions

  • Users

Marketing and Settings Objects

  • Billing Settings

  • Currencies

  • Lists

  • Marketing Campaigns

  • Teams

  • User Settings

For each object, ensure your HubSpot app has been granted the corresponding write scope (e.g., crm.objects.contacts.write for Contacts).

Tables Property Format

The Tables property uses a specific format to define the mapping between source data and HubSpot objects:

<schema>.<table>,<hubspot_object> keycolumns(<col1>,<col2>) columnmap(<tgt_col1>=<src_col1>,
<tgt_col2>=<src_col2>)
  • schema.table: The source schema and table name.

  • hubspot_object: The target HubSpot object name (e.g., contacts, companies, deals).

  • keycolumns: Columns used to identify records for UPDATE and MERGE operations. These typically correspond to unique identifiers in HubSpot.

  • columnmap: Mapping of target HubSpot properties to source columns. Format is hubspot_property=source_column.

Example:

Tables: 'mydb.contact_data,contacts keycolumns(EMAIL) columnmap(firstname=FIRST_NAME,
lastname=LAST_NAME,email=EMAIL,company=COMPANY_NAME)'