Breadcrumbs

Hubspot - Upload Data

Overview

Before diving into the blueprint, it's essential to familiarize yourself with a few prerequisites and concepts to ensure a smooth experience:

Hubspot Access Token:

The blueprint requires an access token from Hubspot for authentication. If you don't have one, you'll need to obtain it from Hubspot. Typically, this is done through the Hubspot API settings in your account. Keep this token secure; it's your key to accessing your Hubspot account programmatically.

Data File Preparation:

Ensure your contact data is in a supported file format (e.g., CSV, Excel). The blueprint will ask for the filename, so keep the file accessible and know its path.

Variables

Name

Reference

Type

Required

Default

Options

Description

Access Token

HUBSPOT_ACCESS_TOKEN

Password

-

-

Token for authenticating with Hubspot. This ensures secure access to the Hubspot account for exporting data.

Import Name

HUBSPOT_IMPORT_NAME

Alphanumeric

-

-

A name to identify this import job.

Upload Operation Type

HUBSPOT_IMPORT_OPERATION

Select

UPSERT

Create: CREATE

Update: UPDATE

Upsert: UPSERT

Choose the type of import operation (e.g., create, update).

Hubspot Data Type

HUBSPOT_OBJECT_TYPE

Select

contacts

Contacts: contacts

Companies: companies

Deals: deals

Select which data object is being affected by the upload.

Source Folder Name

HUBSPOT_SOURCE_FOLDER_NAME

Alphanumeric

-

-

Directory where the blueprint will search for files to import.

Filename or Match Pattern

HUBSPOT_SOURCE_FILE_NAME

Alphanumeric

-

-

Exact name or regex pattern to identify the files for import.

Source File Name Match Type

HUBSPOT_SOURCE_MATCH_TYPE

Select

exact_match

Exact: exact_match

Regex: regex_match

Method for matching the source file name. Choose 'Exact' for exact names or 'Regex' for regular expression patterns.

File Format

HUBSPOT_FILE_FORMAT

Select

CSV

CSV

Excel Spreadsheet: SPREADSHEET

Specify the format of the file being imported

YAML

Below is the YAML template

YAML

source:
  template: Hubspot - Upload Data
  inputs:
    HUBSPOT_ACCESS_TOKEN:
    HUBSPOT_IMPORT_NAME:
    HUBSPOT_IMPORT_OPERATION: UPSERT
    HUBSPOT_OBJECT_TYPE: contacts
    HUBSPOT_SOURCE_FOLDER_NAME:
    HUBSPOT_SOURCE_FILE_NAME:
    HUBSPOT_SOURCE_MATCH_TYPE: exact_match
    HUBSPOT_FILE_FORMAT: CSV
  type: TEMPLATE
guardrails:
  retry_count: 1
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - 102
    - 107
    - 201
    - 202
    - 206