HubSpot
OAuth 2.0 crmsalesHubSpot
What you can do
Section titled “What you can do”Connect this agent connector to let your agent:
- Read CRM records — retrieve contacts, companies, deals, and tickets
- Create and update records — add contacts, update deal stages, and log company data
- Log engagements — record calls, emails, meetings, and notes against any CRM record
- Search and filter — query CRM objects by property values and associations
Authentication
Section titled “Authentication”This connector uses OAuth 2.0. Scalekit acts as the OAuth client: it redirects your user to HubSpot, obtains an access token, and automatically refreshes it before it expires. Your agent code never handles tokens directly — you only pass a connectionName and a user identifier.
You supply your HubSpot Connected App credentials (Client ID + Secret) once per environment in the Scalekit dashboard.
Set up the connector
Register your Scalekit environment with the HubSpot connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:
-
Set up auth redirects
-
In Scalekit dashboard, go to Agent Auth → Create Connection. Find HubSpot and click Create. Copy the redirect URI. It looks like
https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.
-
Log in to your HubSpot developer dashboard, click Manage apps, and open your app.
-
Go to Auth → Auth settings → Redirect URL, paste the redirect URI, and click Save.

-
Select the required scopes for your application under Auth → Auth settings → Scopes.
-
-
Get client credentials
-
In your HubSpot App, go to Auth → Auth settings.
-
Copy your Client ID and Client Secret.
-
-
Add credentials in Scalekit
-
In Scalekit dashboard, go to Agent Auth → Connections and open the connection you created.
-
Enter your credentials:
- Client ID (from above)
- Client Secret (from above)
- Permissions (scopes — see HubSpot API Scopes reference)

