Component Libraries •
Project Templates
Docs •
Install •
Tutorials •
Developer Guides •
Contribute •
Blog •
Discord
Xircuits Component Library for HubSpot – Seamlessly integrate HubSpot CRM into your automation workflows.
Integrate HubSpot CRM capabilities into your Xircuits workflows. This library provides components for managing contacts, companies, deals, engagements, and more through the HubSpot API.
Before you begin, you will need the following:
- Python 3.9+
- Xircuits
- HubSpot account with API access
- HubSpot Private App access token
- Log in to your HubSpot account
- Navigate to Settings > Integrations > Private Apps
- Click "Create a private app"
- Give your app a name and select the required scopes:
crm.objects.contacts.read/crm.objects.contacts.writecrm.objects.companies.read/crm.objects.companies.writecrm.objects.deals.read/crm.objects.deals.writecrm.schemas.contacts.read(for properties)
- Create the app and copy the access token
Initializes a HubSpot API client with your access token. This client is required by all other HubSpot components.
Creates a new contact in HubSpot with email, name, phone, company, and custom properties.
Retrieves a contact by ID with specified properties.
Updates an existing contact's properties.
Archives (soft-deletes) a contact from HubSpot.
Lists contacts with pagination support.
Searches for contacts using filters and query strings.
Creates a new company with name, domain, industry, and custom properties.
Retrieves a company by ID.
Updates an existing company's properties.
Archives a company from HubSpot.
Lists companies with pagination support.
Searches for companies using filters.
Creates a new deal with name, pipeline, stage, amount, and custom properties.
Retrieves a deal by ID.
Updates an existing deal's properties.
Archives a deal from HubSpot.
Lists deals with pagination support.
Searches for deals using filters.
Creates associations between HubSpot objects (e.g., contact to company, deal to contact).
Retrieves all associations for a given object.
Creates a note engagement and optionally associates it with contacts, companies, or deals.
Creates a task with subject, body, due date, priority, and status. Can be associated with CRM objects.
Retrieves all pipelines for deals or tickets, including their stages.
Lists all HubSpot owners (users) in the account.
Gets all property definitions for an object type.
Creates a custom property for contacts, companies, deals, or other objects.
We have provided example workflows to help you get started with the HubSpot component library.
A simple workflow that demonstrates how to:
- Initialize the HubSpot client
- Create a new contact
- Retrieve the created contact
A more comprehensive workflow showing:
- Creating a company
- Creating a contact
- Associating the contact with the company
- Creating a deal
- Adding a note to the deal
To use this component library, ensure that you have an existing Xircuits setup. You can then install the HubSpot library using the component library interface, or through the CLI using:
xircuits install hubspotYou can also do it manually by cloning and installing it:
# base Xircuits directory
git clone https://github.com/XpressAI/xai-hubspot xai_components/xai_hubspot
pip install -r xai_components/xai_hubspot/requirements.txtYou can set your HubSpot access token as an environment variable:
export HUBSPOT_ACCESS_TOKEN="your-access-token-here"Then use it in your workflows with the HubSpotClient component.
When using search components, you can pass filters like:
# Search for contacts with a specific email domain
filters = [
{
"propertyName": "email",
"operator": "CONTAINS_TOKEN",
"value": "example.com"
}
]
# Search for deals in a specific stage
filters = [
{
"propertyName": "dealstage",
"operator": "EQ",
"value": "closedwon"
}
]
# Search for companies by industry
filters = [
{
"propertyName": "industry",
"operator": "EQ",
"value": "TECHNOLOGY"
}
]EQ- Equal toNEQ- Not equal toLT- Less thanLTE- Less than or equal toGT- Greater thanGTE- Greater than or equal toCONTAINS_TOKEN- Contains (for text fields)NOT_CONTAINS_TOKEN- Does not contain