hubspot-automation
npx machina-cli add skill davepoon/buildwithclaude/hubspot-automation --openclawHubSpot CRM Automation via Rube MCP
Automate HubSpot CRM workflows including contact/company management, deal pipeline tracking, ticket search, and custom property creation through Composio's HubSpot toolkit.
Toolkit docs: composio.dev/toolkits/hubspot
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active HubSpot connection via
RUBE_MANAGE_CONNECTIONSwith toolkithubspot - Always call
RUBE_SEARCH_TOOLSfirst to get current tool schemas
Setup
Get Rube MCP: Add https://rube.app/mcp as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
- Verify Rube MCP is available by confirming
RUBE_SEARCH_TOOLSresponds - Call
RUBE_MANAGE_CONNECTIONSwith toolkithubspot - If connection is not ACTIVE, follow the returned auth link to complete HubSpot OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Manage Contacts
When to use: User wants to create new contacts or update existing ones in HubSpot CRM
Tool sequence:
HUBSPOT_GET_ACCOUNT_INFO- Verify connection and permissions (Prerequisite)HUBSPOT_SEARCH_CONTACTS_BY_CRITERIA- Search for existing contacts to avoid duplicates (Prerequisite)HUBSPOT_READ_A_CRM_PROPERTY_BY_NAME- Check property metadata for constrained values (Optional)HUBSPOT_CREATE_CONTACT- Create a single contact (Required)HUBSPOT_CREATE_CONTACTS- Batch create contacts up to 100 (Alternative)
Key parameters:
HUBSPOT_CREATE_CONTACT:propertiesobject withemail,firstname,lastname,phone,companyHUBSPOT_CREATE_CONTACTS:inputsarray of{properties}objects, max 100 per batchHUBSPOT_SEARCH_CONTACTS_BY_CRITERIA:filterGroupsarray with{filters: [{propertyName, operator, value}]},propertiesarray of fields to return
Pitfalls:
- Max 100 records per batch; chunk larger imports
- 400 'Property values were not valid' if using incorrect property names or enum values
- Always search before creating to avoid duplicates
- Auth errors from GET_ACCOUNT_INFO mean all subsequent calls will fail
2. Manage Companies
When to use: User wants to create, search, or update company records
Tool sequence:
HUBSPOT_SEARCH_COMPANIES- Search existing companies (Prerequisite)HUBSPOT_CREATE_COMPANIES- Batch create companies, max 100 (Required)HUBSPOT_UPDATE_COMPANIES- Batch update existing companies (Alternative)HUBSPOT_GET_COMPANY- Get single company details (Optional)HUBSPOT_BATCH_READ_COMPANIES_BY_PROPERTIES- Bulk read companies by property values (Optional)
Key parameters:
HUBSPOT_CREATE_COMPANIES:inputsarray of{properties}objects, max 100HUBSPOT_SEARCH_COMPANIES:filterGroups,properties,sorts,limit,after(pagination cursor)
Pitfalls:
- Max 100 per batch; chunk larger sets
- Store returned IDs immediately for downstream operations
- Property values must match exact internal names, not display labels
3. Manage Deals and Pipeline
When to use: User wants to search deals, view pipeline stages, or track deal progress
Tool sequence:
HUBSPOT_RETRIEVE_ALL_PIPELINES_FOR_SPECIFIED_OBJECT_TYPE- Map pipeline and stage IDs/names (Prerequisite)HUBSPOT_SEARCH_DEALS- Search deals with filters (Required)HUBSPOT_RETRIEVE_PIPELINE_STAGES- Get stage details for one pipeline (Optional)HUBSPOT_RETRIEVE_OWNERS- Get owner/rep details (Optional)HUBSPOT_GET_DEAL- Get single deal details (Optional)HUBSPOT_LIST_DEALS- List all deals without filters (Fallback)
Key parameters:
HUBSPOT_SEARCH_DEALS:filterGroupswith filters onpipeline,dealstage,createdate,closedate,hubspot_owner_id;properties,sorts,limit,afterHUBSPOT_RETRIEVE_ALL_PIPELINES_FOR_SPECIFIED_OBJECT_TYPE:objectTypeset to'deals'
Pitfalls:
- Results nested under
response.data.results; properties are often strings (amounts, dates) - Stage IDs may be readable strings or opaque numeric IDs; use
labelfield for display - Filters must use internal property names (
pipeline,dealstage,createdate), not display names - Paginate via
paging.next.afteruntil absent
4. Search and Filter Tickets
When to use: User wants to find support tickets by status, date, or criteria
Tool sequence:
HUBSPOT_SEARCH_TICKETS- Search with filterGroups (Required)HUBSPOT_READ_ALL_PROPERTIES_FOR_OBJECT_TYPE- Discover available property names (Fallback)HUBSPOT_GET_TICKET- Get single ticket details (Optional)HUBSPOT_GET_TICKETS- Bulk fetch tickets by IDs (Optional)
Key parameters:
HUBSPOT_SEARCH_TICKETS:filterGroups,properties(only listed fields are returned),sorts,limit,after
Pitfalls:
- Incorrect
propertyName/operatorreturns zero results without errors - Date filtering may require epoch-ms bounds; mixing formats causes mismatches
- Only fields in the
propertiesarray are returned; missing ones break downstream logic - Use READ_ALL_PROPERTIES to discover exact internal property names
5. Create and Manage Custom Properties
When to use: User wants to add custom fields to CRM objects
Tool sequence:
HUBSPOT_READ_ALL_PROPERTIES_FOR_OBJECT_TYPE- List existing properties (Prerequisite)HUBSPOT_READ_PROPERTY_GROUPS_FOR_OBJECT_TYPE- List property groups (Optional)HUBSPOT_CREATE_PROPERTY_FOR_SPECIFIED_OBJECT_TYPE- Create a single property (Required)HUBSPOT_CREATE_BATCH_OF_PROPERTIES- Batch create properties (Alternative)HUBSPOT_UPDATE_SPECIFIC_CRM_PROPERTY- Update existing property definition (Optional)
Key parameters:
HUBSPOT_CREATE_PROPERTY_FOR_SPECIFIED_OBJECT_TYPE:objectType,name,label,type(string/number/date/enumeration),fieldType,groupName,options(for enumerations)
Pitfalls:
- Property names are immutable after creation; choose carefully
- Enumeration options must be pre-defined with
valueandlabel - Group must exist before assigning properties to it
Common Patterns
ID Resolution
- Property display name → internal name: Use
HUBSPOT_READ_ALL_PROPERTIES_FOR_OBJECT_TYPE - Pipeline name → pipeline ID: Use
HUBSPOT_RETRIEVE_ALL_PIPELINES_FOR_SPECIFIED_OBJECT_TYPE - Stage name → stage ID: Extract from pipeline stages response
- Owner name → owner ID: Use
HUBSPOT_RETRIEVE_OWNERS
Pagination
- Search endpoints use cursor-based pagination
- Follow
paging.next.afteruntil absent - Typical limit: 100 records per page
- Pass
aftervalue from previous response to get next page
Batch Operations
- Most create/update endpoints support batching with max 100 records per call
- For larger datasets, chunk into groups of 100
- Store returned IDs from each batch before proceeding
- Use batch endpoints (
CREATE_CONTACTS,CREATE_COMPANIES,UPDATE_COMPANIES) instead of single-record endpoints for efficiency
Known Pitfalls
- Property names: All search/filter endpoints use internal property names, NOT display labels. Always call
READ_ALL_PROPERTIES_FOR_OBJECT_TYPEto discover correct names - Batch limits: Max 100 records per batch operation. Larger sets must be chunked
- Response structure: Search results are nested under
response.data.resultswith properties as string values - Date formats: Date properties may be epoch-ms or ISO strings depending on endpoint. Parse defensively
- Immutable names: Property names cannot be changed after creation. Plan naming conventions carefully
- Cursor pagination: Use
paging.next.aftercursor, not page numbers. Continue untilafteris absent - Duplicate prevention: Always search before creating contacts/companies to avoid duplicates
- Auth verification: Run
HUBSPOT_GET_ACCOUNT_INFOfirst; auth failures cascade to all subsequent calls
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Create contact | HUBSPOT_CREATE_CONTACT | properties: {email, firstname, lastname} |
| Batch create contacts | HUBSPOT_CREATE_CONTACTS | inputs: [{properties}] (max 100) |
| Search contacts | HUBSPOT_SEARCH_CONTACTS_BY_CRITERIA | filterGroups, properties, limit, after |
| Create companies | HUBSPOT_CREATE_COMPANIES | inputs: [{properties}] (max 100) |
| Search companies | HUBSPOT_SEARCH_COMPANIES | filterGroups, properties, after |
| Search deals | HUBSPOT_SEARCH_DEALS | filterGroups, properties, after |
| Get pipelines | HUBSPOT_RETRIEVE_ALL_PIPELINES_FOR_SPECIFIED_OBJECT_TYPE | objectType: 'deals' |
| Search tickets | HUBSPOT_SEARCH_TICKETS | filterGroups, properties, after |
| List properties | HUBSPOT_READ_ALL_PROPERTIES_FOR_OBJECT_TYPE | objectType |
| Create property | HUBSPOT_CREATE_PROPERTY_FOR_SPECIFIED_OBJECT_TYPE | objectType, name, label, type, fieldType |
| Get owners | HUBSPOT_RETRIEVE_OWNERS | None |
| Verify connection | HUBSPOT_GET_ACCOUNT_INFO | None |
Powered by Composio
Source
git clone https://github.com/davepoon/buildwithclaude/blob/main/plugins/all-skills/skills/hubspot-automation/SKILL.mdView on GitHub Overview
Automates HubSpot CRM workflows for contacts, companies, deals, tickets, and properties using Rube MCP and Composio. It emphasizes search-before-create, batch operations up to 100 records, and property metadata checks to maintain clean, deduplicated data.
How This Skill Works
The integration uses a defined tool sequence: verify the HubSpot connection with HUBSPOT_GET_ACCOUNT_INFO, search for existing records (e.g., HUBSPOT_SEARCH_CONTACTS_BY_CRITERIA or HUBSPOT_SEARCH_COMPANIES), optionally read property metadata, then create or update records with HUBSPOT_CREATE_CONTACT(S), HUBSPOT_CREATE_COMPANIES/UPDATE_COMPANIES, or related deal/ticket operations. All actions rely on Rube MCP via the Composio HubSpot toolkit and require a active connection prior to running workflows.
When to Use It
- When onboarding new contacts and preventing duplicates in HubSpot
- When batch-creating or updating company records
- When mapping and tracking deals through a pipeline
- When validating and refreshing HubSpot property values before writes
- When syncing external data into HubSpot via the Composio toolkit
Quick Start
- Step 1: Ensure Rube MCP is configured and RUBE_SEARCH_TOOLS is responsive
- Step 2: Connect HubSpot via RUBE_MANAGE_CONNECTIONS with toolkit hubspot and complete OAuth if prompted
- Step 3: Confirm the connection is ACTIVE before running any workflows
Best Practices
- Always call RUBE_SEARCH_TOOLS first to fetch current tool schemas
- Search for existing records before creating to avoid duplicates
- Limit batch operations to 100 records and chunk larger imports
- Ensure property names and enum values match HubSpot internal names
- Verify connection status is ACTIVE before executing workflows
Example Use Cases
- Import 100 new contacts in a single batch from a lead export while avoiding duplicates
- Batch-create 100 companies and link them to existing accounts in HubSpot
- Import deals and map them to the correct pipeline stages for progress tracking
- Retrieve a single company by ID and update a set of properties
- Sync external contact properties to ensure enum values remain valid
Frequently Asked Questions
Related Skills
close-automation
davepoon/buildwithclaude
Automate Close CRM tasks via Rube MCP (Composio): create leads, manage calls/SMS, handle tasks, and track notes. Always search tools first for current schemas.
Attio Automation
ComposioHQ/awesome-claude-skills
Automate Attio CRM operations -- search records, query contacts and companies with advanced filters, manage notes, list attributes, and navigate your relationship data -- using natural language through the Composio MCP integration.
pipedrive-automation
davepoon/buildwithclaude
Automate Pipedrive CRM operations including deals, contacts, organizations, activities, notes, and pipeline management via Rube MCP (Composio). Always search tools first for current schemas.
zoho-crm-automation
davepoon/buildwithclaude
Automate Zoho CRM tasks via Rube MCP (Composio): create/update records, search contacts, manage leads, and convert leads. Always search tools first for current schemas.
Capsule CRM Automation
ComposioHQ/awesome-claude-skills
Automate Capsule CRM operations -- manage contacts (parties), run structured filter queries, track tasks and projects, log entries, and handle organizations -- using natural language through the Composio MCP integration.
salesforce-automation
davepoon/buildwithclaude
Automate Salesforce tasks via Rube MCP (Composio): leads, contacts, accounts, opportunities, SOQL queries. Always search tools first for current schemas.