Docs/Connectors

HubSpot

Contacts, deals and engagements (notes, calls, emails, meetings and tasks) from HubSpot CRM through a private app token.

The hubspot connector reads CRM objects through HubSpot's search API.

Connector name hubspot
Products Records
Credentials A private app access token (starts with pat-)
Scopes crm.objects.contacts.read, crm.objects.deals.read, and sales-email-read for email bodies

What it pulls

Object Properties
contact First and last name, email, phone, company, job title, city, state, country, ZIP, industry, lifecycle stage, lead status, created and modified dates, owner ID
deal Deal name, amount, stage, pipeline, type, close date, created and modified dates, closed-won flag, stage probability, owner ID
note Body
call Title, body, direction, disposition, duration, status
email Subject, text, direction, status
meeting Title, body, start and end time, outcome
task Subject, body, status, priority, type

Every record also carries its HubSpot ID and an archived flag. Engagements carry their timestamp, created and modified dates and owner ID.

Choose a subset with the objects option: contacts, deals, engagements. All three are pulled by default.

HubSpot names engagement properties after their type (hs_email_text). The connector strips those prefixes, so the email body arrives as text rather than a column the scrubber would mistake for an email address. Names, emails and phone numbers become tokens. Bodies, notes and subjects are free text, which is redacted, or dropped if you set "freeText": "drop".

Credentials

  1. In HubSpot, go to Settings → Integrations → Private apps and create a private app.
  2. Under Scopes, grant crm.objects.contacts.read and crm.objects.deals.read. Add sales-email-read if you pull engagements and want email bodies.
  3. Copy the access token and give it to the SDK as accessToken.

Private app tokens do not expire on a schedule, so no refresh token is needed.

Connect

bash
datayield connect hubspot -o objects=contacts,deals
# asks for accessToken, which is stored in ~/.datayield/credentials

Secret options passed directly are saved to ~/.datayield/credentials. Values written as env:NAME are read from the environment at run time, which suits CI. See CLI reference.

Options

Option Required Meaning
accessToken yes The private app token. Stored as a secret.
objects no contacts, deals, engagements. Defaults to all three.

New records on each run

Each object is searched for records whose last-modified date falls between the last successful run and now, oldest first. HubSpot's search API stops at 10,000 results per query, so for larger windows the connector restarts the search from the last timestamp it saw and skips records it already sent.