Skip to main content

Matimo provider — HubSpot CRM tools (contacts, deals, companies, tickets)

Project description

matimo-hubspot

HubSpot CRM tools for Matimo — manage contacts, companies, deals, tickets, and more.

PyPI Docs


Installation

pip install matimo matimo-hubspot

Available Tools (50 Total)

Full CRUD coverage across 10 HubSpot object types:

Object Create Get List Update Delete
Contacts
Companies
Deals
Tickets
Leads
Products
Line Items
Orders
Invoices
Custom Objects

Tool naming convention: hubspot-{verb}-{object}

Examples: hubspot-create-contact, hubspot-list-deals, hubspot-update-ticket, hubspot-delete-company


Quick Start

import asyncio
import os
from matimo import Matimo
from matimo_hubspot import get_tools_path

async def main():
    matimo = await Matimo.init(get_tools_path())

    # Create a contact
    contact = await matimo.execute('hubspot-create-contact', {
        'firstname': 'Jane',
        'lastname': 'Smith',
        'email': 'jane@example.com',
        'company': 'Acme Corp',
    })

    # List all deals
    deals = await matimo.execute('hubspot-list-deals', {
        'limit': 20,
    })

    # Update a ticket
    await matimo.execute('hubspot-update-ticket', {
        'ticket_id': '12345',
        'subject': 'Updated subject',
        'hs_pipeline_stage': '4',
    })

asyncio.run(main())

Authentication

export HUBSPOT_ACCESS_TOKEN="pat-na1-your-private-app-token"

Setting Up a HubSpot Private App

  1. In HubSpot, go to SettingsIntegrationsPrivate Apps
  2. Click Create a private app
  3. Under Scopes, select the CRM scopes you need (see table below)
  4. Copy the Access Token

Required Scopes by Object

Objects Scopes
Contacts crm.objects.contacts.read, crm.objects.contacts.write
Companies crm.objects.companies.read, crm.objects.companies.write
Deals crm.objects.deals.read, crm.objects.deals.write
Tickets tickets (read + write)
Custom Objects crm.objects.custom.read, crm.objects.custom.write

LangChain CRM Agent Example

from matimo import Matimo
from matimo_hubspot import get_tools_path
from matimo.integrations.langchain import convert_tools_to_langchain
from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate

matimo = await Matimo.init(get_tools_path())
lc_tools = convert_tools_to_langchain(
    matimo.list_tools(), matimo,
    credentials={'HUBSPOT_ACCESS_TOKEN': os.environ['HUBSPOT_ACCESS_TOKEN']},
)
llm = ChatOpenAI(model='gpt-4o-mini')
prompt = ChatPromptTemplate.from_messages([
    ('system', 'You are a CRM assistant.'),
    ('human', '{input}'),
    ('placeholder', '{agent_scratchpad}'),
])
agent = create_tool_calling_agent(llm, lc_tools, prompt)
executor = AgentExecutor(agent=agent, tools=lc_tools)
result = await executor.ainvoke({'input': 'Find all open deals and summarize pipeline status'})

Documentation


Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

matimo_hubspot-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matimo_hubspot-0.1.0-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file matimo_hubspot-0.1.0.tar.gz.

File metadata

  • Download URL: matimo_hubspot-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matimo_hubspot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 476ab89207b5e51c39dea0285f465473539cf9cbbcb59cfad547c15abbd156b2
MD5 afb40ca2e511382158a50829395b3db6
BLAKE2b-256 209a24f77e0b328f00484e257cbbedadd664f7c37bab5f352116d5f2bdc7973a

See more details on using hashes here.

File details

Details for the file matimo_hubspot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: matimo_hubspot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matimo_hubspot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b1597318d648859c34ed4d16455291056211c5c606c51e945d9d4ce48b2a169
MD5 3e47428e9e18028665a2a63e6cb8fc96
BLAKE2b-256 bc2a26c1c364fdc4ef01bb2d9c17075591a4445a4ab050078ef83bef2bb14bac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page