360 Secure SkillHub
360 安全技能中心

Native HubSpot

这是直接对接HubSpot API的CRM操作工具,核心功能含查询、创建、更新、关联联系人、公司、交易、工单、管道等对象。典型场景如客户数据管理、交易跟进等。需先配置HUBSPOT_TOKEN环境变量,通过bash命令调用Python脚本传参执行,输出对应CRM数据或操作反馈。

codeninja23
codeninja23
热度 85.13
最近更新 2026-05-11 17:26:52
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:CRM / 数据处理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add native-hubspot
Metadata
name
hubspot
description
Query and manage HubSpot CRM data via the HubSpot API. Use when you need to search or manage contacts, companies, deals, tickets, or pipelines. Supports creating, updating, and associating CRM objects. Calls api.hubapi.com directly with no third-party proxy.
metadata
{"openclaw":{"requires":{"env":["HUBSPOT_TOKEN"],"bins":["python3"]},"primaryEnv":"HUBSPOT_TOKEN","files":["scripts/*"]}}

HubSpot

Interact with HubSpot CRM directly via the HubSpot API (api.hubapi.com).

Setup (one-time)

  1. In HubSpot: Settings → Integrations → Private Apps → Create a private app
  2. Give it scopes: crm.objects.contacts.read, crm.objects.contacts.write, crm.objects.companies.read, crm.objects.companies.write, crm.objects.deals.read, crm.objects.deals.write, tickets
  3. Copy the access token
  4. Set environment variable:
    HUBSPOT_TOKEN=pat-na1-...
    

Queries

Search contacts

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py search contacts --query "john"
python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py search contacts --email "john@example.com"

List contacts

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py list contacts --limit 20

Get a specific object

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py get contacts 12345
python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py get companies 67890
python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py get deals 11111

List companies

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py list companies --limit 20

Search companies

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py search companies --query "Acme"

List deals

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py list deals --limit 20

Search deals

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py search deals --query "enterprise"

List tickets

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py list tickets --limit 20

Create a contact

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py create contacts --email "new@example.com" --firstname "Jane" --lastname "Doe"

Create a company

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py create companies --name "Acme Corp" --domain "acme.com"

Create a deal

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py create deals --dealname "Enterprise Plan" --amount 50000 --pipeline default --dealstage appointmentscheduled

Update an object

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py update contacts 12345 --email "new@example.com" --phone "+1234567890"
python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py update deals 11111 --dealstage closedwon --amount 75000

Associate objects

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py associate contacts 12345 companies 67890

List pipelines

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py pipelines deals
python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py pipelines tickets

List owners

python3 /mnt/skills/user/hubspot/scripts/hubspot_query.py owners