How to integrate Hubspot MCP with CrewAI

This guide walks you through connecting Hubspot to CrewAI using the Composio tool router. By the end, you'll have a working Hubspot agent that can archive a batch of outdated contact records, associate a web form with current campaign, add a custom data token to event template through natural language commands. This guide will help you understand how to give your CrewAI agent real control over a Hubspot account through Composio's Hubspot MCP server. Before we dive in, let's take a quick look at the key ideas and tools involved.

Hubspot logoHubspot
Oauth2Api Key

HubSpot is an all-in-one marketing, sales, and customer service platform. It lets teams nurture leads, automate outreach, and track every customer interaction in one place.

232 Tools2 Triggers

Introduction

This guide walks you through connecting Hubspot to CrewAI using the Composio tool router. By the end, you'll have a working Hubspot agent that can archive a batch of outdated contact records, associate a web form with current campaign, add a custom data token to event template through natural language commands.

This guide will help you understand how to give your CrewAI agent real control over a Hubspot account through Composio's Hubspot MCP server.

Before we dive in, let's take a quick look at the key ideas and tools involved.

Also integrate Hubspot with

TL;DR

Here's what you'll learn:
  • Get a Composio API key and configure your Hubspot connection
  • Set up CrewAI with an MCP enabled agent
  • Create a Tool Router session or standalone MCP server for Hubspot
  • Build a conversational loop where your agent can execute Hubspot operations

What is CrewAI?

CrewAI is a powerful framework for building multi-agent AI systems. It provides primitives for defining agents with specific roles, creating tasks, and orchestrating workflows through crews.

Key features include:

  • Agent Roles: Define specialized agents with specific goals and backstories
  • Task Management: Create tasks with clear descriptions and expected outputs
  • Crew Orchestration: Combine agents and tasks into collaborative workflows
  • MCP Integration: Connect to external tools through Model Context Protocol

What is the Hubspot MCP server, and what's possible with it?

The Hubspot MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Hubspot account. It provides structured and secure access to your HubSpot CRM, marketing, and sales data, so your agent can perform actions like managing contacts, archiving deals, associating assets, and automating campaign tasks on your behalf.

  • Bulk archiving of CRM data: Instantly archive batches of contacts, companies, deals, quotes, or line items to keep your CRM clean and up-to-date, all through simple agent commands.
  • Asset association management: Direct your agent to associate forms, object lists, or external URLs with marketing campaigns to streamline your campaign setup workflow.
  • Campaign event customization: Add custom data tokens to event templates in your HubSpot apps, making your marketing automation smarter and more personalized.
  • Email and feedback archiving: Effortlessly archive outdated emails and feedback submissions, helping you maintain a focused and actionable workspace.
  • Object-level batch operations: Enable your agent to perform batch archiving of various object types, so you can quickly declutter and manage CRM records without manual effort.

What is the Composio tool router, and how does it fit here?

What is Composio SDK?

Composio's Composio SDK helps agents find the right tools for a task at runtime. You can plug in multiple toolkits (like Gmail, HubSpot, and GitHub), and the agent will identify the relevant app and action to complete multi-step workflows. This can reduce token usage and improve the reliability of tool calls. Read more here: Getting started with Composio SDK

The tool router generates a secure MCP URL that your agents can access to perform actions.

How the Composio SDK works

The Composio SDK follows a three-phase workflow:

  1. Discovery: Searches for tools matching your task and returns relevant toolkits with their details.
  2. Authentication: Checks for active connections. If missing, creates an auth config and returns a connection URL via Auth Link.
  3. Execution: Executes the action using the authenticated connection.

Step-by-step Guide

Step by step08 STEPS
1

Prerequisites

Before starting, make sure you have:
  • Python 3.9 or higher
  • A Composio account and API key
  • A Hubspot connection authorized in Composio
  • An OpenAI API key for the CrewAI LLM
  • Basic familiarity with Python
2

Getting API Keys for OpenAI and Composio

OpenAI API Key
  • Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
  • Keep the API key safe.
Composio API Key
  • Log in to the Composio dashboard.
  • Navigate to your API settings and generate a new API key.
  • Store this key securely as you'll need it for authentication.
3

Install dependencies

bash
pip install composio crewai crewai-tools[mcp] python-dotenv
What's happening:
  • composio connects your agent to Hubspot via MCP
  • crewai provides Agent, Task, Crew, and LLM primitives
  • crewai-tools[mcp] includes MCP helpers
  • python-dotenv loads environment variables from .env
4

Set up environment variables

bash
COMPOSIO_API_KEY=your_composio_api_key_here
USER_ID=your_user_id_here
OPENAI_API_KEY=your_openai_api_key_here

Create a .env file in your project root.

What's happening:

  • COMPOSIO_API_KEY authenticates with Composio
  • USER_ID scopes the session to your account
  • OPENAI_API_KEY lets CrewAI use your chosen OpenAI model
