Skip to main content

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​

NameReferenceTypeRequiredDefaultOptionsDescription
Access TokenHUBSPOT_ACCESS_TOKENPasswordβœ…--Token for authenticating with Hubspot. This ensures secure access to the Hubspot account for exporting data.
Import NameHUBSPOT_IMPORT_NAMEAlphanumericβœ…--A name to identify this import job.
Upload Operation TypeHUBSPOT_IMPORT_OPERATIONSelectβœ…UPSERTCreate: CREATE

Update: UPDATE

Upsert: UPSERT

Choose the type of import operation (e.g., create, update).
Hubspot Data TypeHUBSPOT_OBJECT_TYPESelectβœ…contactsContacts: contacts

Companies: companies

Deals: deals

Select which data object is being affected by the upload.
Source Folder NameHUBSPOT_SOURCE_FOLDER_NAMEAlphanumericβœ…--Directory where the blueprint will search for files to import.
Filename or Match PatternHUBSPOT_SOURCE_FILE_NAMEAlphanumericβœ…--Exact name or regex pattern to identify the files for import.
Source File Name Match TypeHUBSPOT_SOURCE_MATCH_TYPESelectβœ…exact_matchExact: exact_match

Regex: regex_match

Method for matching the source file name. Choose 'Exact' for exact names or 'Regex' for regular expression patterns.
File FormatHUBSPOT_FILE_FORMATSelectβœ…CSVCSV,Excel Spreadsheet: SPREADSHEET

Specify the format of the file being imported

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

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