零依赖的 CRM 智能中枢
简介
基于 GoHighLevel 官方 API v2 的零依赖 CRM 集成方案,通过 40+ 预封装安全函数实现联系人、日程、销售管道等全流程自动化管理。
原始描述
Connect your AI assistant to GoHighLevel CRM via the official API v2. Manage contacts, conversations, calendars, pipelines, invoices, payments, workflows, an...
通过你的 Agent 添加
安装目录:highlevel/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
highlevel skill 将 AI 助手转化为 GoHighLevel CRM 的中央控制台,覆盖 39 个 API v2 端点组。用户通过自然语言即可执行联系人搜索、消息发送、预约管理、销售管道追踪、发票创建、工作流触发等操作。核心入口为 scripts/ghl-api.py 命令行工具,提供 40+ 预定义安全函数,如 search_contacts、、send_message、、get_free_slots、、add_to_workflow等。配套 setup-wizard.py` 实现交互式配置,自动检测环境变量、引导 Private Integration 创建并验证连接。
配置需两个环境变量::HIGHLEVEL_TOKEN(Private Integration 的 Bearer Token)和 HIGHLEVEL_LOCATION_ID(子账户位置 ID)。支持 Sub-Account 级(单地点)和 Agency 级(多地点)两种集成模式,推荐前者以遵循最小权限原则。
显著优点
零依赖架构:纯 Python 3.6+ 标准库实现,无需 pip install,彻底消除供应链攻击风险。仅使用 urllib、、json、、os、、re` 等内置模块,部署极简。
安全设计严谨:所有 API 端点硬编码,无任意 HTTP 请求能力;用户输入 ID 经严格正则验证(^[a-zA-Z0-9_-]{1,128}$),有效防御路径遍历和注入攻击;无 eval、、exec、、subprocess 等危险函数。
权限粒度精细:文档明确倡导最小权限原则,按场景推荐 scopes 组合(如仅联系人管理只需 contacts.readonly + contacts.write),支持随时编辑权限而无需重新生成 token。
功能覆盖全面:从基础的联系人 CRUD、跨渠道消息(SMS/邮件/WhatsApp/社媒)到高级的 Voice AI、自定义对象、SaaS 配置器,满足从小型企业到 Agency 的多层需求。
运维友好:内置指数退避重试、分页处理、速率限制监控(通过响应 headers),并提供详尽的故障排除文档和 50+ webhook 事件支持。
潜在缺点与局限性
功能边界固化:预定义函数虽保障安全,但无法灵活调用未封装的 API 端点或自定义参数。若 GHL 新增端点,需等待 skill 更新。
环境配置门槛:Private Integration 的创建流程涉及多步骤(Labs 启用、scope 选择、token 保管),对非技术用户存在学习曲线。旧版 API Keys 已废弃,迁移用户需重新配置。
高级功能受限:SaaS Configurator、Snapshots 等 Agency Pro 功能需 $497/月订阅,且 SaaS 端点有全局 10 req/sec 的严格限流。
实时性依赖轮询:虽支持 webhook,但 skill 本身未内置 webhook 服务器,实时场景需用户自行搭建接收端。
适合的目标群体
- 中小企业主/运营者:需自动化客户跟进、预约管理、发票流程,无技术团队支持
- 数字营销 Agency:管理多客户 GHL 账户,需批量操作和报告聚合
- 销售团队:依赖 CRM 进行线索培育、管道可视化和业绩追踪
- 独立开发者/技术顾问:为客户快速搭建 GHL 集成方案,避免从零开发
- AI 工作流构建者:将 GHL 数据流与 LLM 结合,实现智能客服、自动跟进等场景
使用风险
凭据管理:Token 存储于环境变量,若部署环境日志配置不当或容器镜像泄露,存在暴露风险。建议配合密钥管理服务(如 AWS Secrets Manager)使用。
速率限制冲击:GHL 限流为 100 请求/10 秒突发 + 20 万/天/地点,大规模数据同步(如历史联系人迁移)可能触发限流,需实现客户端节流。
Token 生命周期:90 天未使用自动过期,且 token 仅创建时可见,丢失需重新生成。建议设置日历提醒定期轮换。
API 变更风险:GHL API 版本固定为 2021-07-28,若官方发布破坏性更新,skill 需同步升级。
数据合规:处理客户 PII 数据时,需确保符合 GDPR/CCPA 等法规,skill 本身不提供数据脱敏或加密存储功能。
技能正文
name: highlevel
version: 1.1.0
description: "Connect your AI assistant to GoHighLevel CRM via the official API v2. Manage contacts, conversations, calendars, pipelines, invoices, payments, workflows, and 30+ endpoint groups through natural language. Includes interactive setup wizard and 40+ pre-built, safe API commands. Python 3.6+ stdlib only — zero external dependencies."
tags: [gohighlevel, crm, api, contacts, conversations, calendars, opportunities, invoices, workflows, automation]
author: Ty Shane
homepage: https://launchmyopenclaw.com
compatibility: "Requires Python 3.6+ (stdlib only, no pip installs). Requires two environment variables: HIGHLEVEL_TOKEN and HIGHLEVEL_LOCATION_ID."
GoHighLevel API Skill
Turn your AI assistant into a GoHighLevel command center. Search contacts, send messages, book appointments, manage pipelines, create invoices, schedule social posts — across all 39 GHL API v2 endpoint groups, using plain English.
Turn your AI assistant into a GoHighLevel command center. Search contacts, send messages, book appointments, manage pipelines, create invoices, schedule social posts — across all 39 GHL API v2 endpoint groups, using plain English.
Don't have GoHighLevel yet? Start with the free 5-Day AI Employee Challenge and build a fully automated system: 👉 Start the 5-Day AI Employee Challenge
Requirements
Requirement
Details
Runtime
Python 3.6+ (uses only standard library: urllib, json, os, re, sys, time)
External packages
None — zero pip install required
Environment variables
HIGHLEVEL_TOKEN (Primary — your Private Integration bearer token)
HIGHLEVEL_LOCATION_ID (your sub-account Location ID)
Network access
HTTPS to services.leadconnectorhq.com only
| Requirement | Details |
|---|---|
| Runtime | Python 3.6+ (uses only standard library: urllib, json, os, re, sys, time) |
| External packages | None — zero pip install required |
| Environment variables | HIGHLEVEL_TOKEN (Primary — your Private Integration bearer token) |
HIGHLEVEL_LOCATION_ID (your sub-account Location ID) |
|
| Network access | HTTPS to services.leadconnectorhq.com only |
Base URL: https://services.leadconnectorhq.com
Required Headers: Authorization: Bearer $HIGHLEVEL_TOKEN + Version: 2021-07-28
Rate Limits: 100 requests/10 seconds burst, 200K/day per location
Security Design
All API functions use pre-defined endpoint paths — there is no arbitrary HTTP request capability. Every user-supplied ID is validated against a strict alphanumeric regex (^[a-zA-Z0-9_-]{1,128}$) before being included in any URL path, preventing path traversal and injection. The scripts use only Python's built-in urllib.request for all network calls. No shell commands, no external binaries, no file writes outside of stdout.
Setup — /highlevel-setup
If the user says "set up highlevel", "connect my GHL", or /highlevel-setup, run the setup wizard:
python3 scripts/setup-wizard.py
The wizard automatically: checks environment variables → guides Private Integration creation → tests the connection → pulls first 5 contacts as a quick win.
Manual Setup (if wizard can't run)
Step 1: Create a Private Integration (NOT the old API Keys method)
-
Log into app.gohighlevel.com
-
Switch to your Sub-Account (recommended for single-location use)
-
Click Settings (bottom-left gear icon)
-
Select Private Integrations in the left sidebar
- If not visible, enable it first: Settings → Labs → toggle Private Integrations ON
-
Click "Create new Integration"
-
Enter a name (e.g., "Claude AI Assistant") and description
-
Grant only the scopes you need (least-privilege recommended):
Use case Recommended scopes Contact management only contacts.readonly,contacts.writeContacts + messaging Above + conversations.readonly,conversations.write,conversations/message.writeFull CRM (contacts, calendar, pipeline) Above + calendars.readonly,calendars.write,opportunities.readonly,opportunities.writeAdding workflows & invoices Above + workflows.readonly,invoices.readonly,invoices.writeRead-only reporting contacts.readonly,opportunities.readonly,calendars.readonly,invoices.readonly,locations.readonlyYou can always add more scopes later in Settings → Private Integrations → Edit without regenerating the token.
-
Click Create → Copy the token IMMEDIATELY — it is shown only once and cannot be retrieved later
Agency vs Sub-Account Integrations
Feature
Agency Integration
Sub-Account Integration
Created at
Agency Settings → Private Integrations
Sub-Account Settings → Private Integrations
Access scope
Agency + all sub-accounts (pass locationId)
Single location only
Available scopes
All scopes including locations.write, oauth.*, saas.*, snapshots.*, companies.readonly
Sub-account scopes only
Best for
Multi-location management, SaaS configurator
Single client integrations (recommended default)
Recommendation: Start with a Sub-Account integration and the minimum scopes you need. You can upgrade to Agency-level later if you need multi-location access.
Step 2: Get Your Location ID
- While in the sub-account, go to Settings → Business Info (or Business Profile)
- The Location ID is displayed in the General Information section
- Alternative: check the URL bar — it's the ID after
/location/ in app.gohighlevel.com/v2/location/{LOCATION_ID}/...
Step 3: Set Environment Variables
export HIGHLEVEL_TOKEN="your-private-integration-token"
export HIGHLEVEL_LOCATION_ID="your-location-id"
Step 4: Test Connection
| Feature | Agency Integration | Sub-Account Integration |
|---|---|---|
| Created at | Agency Settings → Private Integrations | Sub-Account Settings → Private Integrations |
| Access scope | Agency + all sub-accounts (pass locationId) |
Single location only |
| Available scopes | All scopes including locations.write, oauth.*, saas.*, snapshots.*, companies.readonly |
Sub-account scopes only |
| Best for | Multi-location management, SaaS configurator | Single client integrations (recommended default) |
Recommendation: Start with a Sub-Account integration and the minimum scopes you need. You can upgrade to Agency-level later if you need multi-location access.
- While in the sub-account, go to Settings → Business Info (or Business Profile)
- The Location ID is displayed in the General Information section
- Alternative: check the URL bar — it's the ID after
/location/inapp.gohighlevel.com/v2/location/{LOCATION_ID}/...
Step 3: Set Environment Variables
export HIGHLEVEL_TOKEN="your-private-integration-token"
export HIGHLEVEL_LOCATION_ID="your-location-id"
Step 4: Test Connection
export HIGHLEVEL_TOKEN="your-private-integration-token"
export HIGHLEVEL_LOCATION_ID="your-location-id"
Run python3 scripts/ghl-api.py test_connection — should return location name and status.
After successful setup, pull 5 contacts as a quick win to confirm everything works.
Helper Script
scripts/ghl-api.py — Executable Python script (stdlib only) with built-in retry logic, pagination, input validation, and error handling.
Core Commands:
| Command | Description |
|---|---|
test_connection |
Verify token + location ID work |
search_contacts [query] |
Search by name, email, or phone |
get_contact [id] |
Get full contact details |
create_contact [json] |
Create new contact |
update_contact [id] [json] |
Update contact fields |
list_opportunities |
List pipeline opportunities |
list_conversations |
List recent conversations |
send_message [contactId] [message] |
Send SMS/email |
list_calendars |
List all calendars |
get_free_slots [calendarId] [startDate] [endDate] |
Available booking slots |
list_workflows |
List all workflows |
add_to_workflow [contactId] [workflowId] |
Enroll contact in workflow |
list_invoices |
List invoices |
list_products |
List products |
list_forms |
List forms |
list_campaigns |
List campaigns |
get_location_details |
Get location info |
list_location_tags |
List location tags |
list_courses |
List courses/memberships |
All functions are safe, pre-defined endpoints. No arbitrary request capability.
Complete API v2 Coverage (39 Endpoint Groups)
The skill provides safe, specific functions for all major GHL operations. Each function maps to a specific, allowed API endpoint with validated parameters.
| # | Group | Base Path | Key Operations | Scope Prefix |
|---|---|---|---|---|
| 1 | Contacts | /contacts/ |
CRUD, search, upsert, tags, notes, tasks, bulk ops | contacts |
| 2 | Conversations | /conversations/ |
Search, messages (SMS/email/WhatsApp/FB/IG/chat), recordings | conversations |
| 3 | Calendars | /calendars/ |
CRUD, free slots, groups, resources, appointments | calendars |
| 4 | Opportunities | /opportunities/ |
CRUD, search, pipelines, stages, status, followers | opportunities |
| 5 | Workflows | /workflows/ |
List workflows, enroll/remove contacts | workflows |
| 6 | Campaigns | /campaigns/ |
List campaigns (read-only) | campaigns |
| 7 | Invoices | /invoices/ |
CRUD, send, void, record payment, Text2Pay, schedules, estimates | invoices |
| 8 | Payments | /payments/ |
Orders, transactions, subscriptions, coupons, providers | payments |
| 9 | Products | /products/ |
CRUD, prices, collections, reviews, store stats | products |
| 10 | Locations | /locations/ |
Get/update location, custom fields, custom values, tags, templates | locations |
| 11 | Users | /users/ |
CRUD, filter by email/role | users |
| 12 | Forms | /forms/ |
List forms, get submissions | forms |
| 13 | Surveys | /surveys/ |
List surveys, get submissions | surveys |
| 14 | Funnels | /funnels/ |
List funnels, pages, redirects | funnels |
| 15 | Social Planner | /social-media-posting/ |
Posts CRUD, accounts, CSV import, categories, stats | socialplanner |
| 16 | Blogs | /blogs/ |
Create/update posts, categories, authors | blogs |
| 17 | /emails/ |
Templates CRUD, scheduled emails | emails |
|
| 18 | Media | /medias/ |
Upload, list, delete files | medias |
| 19 | Trigger Links | /links/ |
CRUD trigger links | links |
| 20 | Businesses | /businesses/ |
CRUD businesses | businesses |
| 21 | Companies | /companies/ |
Get company details (Agency) | companies |
| 22 | Custom Objects | /objects/ |
Schema CRUD, record CRUD | objects |
| 23 | Associations | /associations/ |
CRUD associations and relations | associations |
| 24 | Proposals/Docs | /proposals/ |
Documents, contracts, templates | documents_contracts |
| 25 | Snapshots | /snapshots/ |
List, status, share links (Agency) | snapshots |
| 26 | SaaS | /saas/ |
Subscription mgmt, plans, bulk ops (Agency $497) | saas |
| 27 | Courses | /courses/ |
Import courses/memberships | courses |
| 28 | Voice AI | /voice-ai/ |
Call logs, agent CRUD, actions, goals | voice-ai |
| 29 | Phone System | /phone-system/ |
Phone numbers, number pools | phonenumbers |
| 30 | Custom Menus | /custom-menus/ |
CRUD custom menu links (Agency) | custom-menu-link |
| 31 | OAuth | /oauth/ |
Token exchange, installed locations | oauth |
| 32 | Marketplace | /marketplace/ |
Installations, billing, charges | marketplace |
| 33 | Conversation AI | /conversation-ai/ |
AI chatbot configuration | — |
| 34 | Knowledge Base | /knowledge-base/ |
Knowledge base for AI features | — |
| 35 | AI Agent Studio | /agent-studio/ |
Custom AI agent CRUD | — |
| 36 | Brand Boards | /brand-boards/ |
Brand board management | — |
| 37 | Store | /store/ |
E-commerce store management | — |
| 38 | LC Email | /lc-email/ |
Email infrastructure (ISV) | — |
| 39 | Custom Fields | /locations/:id/customFields/ |
Custom field CRUD | locations/customFields |
Reference Docs (load on demand)
For detailed endpoint paths, parameters, and examples for each group:
references/contacts.md— Contact CRUD, search, tags, notes, tasks, bulk operationsreferences/conversations.md— Messaging across all channels, recordings, transcriptionsreferences/calendars.md— Calendar CRUD, free slots, appointments, groups, resourcesreferences/opportunities.md— Pipeline management, stages, status updatesreferences/invoices-payments.md— Invoices, payments, orders, subscriptions, productsreferences/locations-users.md— Location settings, custom fields/values, users, tagsreferences/social-media.md— Social planner posts, accounts, OAuth connectionsreferences/forms-surveys-funnels.md— Forms, surveys, funnels, trigger linksreferences/advanced.md— Custom objects, associations, snapshots, SaaS, Voice AI, blogs, coursesreferences/troubleshooting.md— Common errors, rate limits, token rotation, debugging
Important Notes
- Private Integrations are required — the old Settings → API Keys method is deprecated/EOL
- Token rotation: Tokens don't auto-expire but GHL recommends 90-day rotation. Unused tokens auto-expire after 90 days inactivity
- "Rotate and expire later" — new token generated, old token stays active for 7-day grace period
- "Rotate and expire now" — old token invalidated immediately (use for compromised credentials)
- You can edit scopes without regenerating the token
- OAuth tokens (marketplace apps only): Access tokens expire in 24 hours (86,399s); refresh tokens last up to 1 year
- Agency tokens can access sub-account data by passing
locationId parameter
- Rate limits are per-resource — each sub-account independently gets 100/10s burst + 200K/day. SaaS endpoints: 10 req/sec global
- All list endpoints default to 20 records, max 100 per page via
limit param
- Use cursor pagination with
startAfter / startAfterId for large datasets
- Monitor rate limits via response headers:
X-RateLimit-Limit-Daily, X-RateLimit-Daily-Remaining, X-RateLimit-Max, X-RateLimit-Remaining, X-RateLimit-Interval-Milliseconds
- $497 Agency Pro plan required for: SaaS Configurator, Snapshots, full agency management APIs
Webhook Events
- "Rotate and expire later" — new token generated, old token stays active for 7-day grace period
- "Rotate and expire now" — old token invalidated immediately (use for compromised credentials)
- You can edit scopes without regenerating the token
locationId parameterlimit paramstartAfter / startAfterId for large datasetsX-RateLimit-Limit-Daily, X-RateLimit-Daily-Remaining, X-RateLimit-Max, X-RateLimit-Remaining, X-RateLimit-Interval-Milliseconds50+ webhook event types for real-time notifications. Key events: ContactCreate, ContactDelete, ContactTagUpdate, InboundMessage, OutboundMessage, OpportunityCreate, OpportunityStageUpdate, OpportunityStatusUpdate, appointment events, payment events, form submission events. Webhooks continue firing even if access token expires. Config is per marketplace app.
Docs: https://marketplace.gohighlevel.com/docs/webhook/WebhookIntegrationGuide
Official SDKs & Developer Resources
- Node.js:
@gohighlevel/api-client (npm) — supports privateIntegrationToken config, auto 401 retry
- Python:
gohighlevel-api-client (PyPI) — session storage, auto token refresh, webhook middleware
- PHP SDK also available
- All SDKs use
apiVersion: '2021-07-28'
- OpenAPI Specs: https://github.com/GoHighLevel/highlevel-api-docs
- API Docs: https://marketplace.gohighlevel.com/docs/
- Developer Slack: https://developers.gohighlevel.com/join-dev-community
Built by Ty Shane
@gohighlevel/api-client (npm) — supports privateIntegrationToken config, auto 401 retrygohighlevel-api-client (PyPI) — session storage, auto token refresh, webhook middlewareapiVersion: '2021-07-28'🌐 LaunchMyOpenClaw.com • 🌐 MyFBLeads.com ▶️ YouTube @10xcoldleads • 📘 Facebook • 💼 LinkedIn 📧 ty@10xcoldleads.com
No GoHighLevel account yet? → Start the free 5-Day AI Employee Challenge
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。