5

Import dependencies

python
import os
from composio import Composio
from crewai import Agent, Task, Crew
from crewai_tools import MCPServerAdapter
import dotenv

dotenv.load_dotenv()

COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set")
What's happening:
  • CrewAI classes define agents and tasks, and run the workflow
  • MCPServerHTTP connects the agent to an MCP endpoint
  • Composio will give you a short lived Hubspot MCP URL
6

Create a Composio Tool Router session for Hubspot

python
composio_client = Composio(api_key=COMPOSIO_API_KEY)
session = composio_client.create(user_id=COMPOSIO_USER_ID, toolkits=["hubspot"])

url = session.mcp.url
What's happening:
  • You create a Hubspot only session through Composio
  • Composio returns an MCP HTTP URL that exposes Hubspot tools
7

Initialize the MCP Server

python
server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users search the internet effectively",
        backstory="You are a helpful assistant with access to search tools.",
        tools=tools,
        verbose=False,
        max_iter=10,
    )
What's Happening:
  • Server Configuration: The code sets up connection parameters including the MCP server URL, streamable HTTP transport, and Composio API key authentication.
  • MCP Adapter Bridge: MCPServerAdapter acts as a context manager that converts Composio MCP tools into a CrewAI-compatible format.
  • Agent Setup: Creates a CrewAI Agent with a defined role (Search Assistant), goal (help with internet searches), and access to the MCP tools.
  • Configuration Options: The agent includes settings like verbose=False for clean output and max_iter=10 to prevent infinite loops.
  • Dynamic Tool Usage: Once created, the agent automatically accesses all Composio Search tools and decides when to use them based on user queries.
8

Create a CLI Chatloop and define the Crew

python
print("Chat started! Type 'exit' or 'quit' to end.\n")

conversation_context = ""

while True:
    user_input = input("You: ").strip()

    if user_input.lower() in ["exit", "quit", "bye"]:
        print("\nGoodbye!")
        break

    if not user_input:
        continue

    conversation_context += f"\nUser: {user_input}\n"
    print("\nAgent is thinking...\n")

    task = Task(
        description=(
            f"Conversation history:\n{conversation_context}\n\n"
            f"Current request: {user_input}"
        ),
        expected_output="A helpful response addressing the user's request",
        agent=agent,
    )

    crew = Crew(agents=[agent], tasks=[task], verbose=False)
    result = crew.kickoff()
    response = str(result)

    conversation_context += f"Agent: {response}\n"
    print(f"Agent: {response}\n")
What's Happening:
  • Interactive CLI Setup: The code creates an infinite loop that continuously prompts for user input and maintains the entire conversation history in a string variable.
  • Input Validation: Empty inputs are ignored to prevent processing blank messages and keep the conversation clean.
  • Context Building: Each user message is appended to the conversation context, which preserves the full dialogue history for better agent responses.
  • Dynamic Task Creation: For every user input, a new Task is created that includes both the full conversation history and the current request as context.
  • Crew Execution: A Crew is instantiated with the agent and task, then kicked off to process the request and generate a response.
  • Response Management: The agent's response is converted to a string, added to the conversation context, and displayed to the user, maintaining conversational continuity.

Complete Code

Here's the complete code to get you started with Hubspot and CrewAI:

python
from crewai import Agent, Task, Crew, LLM
from crewai_tools import MCPServerAdapter
from composio import Composio
from dotenv import load_dotenv
import os

load_dotenv()

GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
COMPOSIO_API_KEY = os.getenv("COMPOSIO_API_KEY")
COMPOSIO_USER_ID = os.getenv("COMPOSIO_USER_ID")

if not GOOGLE_API_KEY:
    raise ValueError("GOOGLE_API_KEY is not set in the environment.")
if not COMPOSIO_API_KEY:
    raise ValueError("COMPOSIO_API_KEY is not set in the environment.")
if not COMPOSIO_USER_ID:
    raise ValueError("COMPOSIO_USER_ID is not set in the environment.")

# Initialize Composio and create a session
composio = Composio(api_key=COMPOSIO_API_KEY)
session = composio.create(
    user_id=COMPOSIO_USER_ID,
    toolkits=["hubspot"],
)
url = session.mcp.url

# Configure LLM
llm = LLM(
    model="gpt-5",
    api_key=os.getenv("OPENAI_API_KEY"),
)

server_params = {
    "url": url,
    "transport": "streamable-http",
    "headers": {"x-api-key": COMPOSIO_API_KEY},
}

