Skip to main content

HubSpot

Connect your HubSpot CRM to Squid to search and retrieve contacts and companies

The HubSpot connector's functionality

The HubSpot connector enables Squid AI agents to look up CRM data on the user's behalf. The connector currently supports read-only access to contacts and companies:

CapabilityDescription
Search contactsFind contacts by a search query, returning ID, name, email, and company
Search companiesFind companies by a search query, returning ID, name, domain, and industry
Get contact detailsRetrieve the full details of a contact, including its associated companies
Get company detailsRetrieve the full details of a company, including its associated contacts

With these capabilities, users can ask an AI agent questions like "Find the contact for Jane at Acme" or "What companies do we have in the healthcare industry?" and the agent looks up the answer directly in HubSpot.

The connector uses the HubSpot CRM v3 API and handles HubSpot's rate limits automatically, backing off and retrying when limits are reached.

Creating a HubSpot private app access token

The connector authenticates to HubSpot using a private app access token:

  1. In your HubSpot account, navigate to Settings > Integrations > Service Keys.

  2. Create a new private app (or open an existing one).

  3. On the Scopes tab, grant the following read scopes:

    • crm.objects.contacts.read
    • crm.objects.companies.read
    • crm.schemas.contacts.read
    • crm.schemas.companies.read
  4. Create the app and copy its access token.

For more details, see HubSpot's documentation on private apps.

Adding the HubSpot connector to your Squid application

  1. Navigate to the Connectors tab in the Squid Console.

  2. Click Available Connectors.

  3. Find the HubSpot connector, and select Add Connector.

  4. Provide the following configuration details:

Connector ID: A string that uniquely identifies the connector in your code. This cannot be changed later.

Access Token: The access token from your HubSpot private app. The token is stored securely as a Squid secret.

Using the HubSpot connector in your application

No-code Studio

  1. Navigate to the Studio tab in the Squid Console.

  2. Click Create AI Agent.

  3. Provide an agent ID and description, such as "crm-agent" and "This agent helps the user look up contacts and companies in HubSpot".

  4. Click Add Abilities.

  5. Expand the HubSpot entry and select the HubSpot connector you created earlier.

  6. Give a description for how the agent should use this connection, such as "Call this when a user wants to look up CRM contacts or companies."

  7. Click on Test and try asking the agent "Find contacts at Acme".

Using the Squid SDK

If you are creating your AI agent with the Squid SDK, connect the HubSpot connector by adding it to the connectedIntegrations option of the ask() function:

await this.squid
.ai()
.agent('AGENT_ID')
.ask('Which of our contacts work at Acme?', {
connectedIntegrations: [
{
integrationId: 'HUBSPOT_CONNECTOR_ID',
integrationType: 'hubspot',
description: 'Call this connector to look up HubSpot contacts and companies',
},
],
});

To learn more about interacting with an agent from the SDK, view the AI agent documentation.