hubspot
Integrate with HubSpot CRM to manage contacts, companies, deals, and associations.
Overview
Integrate with HubSpot CRM to manage contacts, companies, deals, and associations. This step provides comprehensive HubSpot CRM integration supporting create, update, get, search, associate, and batch operations. You can manage standard CRM objects (contacts, companies, deals, tickets) as well as custom objects. The step handles HubSpot's API authentication, property mapping, and association management. Use template substitution to dynamically populate data from events. Perfect for syncing customer data, managing sales pipelines, and automating marketing workflows.
Quick Start
steps:
- type: hubspot
api_key: <string>
operation: <string>Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | HubSpot Private App access token. Generate from Settings → Integrations → Private Apps. |
operation | string | Yes | Operation to perform: create, update, get, search, associate, or batch_create.
Options: [object Object], [object Object], [object Object], [object Object], [object Object], [object Object] |
object_type | string | No | Type of CRM object to work with: contacts, companies, deals, tickets, products, line_items, quotes, calls, emails, meetings, notes, tasks. Required for create, update, get, search, and batch_create. |
input_from | string | No | Path in event to find the data for creating/updating the object. Example: 'payload.contact' → event['payload']['contact'] |
data_path | string | No | DEPRECATED: Use 'input_from' instead. Path in event to find data. |
record_id_path | string | No | Path in event to find the record ID for update/get operations. Example: 'hubspot.contact_id' → event['hubspot']['contact_id'] |
search_filters | string | No | Search filters for the search operation. Should contain 'filterGroups' with filter definitions. Supports template substitution in values. |
search_limit | string | No | Maximum number of results to return from search operation (default: 100, max: 100).
Default: 100 |
from_object | string | No | Source object type for association (e.g., 'contacts'). Required for associate operation. |
from_id_path | string | No | Path in event to find the source object ID. Required for associate operation. |
to_object | string | No | Target object type for association (e.g., 'companies'). Required for associate operation. |
to_id_path | string | No | Path in event to find the target object ID. Required for associate operation. |
association_type | string | No | Type of association to create (e.g., 'contact_to_company', 'company_to_deal'). Required for associate operation. |
batch_data_path | string | No | Path in event to find the array of objects for batch creation. Example: 'payload.contacts' → event['payload']['contacts'] |
output_to | string | No | Key to store the result in the event. If not specified, result is stored at the base inject key. For search operations, stores array of matching records. |
output_key | string | No | DEPRECATED: Use 'output_to' instead. Key to store result in event. |
inject_key | string | No | Base key for injecting results/errors into the event (default: 'hubspot').
Default: "hubspot" |
drop_on_failure | boolean | No | If true, drop the event (return None) when an error occurs. Otherwise inject error details.
Default: false |
Examples
Create contact from form
Create a new HubSpot contact from web form submission
type: hubspot
api_key: ${env:hubspot_api_key}
operation: create
object_type: contacts
input_from: form_data
output_to: new_contact
Search contacts by email
Find existing contacts matching an email address
type: hubspot
api_key: ${env:hubspot_api_key}
operation: search
object_type: contacts
search_filters:
email: ${user.email}
search_limit: 10
output_to: matching_contacts
Update deal stage and amount
Update an existing deal's properties
type: hubspot
api_key: ${env:hubspot_api_key}
operation: update
object_type: deals
record_id_path: deal.hubspot_id
input_from: deal.updated_fields
output_to: updated_deal
Associate contact with company
Link a contact to their company in HubSpot
type: hubspot
api_key: ${env:hubspot_api_key}
operation: associate
from_object: contacts
from_id_path: contact.hubspot_id
to_object: companies
to_id_path: company.hubspot_id
output_to: association_result
Batch create contacts
Create multiple contacts at once for efficiency
type: hubspot
api_key: ${env:hubspot_api_key}
operation: batch_create
object_type: contacts
batch_data_path: import.contacts_array
inject_key: batch_results
Get deal by ID
Retrieve full details of a specific deal
type: hubspot
api_key: ${env:hubspot_api_key}
operation: get
object_type: deals
record_id_path: pipeline.deal_id
inject_key: deal_details
Advanced Options
These options are available on all steps for error handling and retry logic:
| Parameter | Type | Default | Description |
|---|---|---|---|
retries | integer | 0 | Number of retry attempts (0-10) |
backoff_seconds | number | 0 | Backoff (seconds) applied between retry attempts |
retry_propagate | boolean | false | If True, raise last exception after exhausting retries; otherwise swallow. |