完整的HubSpot平台CLI——CRM联系人/公司/交易/工单、CMS博客文章/页面、营销邮件/表单/列表、对话、自动化工作流。
HubSpot by @altf1be.是一项面向实际任务的技能,主要用于Full HubSpot 平台 CLI 覆盖 CRM, CMS, 营销, 对话, 和自动化.;Setup. 在 HubSpot 创建一个私人 App: 设置 > 集成 > 私人 Apps.;
从功能定位来看,该技能强调把分散的操作要求整理成清晰、可复用的处理流程,使用户能够围绕既定目标快速准备输入、选择执行方式并获得结构化结果。实际使用前应先确认任务范围、数据来源、运行环境、必要权限和关键参数,再依据技能说明逐步执行;若输入条件不完整,应先补齐信息或采用保守配置,避免因错误假设导致结果偏离需求。
执行过程中需要关注工具调用是否成功、接口或依赖是否可用、输出格式是否符合预期,并对异常提示、缺失字段和边界情况进行处理;涉及批量任务时,还应保存进度,避免中断后重复操作。该技能适合用于一次性任务,也可以接入自动化工作流,与其他技能或上层代理配合完成更完整的业务链路;在组合使用时,应明确每一步的输入输出关系,并避免不同步骤之间出现参数冲突。
覆盖 CRM、CMS、Marketing、Conversations 和 Automation 全模块的 HubSpot 平台命令行工具(CLI)。
{baseDir} 目录下创建 .env 文件):# 必填(Private App 模式) HUBSPOT_ACCESS_TOKEN=pat-na1-xxxxxxxx # 或使用 OAuth 2.0 模式(需同时设置以下三项): # HUBSPOT_CLIENT_ID=your-client-id # HUBSPOT_CLIENT_SECRET=your-client-secret # HUBSPOT_REFRESH_TOKEN=your-refresh-token # 可选 # HUBSPOT_MAX_RESULTS=100
| 权限范围(Scope) | 说明 |
|---|---|
crm.objects.contacts.read |
查看联系人(contacts)的属性及其他详细信息 |
crm.objects.contacts.write |
创建、删除或修改联系人 |
crm.objects.companies.read |
查看公司(companies)的属性及其他详细信息 |
crm.objects.companies.write |
创建、删除或修改公司 |
crm.objects.deals.read |
查看交易(deals)的属性及其他详细信息 |
crm.objects.deals.write |
创建、删除或修改交易 |
crm.objects.owners.read |
查看分配给 CRM 记录的用户详情 |
crm.schemas.contacts.read |
查看联系人属性设置的详细信息 |
crm.schemas.companies.read |
查看公司属性设置的详细信息 |
crm.schemas.deals.read |
查看交易属性设置的详细信息 |
tickets |
查看、创建、删除或修改工单(tickets) |
automation |
工作流(Workflows) |
content |
网站(Sites)、落地页(Landing Pages)、CTA、邮件(Email)、博客(Blog)、营销活动(Campaigns) |
conversations.read |
查看消息、评论、会话线程(threads)、收件人/用户/分配详情 |
forms |
访问表单(Forms)API |
cd {baseDir} && npm install# 列出联系人
node {baseDir}/scripts/hubspot.mjs contacts list
# 按邮箱搜索联系人
node {baseDir}/scripts/hubspot.mjs contacts search --query "john@example.com"
# 查看联系人详情
node {baseDir}/scripts/hubspot.mjs contacts read --id 123
# 创建联系人
node {baseDir}/scripts/hubspot.mjs contacts create --email "jane@example.com" --firstname Jane --lastname Doe
# 更新联系人
node {baseDir}/scripts/hubspot.mjs contacts update --id 123 --phone "+1234567890"
# 删除联系人(需显式指定 --confirm)
node {baseDir}/scripts/hubspot.mjs contacts delete --id 123 --confirm
node {baseDir}/scripts/hubspot.mjs companies list
node {baseDir}/scripts/hubspot.mjs companies search --query "Acme"
node {baseDir}/scripts/hubspot.mjs companies read --id 456
node {baseDir}/scripts/hubspot.mjs companies create --name "Acme Corp" --domain "acme.com"
node {baseDir}/scripts/hubspot.mjs companies update --id 456 --industry "Technology"
node {baseDir}/scripts/hubspot.mjs companies delete --id 456 --confirm
node {baseDir}/scripts/hubspot.mjs deals list
node {baseDir}/scripts/hubspot.mjs deals search --query "Enterprise"
node {baseDir}/scripts/hubspot.mjs deals read --id 789
node {baseDir}/scripts/hubspot.mjs deals create --name "Big Deal" --amount 50000 --stage appointmentscheduled
node {baseDir}/scripts/hubspot.mjs deals update --id 789 --stage closedwon
node {baseDir}/scripts/hubspot.mjs deals delete --id 789 --confirm
node {baseDir}/scripts/hubspot.mjs tickets list
node {baseDir}/scripts/hubspot.mjs tickets search --query "Bug"
node {baseDir}/scripts/hubspot.mjs tickets read --id 101
node {baseDir}/scripts/hubspot.mjs tickets create --subject "Login broken" --priority HIGH
node {baseDir}/scripts/hubspot.mjs tickets update --id 101 --stage 2
node {baseDir}/scripts/hubspot.mjs tickets delete --id 101 --confirm
node {baseDir}/scripts/hubspot.mjs owners list
node {baseDir}/scripts/hubspot.mjs owners list --email "john@company.com"
node {baseDir}/scripts/hubspot.mjs owners read --id 55
# 列出交易管道(默认)
node {baseDir}/scripts/hubspot.mjs pipelines list
# 列出工单管道
node {baseDir}/scripts/hubspot.mjs pipelines list --object-type tickets
# 列出从联系人到公司的关联关系
node {baseDir}/scripts/hubspot.mjs associations list --from-type contacts --from-id 123 --to-type companies
# 创建关联关系
node {baseDir}/scripts/hubspot.mjs associations create --from-type contacts --from-id 123 --to-type companies --to-id 456 --type-id 1
# 删除关联关系(需显式指定 --confirm)
node {baseDir}/scripts/hubspot.mjs associations delete --from-type contacts --from-id 123 --to-type companies --to-id 456 --confirm
# 列出联系人属性(默认)
node {baseDir}/scripts/hubspot.mjs properties list
# 列出交易属性
node {baseDir}/scripts/hubspot.mjs properties list --object-type deals
node {baseDir}/scripts/hubspot.mjs engagements notes
node {baseDir}/scripts/hubspot.mjs engagements emails
node {baseDir}/scripts/hubspot.mjs engagements calls
node {baseDir}/scripts/hubspot.mjs engagements tasks
node {baseDir}/scripts/hubspot.mjs engagements meetings
node {baseDir}/scripts/hubspot.mjs blog-posts list
node {baseDir}/scripts/hubspot.mjs blog-posts list --state PUBLISHED
node {baseDir}/scripts/hubspot.mjs blog-posts read --id 1001
node {baseDir}/scripts/hubspot.mjs blog-posts create --name "My Post"
node {baseDir}/scripts/hubspot.mjs blog-posts update --id 1001 --name "Updated Title"
node {baseDir}/scripts/hubspot.mjs pages list
node {baseDir}/scripts/hubspot.mjs pages read --id 2001
node {baseDir}/scripts/hubspot.mjs domains list
node {baseDir}/scripts/hubspot.mjs email-campaigns list
node {baseDir}/scripts/hubspot.mjs email-campaigns read --id 3001
node {baseDir}/scripts/hubspot.mjs forms list
node {baseDir}/scripts/hubspot.mjs forms read --id 4001
node {baseDir}/scripts/hubspot.mjs marketing-emails list
node {baseDir}/scripts/hubspot.mjs marketing-emails read --id 5001
node {baseDir}/scripts/hubspot.mjs marketing-emails stats --id 5001
node {baseDir}/scripts/hubspot.mjs lists list
node {baseDir}/scripts/hubspot.mjs lists read --id 6001
node {baseDir}/scripts/hubspot.mjs conversations list
node {baseDir}/scripts/hubspot.mjs conversations read --id 7001
node {baseDir}/scripts/hubspot.mjs messages list --thread-id 7001
node {baseDir}/scripts/hubspot.mjs workflows list
node {baseDir}/scripts/hubspot.mjs workflows read --id 8001
--confirm 参数~/.cache/openclaw/hubspot-token.jsoncommander — CLI 框架dotenv — 环境变量加载工具fetch(要求 Node.js 版本 ≥ 18)Abdelkrim BOUJRAF — ALT-F1 SRL,布鲁塞尔 🇧🇪 🇲🇦
X(原 Twitter): @altf1be
相关专题
热门下载
相关下载
精品课程
共6课时 | 54.7万人学习
共89课时 | 134.1万人学习
共49课时 | 82.6万人学习
最新文章