marketing
HubSpot CLI for CI
Use the HubSpot CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Manual OAuth token auth
HubSpot CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The HubSpot CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# HubSpot CLI for CI
kosmokrator integrations:configure hubspot3 --set access_token="$HUBSPOT3_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call hubspot3.hubspot3_list_contacts '{"limit":1,"offset":1,"properties":"example_properties"}' --json Discovery Before Execution
Agents and scripts can inspect HubSpot docs and schemas before choosing a function.
kosmo integrations:docs hubspot3 --json
kosmo integrations:docs hubspot3.hubspot3_list_contacts --json
kosmo integrations:schema hubspot3.hubspot3_list_contacts --json
kosmo integrations:search "HubSpot" --json
kosmo integrations:list --json Useful HubSpot CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
hubspot3.hubspot3_list_contacts | Read | limit, offset, properties | List HubSpot contacts. Returns contact IDs, emails, names, and associated company IDs. Use limit and offset for pagination, and properties to select specific fields. |
hubspot3.hubspot3_get_contact | Read | contact_id | Retrieve a HubSpot contact by its ID (vid). Returns the full contact profile including all properties, form submissions, and lists. |
hubspot3.hubspot3_create_contact | Write | email, first_name, last_name, phone, company, properties | Create a new HubSpot contact. Requires an email address. Optionally set first name, last name, phone, company, and other properties. Returns the created contact with its ID. |
hubspot3.hubspot3_list_companies | Read | limit, offset, properties | List HubSpot companies. Returns company IDs, names, domains, and other properties. Use limit and offset for pagination. |
hubspot3.hubspot3_get_company | Read | company_id | Retrieve a HubSpot company by its ID. Returns the full company profile including name, domain, industry, and other properties. |
hubspot3.hubspot3_list_deals | Read | limit, offset, properties | List HubSpot deals. Returns deal IDs, names, stages, amounts, and associated contacts/companies. Use limit and offset for pagination. |
hubspot3.hubspot3_get_current_user | Read | none | Retrieve the currently authenticated HubSpot user's information. Returns the user's ID, email, name, and portal information. Useful for identifying which account or token is in use. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.