with MCPServerAdapter(server_params) as tools:
    agent = Agent(
        role="Search Assistant",
        goal="Help users with internet searches",
        backstory="You are an expert assistant with access to Composio Search tools.",
        tools=tools,
        llm=llm,
        verbose=False,
        max_iter=10,
    )

    print("Chat started! Type 'exit' or 'quit' to end.\n")

    conversation_context = ""

    while True:
        user_input = input("You: ").strip()

        if user_input.lower() in ["exit", "quit", "bye"]:
            print("\nGoodbye!")
            break

        if not user_input:
            continue

        conversation_context += f"\nUser: {user_input}\n"
        print("\nAgent is thinking...\n")

        task = Task(
            description=(
                f"Conversation history:\n{conversation_context}\n\n"
                f"Current request: {user_input}"
            ),
            expected_output="A helpful response addressing the user's request",
            agent=agent,
        )

        crew = Crew(agents=[agent], tasks=[task], verbose=False)
        result = crew.kickoff()
        response = str(result)

        conversation_context += f"Agent: {response}\n"
        print(f"Agent: {response}\n")

Conclusion

You now have a CrewAI agent connected to Hubspot through Composio's Tool Router. The agent can perform Hubspot operations through natural language commands.

Next steps:

  • Add role-specific instructions to customize agent behavior
  • Plug in more toolkits for multi-app workflows
  • Chain tasks for complex multi-step operations
TOOLS & TRIGGERS

Supported Tools and Triggers

Every Hubspot action and event your agent gets out of the box.

Add asset association

Associates an existing asset ('FORM', 'OBJECT_LIST', or 'EXTERNAL_WEB_URL') with a specified HubSpot marketing campaign.

Add token to event template

Adds a new custom data token to an existing event template for a specified HubSpot application, optionally populating a CRM object property if objectPropertyName is provided.

Archive batch of feedback submissions by id

Asynchronously archives a batch of HubSpot feedback submissions using their unique IDs, which must correspond to valid and existing submissions; the operation is queued, and submissions are moved from active views without being deleted.

Archive batch of line items by id

Archives a batch of existing line items by their unique IDs in HubSpot CRM; this operation is irreversible via the API.

Archive batch of objects by id

Archives a batch of existing, non-archived CRM objects of a specified `objectType` by their IDs, effectively hiding them from active use.

Archive batch of properties

Archives a batch of properties by their internal names for a specified HubSpot CRM object type; this operation is idempotent and safe to retry.

Archive a batch of quotes by id

Archives a batch of existing quotes by their IDs, removing them from active views while keeping them accessible in your HubSpot account for viewing, downloading, cloning, or deletion; note that archived quotes cannot be restored to active status.

Archive companies

Archives multiple HubSpot companies by their IDs.

Archive company

Archives an existing company in HubSpot CRM by its `companyId`, moving it to a recycling bin from which it can be restored, rather than permanently deleting it.

Archive contact

Archives a HubSpot contact by its ID.

Archive contacts

Archives multiple HubSpot contacts by their IDs.

Archive a CRM object by ID

Archives a specific HubSpot CRM object by its type and ID, moving it to the recycling bin; this action is irreversible via the API but objects can often be restored via the HubSpot UI.

Archive deals

Archives multiple HubSpot deals by their IDs.

ArchiveEmail email

Archives the HubSpot email specified by `emailId` by moving it to the recycling bin, making it inaccessible unless restored.

Archive emails

Archives multiple HubSpot emails by their IDs.

Archive feedback submission

Archives an existing, non-archived Feedback Submission in HubSpot CRM by its ID, moving it to the recycling bin (not permanently deleting it).

Archive line item by id

Archives a specific HubSpot line item by its ID, moving it to a recoverable state.

Archive product

Archives a HubSpot product by its ID.

Archive products

Archives multiple HubSpot products by their IDs.

Archive property by object type and name

Archives a specified CRM property by its object type and name, moving it to the recycling bin; note that some default HubSpot properties cannot be archived.

Archive property group

Archives a HubSpot property group, making it inactive and hidden (not permanently deleted, allowing potential restoration) with immediate effect on its CRM visibility and usability.

Archive quote object by id

Archives a HubSpot Quote object by ID, moving it to the recycling bin where it can be restored within 90 days.

Archive ticket

Archives a HubSpot ticket by its ID.

Archive tickets

Archives multiple HubSpot tickets by their IDs.

Audit pipeline changes by id

