GHL CRM — GoHighLevel Integration for OpenClaw
Complete GoHighLevel CRM integration. Manage contacts, pipelines, conversations, appointments, and workflows through the GHL API v2.
Quick Start
CODEBLOCK0
Authentication
GHL uses Private Integration Tokens (API v2). Get yours from:
- 1. Go to Settings → Integrations → Private Integrations in your GHL sub-account
- Create a new integration, enable the scopes you need
- Copy the API key — this is your INLINECODE0
The GHL_LOCATION_ID is your sub-account/location ID (found in Settings → Business Info or the URL).
Base URL: INLINECODE2
Auth header: Authorization: Bearer <GHL_API_KEY> + INLINECODE4
Available Commands
Contact Management
CODEBLOCK1
Pipeline & Opportunity Management
CODEBLOCK2
Conversations (SMS, Email, WhatsApp)
CODEBLOCK3
Calendar & Appointments
CODEBLOCK4
Workflows
CODEBLOCK5
Key API Endpoints Reference
| Resource | Method | Endpoint |
|---|
| Search contacts | GET | INLINECODE5 |
| Get contact |
GET |
/contacts/{id} |
| Create contact | POST |
/contacts/ |
| Update contact | PUT |
/contacts/{id} |
| List pipelines | GET |
/opportunities/pipelines?locationId=... |
| List opportunities | GET |
/opportunities/search?location_id=...&pipeline_id=... |
| Create opportunity | POST |
/opportunities/ |
| List conversations | GET |
/conversations/search?locationId=... |
| Send message | POST |
/conversations/messages |
| List calendars | GET |
/calendars/?locationId=... |
| Get free slots | GET |
/calendars/{id}/free-slots?startDate=...&endDate=... |
| Create appointment | POST |
/calendars/events/appointments |
Rate Limits
GHL API v2 enforces rate limits:
- - General: 100 requests/10 seconds per location
- Bulk operations: 10 requests/10 seconds
- The script auto-retries on 429 with exponential backoff (up to 3 retries)
Integration Patterns
Lead Capture → CRM Pipeline
- 1. Capture lead via form/chatbot
- INLINECODE17 with lead data
- INLINECODE18 to add to pipeline
- INLINECODE19 to trigger nurture sequence
Appointment Booking Flow
- 1.
calendars list to find the right calendar - INLINECODE21 to get availability
- INLINECODE22 to book the slot
- GHL auto-sends confirmation via configured workflow
Follow-Up Automation
- 1.
conversations list to find unresponded conversations - INLINECODE24 for context
- Generate follow-up with AI
- INLINECODE25 or INLINECODE26
Credits
Built by
M. Abidi |
agxntsix.ai
YouTube |
GitHub
Part of the
AgxntSix Skill Suite for OpenClaw agents.
📅 Need help setting up OpenClaw for your business? Book a free consultation
GHL CRM — OpenClaw的GoHighLevel集成
完整的GoHighLevel CRM集成。通过GHL API v2管理联系人、管道、对话、预约和工作流程。
快速开始
bash
export GHLAPIKEY=your-private-integration-token
export GHLLOCATIONID=your-location-id
python3 {baseDir}/scripts/ghl_api.py contacts search john@example.com
身份验证
GHL使用私有集成令牌(API v2)。获取方式:
- 1. 在GHL子账户中进入设置 → 集成 → 私有集成
- 创建新集成,启用所需的作用域
- 复制API密钥——这就是你的GHLAPIKEY
GHLLOCATIONID是你的子账户/位置ID(可在设置 → 企业信息或URL中找到)。
基础URL: https://services.leadconnectorhq.com
认证头: Authorization: Bearer APIKEY> + Version: 2021-07-28
可用命令
联系人管理
bash
按邮箱、电话或姓名搜索联系人
python3 {baseDir}/scripts/ghl_api.py contacts search 查询内容
按ID获取联系人
python3 {baseDir}/scripts/ghl_api.py contacts get <联系人ID>
创建新联系人
python3 {baseDir}/scripts/ghl_api.py contacts create {firstName:John,lastName:Doe,email:john@example.com,phone:+15551234567}
更新联系人
python3 {baseDir}/scripts/ghl_api.py contacts update <联系人ID> {tags:[vip,hot-lead]}
删除联系人
python3 {baseDir}/scripts/ghl_api.py contacts delete <联系人ID>
列出联系人(可选限制数量)
python3 {baseDir}/scripts/ghl_api.py contacts list --limit 20
管道与商机管理
bash
列出所有管道
python3 {baseDir}/scripts/ghl_api.py pipelines list
列出管道中的商机
python3 {baseDir}/scripts/ghl_api.py opportunities list <管道ID>
获取商机详情
python3 {baseDir}/scripts/ghl_api.py opportunities get <商机ID>
创建商机
python3 {baseDir}/scripts/ghl_api.py opportunities create {pipelineId:...,stageId:...,contactId:...,name:交易名称,monetaryValue:5000}
更新商机(移动阶段、更新价值)
python3 {baseDir}/scripts/ghl_api.py opportunities update <商机ID> {stageId:new-stage-id,status:won}
删除商机
python3 {baseDir}/scripts/ghl_api.py opportunities delete <商机ID>
对话(短信、邮件、WhatsApp)
bash
列出最近的对话
python3 {baseDir}/scripts/ghl_api.py conversations list
获取对话消息
python3 {baseDir}/scripts/ghl_api.py conversations get <对话ID>
发送短信
python3 {baseDir}/scripts/ghl_api.py conversations send-sms <联系人ID> 你好!跟进我们之前的通话。
发送邮件
python3 {baseDir}/scripts/ghl_api.py conversations send-email <联系人ID> {subject:跟进,body:
你好!
,emailFrom:you@domain.com}
日历与预约
bash
列出日历
python3 {baseDir}/scripts/ghl_api.py calendars list
获取空闲时段
python3 {baseDir}/scripts/ghl_api.py calendars slots <日历ID> --start 2026-02-16 --end 2026-02-17
创建预约
python3 {baseDir}/scripts/ghl_api.py appointments create {calendarId:...,contactId:...,startTime:2026-02-16T10:00:00Z,endTime:2026-02-16T10:30:00Z,title:发现通话}
列出预约
python3 {baseDir}/scripts/ghl_api.py appointments list <日历ID>
更新预约
python3 {baseDir}/scripts/ghl_api.py appointments update <预约ID> {status:confirmed}
删除预约
python3 {baseDir}/scripts/ghl_api.py appointments delete <预约ID>
工作流程
bash
将联系人添加到工作流程
python3 {baseDir}/scripts/ghl_api.py workflows add-contact <工作流程ID> <联系人ID>
从工作流程移除联系人
python3 {baseDir}/scripts/ghl_api.py workflows remove-contact <工作流程ID> <联系人ID>
关键API端点参考
| 资源 | 方法 | 端点 |
|---|
| 搜索联系人 | GET | /contacts/search?query=...&locationId=... |
| 获取联系人 |
GET | /contacts/{id} |
| 创建联系人 | POST | /contacts/ |
| 更新联系人 | PUT | /contacts/{id} |
| 列出管道 | GET | /opportunities/pipelines?locationId=... |
| 列出商机 | GET | /opportunities/search?location
id=...&pipelineid=... |
| 创建商机 | POST | /opportunities/ |
| 列出对话 | GET | /conversations/search?locationId=... |
| 发送消息 | POST | /conversations/messages |
| 列出日历 | GET | /calendars/?locationId=... |
| 获取空闲时段 | GET | /calendars/{id}/free-slots?startDate=...&endDate=... |
| 创建预约 | POST | /calendars/events/appointments |
速率限制
GHL API v2强制执行速率限制:
- - 通用: 每个位置每10秒100个请求
- 批量操作: 每10秒10个请求
- 脚本在收到429响应时会自动重试,采用指数退避策略(最多重试3次)
集成模式
线索捕获 → CRM管道
- 1. 通过表单/聊天机器人捕获线索
- 使用线索数据contacts create
- opportunities create添加到管道
- workflows add-contact触发培育序列
预约预订流程
- 1. calendars list查找正确的日历
- calendars slots获取可用时段
- appointments create预订时段
- GHL通过配置的工作流程自动发送确认
跟进自动化
- 1. conversations list查找未回复的对话
- contacts get获取上下文
- 使用AI生成跟进内容
- conversations send-sms或send-email
致谢
由
M. Abidi构建 |
agxntsix.ai
YouTube |
GitHub
属于OpenClaw代理的
AgxntSix技能套件的一部分。
📅 需要帮助为您的企业设置OpenClaw? 预约免费咨询