-
Click Save.
-
Code examples
Connect a user’s HubSpot account and make API calls on their behalf — Scalekit handles OAuth and token management automatically.
Proxy API Calls
import { ScalekitClient } from '@scalekit-sdk/node';import 'dotenv/config';
const connectionName = 'hubspot'; // get your connection name from connection configurationsconst identifier = 'user_123'; // your unique user identifier
// Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsconst scalekit = new ScalekitClient( process.env.SCALEKIT_ENV_URL, process.env.SCALEKIT_CLIENT_ID, process.env.SCALEKIT_CLIENT_SECRET);const actions = scalekit.actions;
// Authenticate the userconst { link } = await actions.getAuthorizationLink({ connectionName, identifier,});console.log('🔗 Authorize HubSpot:', link);process.stdout.write('Press Enter after authorizing...');await new Promise(r => process.stdin.once('data', r));
// Make a request via Scalekit proxyconst result = await actions.request({ connectionName, identifier, path: '/crm/v3/owners', method: 'GET',});console.log(result);import scalekit.client, osfrom dotenv import load_dotenvload_dotenv()
connection_name = "hubspot" # get your connection name from connection configurationsidentifier = "user_123" # your unique user identifier
# Get your credentials from app.scalekit.com → Developers → Settings → API Credentialsscalekit_client = scalekit.client.ScalekitClient( client_id=os.getenv("SCALEKIT_CLIENT_ID"), client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"), env_url=os.getenv("SCALEKIT_ENV_URL"),)actions = scalekit_client.actions
# Authenticate the userlink_response = actions.get_authorization_link( connection_name=connection_name, identifier=identifier)# present this link to your user for authorization, or click it yourself for testingprint("🔗 Authorize HubSpot:", link_response.link)input("Press Enter after authorizing...")
# Make a request via Scalekit proxyresult = actions.request( connection_name=connection_name, identifier=identifier, path="/crm/v3/owners", method="GET")print(result)Tool list
Section titled “Tool list” hubspot_companies_search Search HubSpot companies using full-text search and pagination. Returns matching companies with specified properties. 5 params
Search HubSpot companies using full-text search and pagination. Returns matching companies with specified properties.
after string optional Pagination offset to get results starting from a specific position filterGroups string optional JSON string containing filter groups for advanced filtering limit number optional Number of results to return per page (max 100) properties string optional Comma-separated list of properties to include in the response query string optional Search term for full-text search across company properties hubspot_company_create Create a new company in HubSpot CRM. Requires a company name as the unique identifier. Supports additional properties like domain, industry, phone, location, and revenue information. 10 params
Create a new company in HubSpot CRM. Requires a company name as the unique identifier. Supports additional properties like domain, industry, phone, location, and revenue information.
name string required Company name (required, serves as primary identifier) annualrevenue number optional Annual revenue of the company city string optional Company city location country string optional Company country location description string optional Company description or overview domain string optional Company website domain industry string optional Industry type of the company numberofemployees number optional Number of employees at the company phone string optional Company phone number state string optional Company state or region hubspot_company_get Retrieve details of a specific company from HubSpot by company ID. Returns company properties and associated data. 2 params
Retrieve details of a specific company from HubSpot by company ID. Returns company properties and associated data.
company_id string required ID of the company to retrieve properties string optional Comma-separated list of properties to include in the response hubspot_contact_create Create a new contact in HubSpot CRM. Requires an email address as the unique identifier. Supports additional properties like name, company, phone, and lifecycle stage. 9 params
Create a new contact in HubSpot CRM. Requires an email address as the unique identifier. Supports additional properties like name, company, phone, and lifecycle stage.
email string required Primary email address for the contact (required, serves as unique identifier) company string optional Company name where the contact works firstname string optional First name of the contact hs_lead_status string optional Lead status of the contact jobtitle string optional Job title of the contact lastname string optional Last name of the contact lifecyclestage string optional Lifecycle stage of the contact phone string optional Phone number of the contact website string optional Personal or company website URL hubspot_contact_get Retrieve details of a specific contact from HubSpot by contact ID. Returns contact properties and associated data. 2 params
Retrieve details of a specific contact from HubSpot by contact ID. Returns contact properties and associated data.
contact_id string required ID of the contact to retrieve properties string optional Comma-separated list of properties to include in the response hubspot_contact_update Update an existing contact in HubSpot CRM by contact ID. Allows updating contact properties like name, email, company, phone, and lifecycle stage. 2 params
Update an existing contact in HubSpot CRM by contact ID. Allows updating contact properties like name, email, company, phone, and lifecycle stage.
contact_id string required ID of the contact to update props object optional Object containing properties like first name, last name, email, company, phone, and job title to update all these should be provided inside props as a JSON object, this is required hubspot_contacts_list Retrieve a list of contacts from HubSpot with filtering and pagination. Returns contact properties and supports pagination through cursor-based navigation. 4 params
Retrieve a list of contacts from HubSpot with filtering and pagination. Returns contact properties and supports pagination through cursor-based navigation.
after string optional Pagination cursor to get the next set of results archived boolean optional Whether to include archived contacts in the results limit number optional Number of results to return per page (max 100) properties string optional Comma-separated list of properties to include in the response hubspot_contacts_search Search HubSpot contacts using full-text search and pagination. Returns matching contacts with specified properties. 5 params
Search HubSpot contacts using full-text search and pagination. Returns matching contacts with specified properties.
after string optional Pagination offset to get results starting from a specific position filterGroups string optional JSON string containing filter groups for advanced filtering limit number optional Number of results to return per page (max 100) properties string optional Comma-separated list of properties to include in the response query string optional Search term for full-text search across contact properties hubspot_deal_create Create a new deal in HubSpot CRM. Requires dealname, amount, and dealstage. Supports additional properties like pipeline, close date, and deal type. 8 params
Create a new deal in HubSpot CRM. Requires dealname, amount, and dealstage. Supports additional properties like pipeline, close date, and deal type.
amount number required Deal amount/value (required) dealname string required Name of the deal (required) dealstage string required Current stage of the deal (required) closedate string optional Expected close date (YYYY-MM-DD format) dealtype string optional Type of deal description string optional Deal description hs_priority string optional Deal priority (HIGH, MEDIUM, LOW) pipeline string optional Deal pipeline hubspot_deal_update Update an existing deal in HubSpot CRM by deal ID. Allows updating deal properties like name, amount, stage, pipeline, close date, and priority. 3 params
Update an existing deal in HubSpot CRM by deal ID. Allows updating deal properties like name, amount, stage, pipeline, close date, and priority.
deal_id string required ID of the deal to update properties object required Object containing deal properties to update good_deal boolean optional Boolean flag indicating if this is a good deal hubspot_deals_search Search HubSpot deals using full-text search and pagination. Returns matching deals with specified properties. 5 params
Search HubSpot deals using full-text search and pagination. Returns matching deals with specified properties.
after string optional Pagination offset to get results starting from a specific position filterGroups string optional JSON string containing filter groups for advanced filtering limit number optional Number of results to return per page (max 100) properties string optional Comma-separated list of properties to include in the response query string optional Search term for full-text search across deal properties