Retrieves a reverse chronological audit log of all changes for a specific, existing HubSpot CRM pipeline, which is identified by its `pipelineId` and a valid `objectType` that supports pipelines (e.

Batch read companies by properties

Batch-retrieves up to 100 HubSpot company records by their IDs in a single request.

Batch update quotes

Updates multiple existing HubSpot quotes in a batch; each quote is identified by its object ID or a custom unique property (via `idProperty`), and only writable properties are modified.

Cancel active import

Cancels an active HubSpot data import job using its `importId`; this action is irreversible, and any data already processed will remain.

Clone marketing email

Duplicates an existing HubSpot marketing email, identified by its `id`, into a new draft; an optional `cloneName` can be assigned to this new email copy.

Configure calling extension settings

Configures or updates settings for a HubSpot app's calling extension, including its name, UI URL, iframe dimensions, `isReady` status, and `supportsCustomObjects` flag, for the specified `appId`.

Create A/B test variation

Creates a new A/B test variation for an existing HubSpot marketing email, using its `contentId`; the new variation is created as a draft that can be edited before publishing.

Create a new property group

Creates a new, empty property group for a specified CRM object type in HubSpot, requiring a unique group name for that object type; properties must be added separately.

Create a new marketing email

Creates a new marketing email in HubSpot, allowing comprehensive configuration of content, recipients, sender details, A/B testing, scheduling, web version, and other settings; the internal `name` for the email is required.

Create association for object type

Creates a new custom association definition (schema) for a custom object in HubSpot, specifying how this object type can relate to another object type; this defines the association type itself, not actual record-to-record links.

Create batch of feedback submissions

Creates a batch of feedback submissions in HubSpot, ideal for bulk imports; all property names, `associationTypeId`s, and association `to_id`s must reference existing entities in HubSpot.

Create batch of objects

Creates multiple CRM objects of a specified `objectType` (e.

Create batch of properties

Efficiently creates multiple CRM properties in a single batch for a specified HubSpot object type (e.

Create batch of quotes

Creates multiple HubSpot CRM quotes in a batch, ideal for bulk operations; provide meaningful quote details in `inputs` as property requirements can vary, and inspect response for individual quote statuses as partial success is possible.

Create campaign

Creates a new HubSpot campaign.

Create campaigns

Creates multiple HubSpot campaigns by calling the single campaign creation endpoint for each campaign.

Create companies

Creates multiple new HubSpot companies in a single batch operation.

Create company

Creates a new HubSpot company.

Create contact

Creates a new HubSpot contact.

Create Contact From Natural Language

Creates a new contact in HubSpot from a natural language description.

Create contacts

Creates multiple new HubSpot contacts in a single batch operation.

Create CRM Object From Natural Language

Creates a new CRM object (contact, deal, company, ticket, or custom object) in HubSpot from a natural language description.

Create CRM object with properties

Creates a new HubSpot CRM object (e.

Create deal

Creates a new HubSpot deal.

Create Deal From Natural Language

Creates a new deal in HubSpot from a natural language description.

Create deals

Creates multiple deals in HubSpot CRM; ensure any associated object IDs, deal stages, and pipeline IDs specified are valid and exist within the HubSpot account.

Create email

Creates a new HubSpot email engagement record.

Create emails

Creates multiple HubSpot emails in a single batch operation.

Create event template for app

Creates a new event template for a HubSpot app, defining structure, custom properties (tokens), and appearance (Markdown with Handlebars) of custom timeline events for CRM objects; this template must exist before logging corresponding events.

Create feedback submission

Creates a new HubSpot feedback submission to record customer feedback (e.

Create line item

Creates a new HubSpot line item.

Create line items

Creates multiple HubSpot line items in a single batch operation.

Create note

Creates a new HubSpot CRM note.

Create object association

Tool to create or label an association between two CRM records using HubSpot Associations v4 API.

Create new object schema with custom properties

Creates a new custom object schema in HubSpot CRM with unique naming for schema and properties, defined display/required/searchable properties within the 'properties' list, provided immutable labels, and correctly configured 'enumeration' type properties (options/referencedObjectType).

Create or update draft version

Creates or updates the draft version of a marketing email identified by `emailId`; if no draft exists, a new one is created from the current live version to prepare changes or A/B tests before publishing.

Create pipeline for object type

Creates a new HubSpot pipeline for a specified CRM `objectType` (e.

Create pipeline stage

Creates a new stage in a specified HubSpot CRM pipeline for a given object type, such as 'deals' or 'tickets'.

Create product

Creates a new HubSpot product.

Create products

Creates multiple HubSpot products in a single batch operation.

Create property for specified object type

Creates a new custom property for a specified HubSpot CRM object type; ensure `groupName` refers to an existing property group for the `objectType`.

Create quote object

Creates a new quote object in HubSpot CRM with specified properties and associations.

Create task

Creates a new CRM task record.

Create ticket

Creates a new HubSpot ticket.

Create tickets

Creates multiple HubSpot tickets in a batch, each with its own properties and associations; `inputs` list must not be empty, each item needs `properties`, and associations/custom properties must be validly defined using internal names for custom fields and ISO 8601 for dates.

Create timeline event based on template

Creates an immutable custom timeline event on a CRM object's record using a specified, existing event template (identified by `eventTemplateId`), optionally updating CRM object properties if defined in the template; requires `email`, `utk`, or `objectId` for association.

Create multiple timeline events batch

Creates multiple immutable timeline events in a batch, ideal for bulk data imports or real-time synchronizations, using a valid event template; may update CRM properties if the template is so configured.

Create workflow

Creates a new HubSpot workflow to automate processes; ensure `enrollmentCriteria` and `actions` use properties relevant to the specified `objectTypeId`.

Delete calling extension settings

Permanently deletes the settings for a calling extension app, specified by its `appId`, rendering it unusable for all connected HubSpot accounts; this operation is irreversible.

Delete campaign

Permanently deletes a marketing campaign from HubSpot using its `campaignGuid`; returns a 204 No Content status even if the campaign does not exist.

Archive a batch of campaigns

Archives a batch of up to 50 marketing campaigns, hiding them from active views rather than permanently deleting them.

Permanently delete company for GDPR compliance

Permanently deletes a company (identified by objectId) and its associated data from HubSpot for GDPR compliance; this action is irreversible and requires the company to exist.

Permanently delete contact for GDPR compliance

Irreversibly erases a HubSpot contact and associated data per a GDPR request; if an email is given for a non-existent contact, it's blocklisted.

Archive deal (GDPR permanent delete not supported for deals)

Archives a HubSpot deal by its ID.

Permanently delete line items for gdpr

Permanently deletes a specified line item and its associated content for GDPR compliance; this action is irreversible and cannot be undone.

Delete a marketing email

Permanently deletes a marketing email from your HubSpot account.

Delete pipeline by id

Permanently deletes a HubSpot pipeline and all its stages by `pipelineId` and `objectType`; this is irreversible, so use validation flags to avoid errors if the pipeline is not empty.

Delete pipeline stage by id

Permanently deletes a specific pipeline stage for an `objectType` (e.

Delete schema by object type

Deletes a HubSpot custom object schema by `objectType`.

Delete timeline event template

Permanently and irreversibly deletes a specific timeline event template, identified by its `eventTemplateId`, from the application `appId`.

Delete video conferencing app settings

Irreversibly deletes all settings for a video conferencing application identified by its `appId` in HubSpot, removing its configuration and preventing it from functioning until reconfigured; existing meetings and historical data are unaffected.

Delete workflow

Permanently deletes a HubSpot workflow by its ID; deleted workflows cannot be restored via the API and the ID must exist.

Fetch import error details

Fetches a paginated list of read-only error details for a specific HubSpot CRM import, requiring a valid `importId` for a processed import.

Fetch recording settings by app ID

Fetches call recording settings for a specified, existing HubSpot calling extension app.

Fetch revenue

Fetches a revenue attribution report for a specified, existing marketing campaign, optionally using a specific attribution model and date range; if both start and end dates are given, `endDate` must not be earlier than `startDate`.

Get the variation of an A/B marketing email

Retrieves the alternate variation of a specified A/B marketing email; the `emailId` must identify an email currently in an A/B test.

Get Account Information

Gets current HubSpot account info (email, hubId, user details) using access-token lookup.

Get active imports list

Retrieves a list of currently active import jobs in HubSpot for monitoring ongoing data operations.

Get aggregated statistic intervals

Retrieves aggregated statistics for marketing emails (e.

Get aggregated statistics

Retrieves aggregated statistics for marketing emails, optionally within an ISO8601 formatted time range, by email IDs, or specific email properties.

Get all marketing emails for a HubSpot account

Fetches a list of marketing emails from a HubSpot account, with options for filtering, sorting, pagination, and including performance statistics.

Get campaign

Retrieves a HubSpot campaign by its ID.

Get campaign metrics

Retrieves key attribution metrics for an existing marketing campaign, identified by its `campaignGuid`, within an optional date range.

Get campaigns

Retrieves multiple HubSpot campaigns.

Get company

Retrieves a HubSpot company by its ID.

Get contact IDs

Fetches a list of contact IDs for a specific HubSpot campaign based on interaction type.

Get deal

Retrieves a HubSpot deal by its ID.

Get deals

Retrieves multiple HubSpot deals by their IDs in a single batch request.

Get emails

Retrieves multiple HubSpot email engagement records by their IDs in a single batch request.

Get specific event template for app

Retrieves detailed information about a specific event template for a given application in HubSpot's CRM timeline.

Get import record information

Retrieves a comprehensive summary of a specific HubSpot CRM import record by its `importId`, including status, progress, updates, results, and errors; useful for monitoring and troubleshooting data imports.

Get draft version of a marketing email

Retrieves the draft version of a marketing email by its `emailId`; if no draft exists, returns the published version.

Get a revision of a marketing email

Retrieves a specific, previously saved revision of a marketing email using its unique email ID and revision ID.

Get revisions of a marketing email

Retrieves a paginated list of all historical versions (including full state like content, settings, metadata) for a specified, existing marketing email; revision ID -1 identifies the current version.

Return pipeline by id

Retrieves a specific pipeline by its ID and CRM object type, detailing its stages and properties.

Get pipeline stage audit

Retrieves a reverse chronological list of all mutations (changes) for a specific pipeline stage, including CREATE and UPDATE events with timestamps and details.

Get product

Retrieves a HubSpot product by its ID.

Get products

Retrieves multiple HubSpot products by their IDs.

Get quote by id

Retrieves a specific HubSpot quote by its unique identifier.

Get segment members

Tool to retrieve segment (list) members ordered by join timestamp.

Get the details of a specified marketing email

Retrieves detailed information for a specific marketing email in HubSpot using its unique email ID, optionally including performance statistics and specific properties.

Get ticket

Retrieves a HubSpot ticket by its ID.

Get tickets

Retrieves multiple HubSpot tickets by their IDs.

Get workflow by ID

Retrieves comprehensive details for an existing HubSpot workflow by its unique ID; unsupported actions are designated 'UNSUPPORTED_ACTION' in the response.

Get all workflows

Retrieves a list of workflow summaries (ID, name, type, status) from HubSpot, using the 'limit' parameter for pagination.

List assets

Lists assets of a specific `assetType` for a given HubSpot marketing `campaignGuid`, optionally including performance metrics for a date range.

List association types

Lists all valid association types between two specified HubSpot CRM object types.

List companies

Retrieves a paginated list of HubSpot companies.

List contact properties

Lists all contact properties in your HubSpot account, including custom properties you've created.

List contacts

Retrieves a paginated list of HubSpot contacts.

List deals

Retrieves a paginated list of HubSpot deals.

List Emails

Retrieves a paginated list of HubSpot emails, allowing selection of specific properties (with or without history), associated object IDs, and filtering by archive status.

List all event templates for app

Retrieves all event templates associated with a valid `appId` for an existing application in HubSpot's CRM Timeline.

List feedback submissions page

Retrieves a paginated list of feedback submissions from HubSpot, allowing specification of properties (including history), associated object IDs, and filtering by archive status.

List granted OAuth scopes

Tool to introspect the current OAuth access token and return its granted scopes and metadata.

List object associations

List all associations from a single CRM record to a specified target object type.

List products

Retrieves a paginated list of HubSpot products.

List quotes page

Retrieves a paginated list of quotes, allowing selection of specific properties, property history, associated object IDs, and filtering by archived status.

List tickets

Retrieves a paginated list of HubSpot tickets.

Merge two companies of same type

Merges two existing company records of the same type in HubSpot CRM, where `objectIdToMerge` is absorbed into `primaryObjectId`; this operation is irreversible.

Merge contacts

Merges two HubSpot contacts into one.

Merge deals

Merges two HubSpot deals into one.

Merge emails

Merges two HubSpot emails into one.

Merge two feedback submissions

Merges two existing feedback submissions by ID, primarily for consolidating duplicates or related feedback; this operation is irreversible, and `primaryObjectId` values take precedence in conflicts.

Merge two line items of same type

Merges two line items, `objectIdToMerge` into `primaryObjectId`, which must be of the same type; `objectIdToMerge` is absorbed and the operation is irreversible.

Merge two objects of same type

Merges two distinct HubSpot CRM objects of the same `objectType`, consolidating data into `primaryObjectId` (which is preserved) and deleting `objectIdToMerge`; this operation is permanent and irreversible.

Merge products

Merges two HubSpot products into one.

Merge two quotes of same type

Merges two distinct quotes of the same type by consolidating `objectIdToMerge` into `primaryObjectId` (e.

Merge tickets

Merges two HubSpot tickets into one.

Partially update CRM object by ID

Partially updates specified properties of a CRM object (e.

Permanently delete contact via GDPR

Permanently deletes a HubSpot contact and all its associated data for GDPR compliance, identifying the contact by its ID or another unique property.

Publish or send a marketing email

Publishes or sends a specified HubSpot marketing email that is valid and ready for sending; requires Marketing Hub Enterprise or the transactional email add-on.

Read a CRM property by name

Reads a specific CRM property definition for a given HubSpot object type by its internal name.

Read all properties for object type

Retrieves definitions and metadata (not actual values) for properties of a specified HubSpot CRM object type (e.

Read a page of objects by type

Retrieves a paginated list of objects for a specified and valid HubSpot CRM object type (e.

Batch read associations

Tool to batch-read CRM associations (e.

Read a batch of CRM object properties

Retrieves property definitions (metadata) for a batch of CRM object properties for a specified object type.

Read batch feedback submissions by id or property

Retrieves up to 100 feedback submissions in a batch using their IDs or a specified unique `idProperty`, optionally including specified properties and their history.

Read batch of crm objects by id or property values

Reads a batch of CRM objects of a specified `objectType` using their HubSpot IDs or unique property values from the `inputs` list, allowing retrieval of specific `properties`, their historical values (`propertiesWithHistory`), and filtering by `archived` status.

Read batch of line items by id or property values

Retrieves a batch of HubSpot CRM line items by their IDs, or optionally by values of a custom unique property defined in `idProperty`.

Read batch of quotes by property values

Efficiently retrieves a batch of HubSpot CRM quotes by their IDs (or a specified unique property), optionally including archived quotes, specific properties, and property history.

Read budget

Fetches detailed budget (total, spent, remaining) and spend information for a marketing campaign, including an 'order' field for sequencing budget/spend items (0 is oldest).

Read contact

Retrieves a HubSpot contact by its ID.

Read contacts

Batch read multiple HubSpot contacts by their IDs or custom identifier property.

Read crm object by id

Retrieves a specific CRM object (e.

ReadEmail Email

Call this to retrieve an existing HubSpot email by its `emailId` or an alternative unique `idProperty`.

Read feedback submission by id

Reads a HubSpot feedback submission by its ID, optionally using a custom unique 'idProperty', and allows specifying properties to return including history and associations.

Read a property group

Retrieves metadata for a specific property group of a given CRM object type, detailing its structure and attributes, but not the actual property values of CRM objects.

Read property groups for object type

Retrieves all property groups in a single call for a specified HubSpot CRM object type (e.

Remove asset association

Disassociates an asset from a HubSpot marketing campaign.

Remove association between CRM records

Tool to remove all associations between two CRM records using the v4 associations endpoint.

Remove association from schema

Permanently removes a specified association definition (type) from a HubSpot object's schema, preventing future creations of this association type without affecting existing instances.

Remove deal

Removes a HubSpot deal by its ID.

Remove token from event template

Removes a token from a HubSpot event template, preventing its inclusion in new events created from that template.

Render event detail template

Renders detailed information for a specific HubSpot CRM timeline event using a predefined event template, ignoring `extraData` references in the template not present in event data.

Render event header or detail as html

Renders an event's header or detail template as HTML for a specified event on the HubSpot CRM timeline, using a given event template ID and event ID.

Replace all properties of pipeline

Overwrites an entire CRM pipeline (specified by `objectType` and `pipelineId`) and all its stages with a new definition, returning the updated pipeline.

Replace pipeline stage properties

Replaces all properties of a specified pipeline stage; the new `label` must be unique within the pipeline, and if `objectType` is 'deals', the `metadata` must include a 'probability' key.

Reset draft

Resets a marketing email's draft to its currently published (live) version, discarding all unpublished changes; the email must have a live version to revert to.

Restore a revision of a marketing email to draft state

Restores a specific revision of a marketing email to a DRAFT state, overwriting any existing draft.

Restore a revision of a marketing email

Restores a specific, existing, non-active revision of a marketing email to become the new live version for that email.

Retrieve all object schemas

Retrieves all object schema definitions (not data records) for a HubSpot account, supporting retrieval of either active or archived schemas.

Retrieve all pipelines for specified object type

Retrieves all pipelines in HubSpot for a specified CRM object type, such as deals or tickets.

Retrieve calling settings for app

Retrieves the read-only calling extension settings for a specific HubSpot app; the app must exist and have calling extensions configured.

Retrieve line item by id

Retrieves a HubSpot CRM line item by its ID or a specified unique property (`idProperty`).

Retrieve line items list

Fetches a paginated list of HubSpot CRM line items, allowing selection of specific properties (including history), associated object IDs, and filtering by archive status; ensure property and association names are valid HubSpot internal names.

Retrieve existing object schema

Fetches the detailed schema definition for a specified, existing standard or custom HubSpot CRM object type; this action is read-only and does not create or modify schemas.

Retrieve owner by ID or user ID

Retrieves a specific HubSpot CRM owner by their ID, with options to specify ID type (owner or user) and to include archived records.

Retrieve owners

Retrieves a list of all owners in the HubSpot CRM, including their ID, first name, last name, email, and user ID.

Retrieve page of crm owners

Retrieves a paginated list of CRM owners from HubSpot, optionally filtering by email or archived status.

Retrieve pipeline stage by id

Fetches detailed properties and metadata (e.

Retrieve pipeline stages

Fetches all stages for a specified HubSpot CRM object type and pipeline ID.

Retrieve timeline event by ids

Retrieves a specific HubSpot CRM timeline event by its application ID, event template ID, and event ID, returning event details including timestamp, tokens, and associated object information.

Retrieve video conference settings by id

Retrieves video conference application settings, such as webhook URLs and user/account management configurations, for a specified `appId`.

Search campaigns

Searches for HubSpot campaigns.

Search companies

Searches for HubSpot companies using flexible criteria and filters.

Search contacts by criteria

Searches for HubSpot contacts using a text query, specific filter criteria (filters in a group are ANDed, groups are ORed), sorting, and pagination to retrieve selected properties.

Search crm objects by criteria

Searches HubSpot CRM objects (e.

Search deals

Searches for HubSpot deals using flexible criteria and filters.

Search emails

Searches for HubSpot emails using flexible criteria and filters.

Search feedback submissions

Searches for feedback submissions in HubSpot CRM using text query, filter groups, sorting, and pagination, returning specified properties.

Search line items by criteria

Searches HubSpot line items using criteria including filters, sorting, and pagination; `after` must be a valid cursor from a previous response, and `sorts`/`properties` must refer to valid line item property names.

Search products

Searches for HubSpot products using flexible criteria and filters.

Search quotes by criteria

Searches HubSpot CRM quotes using a text query, complex filter criteria, sorting, and pagination.

Search tickets

Searches for HubSpot tickets using flexible criteria and filters.

Set call recording settings

Configures the URL (`urlToRetrieveAuthedRecording`) that HubSpot uses to retrieve call recordings for a specified third-party calling app (`appId`).

Initiate data import process

Call this action to start an asynchronous data import into HubSpot CRM using uploaded files and a detailed `importRequest` JSON configuration, ensuring this JSON correctly maps file columns to HubSpot properties and files align with these mappings.

Update a marketing email

Updates properties of an existing marketing email identified by its `emailId`; unspecified fields retain their current values.

Update batch feedback submissions

Updates a batch of HubSpot feedback submissions; property keys must be existing internal HubSpot names and values must be correctly formatted strings.

Update a batch of objects by id or property values

Performs a batch update on a valid `objectType` where properties are writeable and any `idProperty` used is designated unique; updates can be partial.

Update calling app recording settings

Updates the recording settings, such as the URL for retrieving authenticated recordings, for a specific calling extension app identified by its `appId`.

Modify calling extension settings

Updates settings (e.

Update campaign

Partially updates specific, writable properties of an existing HubSpot marketing campaign identified by `campaignGuid`; an empty string value in `properties` clears a property.

Update a batch of campaigns

Updates properties for up to 50 existing HubSpot marketing campaigns in a single batch operation.

Update companies

Updates multiple HubSpot companies in a single batch operation.

Update company

Updates properties for an existing HubSpot company.

Update contact

Updates properties for an existing HubSpot contact.

Update contacts

Updates multiple HubSpot contacts in a single batch operation.

Update specific CRM property

Updates attributes of an existing HubSpot CRM property, identified by its `objectType` and `propertyName`; only provided fields are modified, and changing a property's `type` can cause data loss if incompatible with existing data.

Update deal

Updates properties for an existing HubSpot deal.

Update deals

Updates multiple HubSpot deals in a single batch operation.

UpdateEmail Email

Partially updates properties of an existing HubSpot email object, identified by `emailId` (as internal ID or custom unique property value if `idProperty` is given); the object must exist.

Update emails

Updates multiple HubSpot emails in a single batch operation.

Update existing event template

Updates an existing HubSpot event template's name, display templates, and tokens; providing `tokens` replaces the entire existing list, and the `id` in the request body must match `eventTemplateId` in the path.

Update feedback submission by id

Partially updates writable properties of an existing HubSpot Feedback Submission, identified by its `feedbackSubmissionId` (which can be an internal object ID, or a unique property value if `idProperty` is specified).

Update line item object partially

Partially updates specified properties of an existing HubSpot Line Item, identified by `lineItemId` (as HubSpot object ID or value of `idProperty` if used); new values overwrite existing ones, and an empty string clears a property.

Update a batch of line items

Updates a batch of existing HubSpot CRM line items in a single operation, identifying each by its primary ID or a unique `idProperty` (which must be a unique identifier property in HubSpot), and modifies their specified properties.

Update existing object schema

Updates an existing custom object schema's metadata in HubSpot, such as its description, labels, display properties, required properties, searchable properties, and restorability, for a specified `objectType` that must already exist.

Partially update pipeline by id

Partially updates a CRM pipeline's label, display order, or restores an archived pipeline by setting `archived` to `false`.

Update pipeline stage by ids

Partially updates a HubSpot CRM pipeline stage identified by `objectType`, `pipelineId`, and `stageId`, requiring `metadata` in the request; unspecified fields are unchanged.

Update product

Updates properties for an existing HubSpot product.

Update products

Updates multiple HubSpot products in a single batch operation.

Partially update property group

Partially updates a property group's `displayOrder` or `label` for a specified CRM `objectType` in HubSpot.

Partial update quote by quote id

Performs a partial update on an existing HubSpot quote's specified properties, identifying the quote by `quoteId` (either its internal ID or a custom unique property value if `idProperty` is provided).

Update ticket

Updates properties for an existing HubSpot ticket.

Update tickets

Updates multiple HubSpot tickets in a single batch operation.

Update token on event template

Updates the label or options of an existing token within a specified HubSpot CRM event template; token name and data type remain unchanged.

Update video conference app settings

Updates webhook URLs (for creating/updating/deleting meetings, fetching accounts, verifying users) for a video conference application specified by `appId`.

FAQ

Frequently asked questions

With a standalone Hubspot MCP server, the agents and LLMs can only access a fixed set of Hubspot tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Hubspot and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. CrewAI fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Hubspot tools.

Yes, absolutely. You can configure which Hubspot scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Hubspot data and credentials are handled as safely as possible.

Start with Hubspot.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Hubspot tool your agent needs.Free to start.

Start building