通过 Make.com 的邮件自动化功能,将潜在客户捕获到集中式的 Supabase 数据库中。
本技能为 Clawd 智能体提供了一套完整的潜在客户管理系统。它将潜在客户信息存储在 Supabase 中,触发 Make.com 的 Webhook 以自动发送回复邮件,并跟踪从“新建”到“已确认”的完整对话生命周期。
{
"supabaseUrl": "https://your-project.supabase.co",
"supabaseKey": "eyJ...your-service-role-key",
"orgId": "550e8400-e29b-41d4-a716-446655440000",
"defaultPriority": "medium"
}
重要提示: 为确保对数据库的完全访问权限,请使用服务角色密钥,而非匿名密钥。
创建一个新的潜在客户并自动触发自动化工作流。
参数:
- email (字符串,必需): 联系人邮箱地址
- name (字符串,可选): 联系人姓名
- phone (字符串,可选): 电话号码
- source (字符串,可选): 来源渠道 (默认:"clawd_agent")
- priority (字符串,可选): "low"、"medium"、"high"、"urgent"
- custom_fields (对象,可选): 任何附加数据
返回:
{
"success": true,
"lead_id": "uuid",
"status": "new",
"automation_triggered": true,
"message": "潜在客户已捕获。自动回复将在 60 秒内发送。"
}
示例:
const result = await skill.createLead({
email: "customer@example.com",
name: "Max Mustermann",
source: "chat_bot",
custom_fields: { product: "saas_basic" }
});
获取潜在客户的详细信息,包括完整的对话历史。
参数:
- id (字符串,必需): 潜在客户 UUID
返回: 包含 conversations 数组和 reply_pending 布尔值的潜在客户对象。
使用筛选条件列出潜在客户。
参数:
- status (字符串,可选): 按状态筛选
- priority (字符串,可选): 按优先级筛选
- limit (数字,可选): 最大结果数 (默认:50)
- dateFrom (字符串,可选): ISO 日期筛选
返回: 潜在客户数组及总数。
更新潜在客户的生命周期状态。
参数:
- id (字符串,必需): 潜在客户 UUID
- status (字符串,必需): "qualified"、"won"、"lost" 等
- notes (字符串,可选): 确认备注
向潜在客户对话线程中添加手动回复或备注。
参数:
- leadId (字符串,必需): 潜在客户 UUID
- content (字符串,必需): 消息文本
- subject (字符串,可选): 主题行
检查自动回复邮件是否已成功发送。
参数:
- leadId (字符串,必需): 潜在客户 UUID
返回:
{
"auto_reply_sent": true,
"minutes_since_creation": 2,
"automation_ok": true
}
createLead()getAutomationStatus() 以确认自动回复已发送addConversation() 存储您的智能体回复常见错误:
- 邮箱格式无效
- 重复的潜在客户(24小时内)
- 缺少 Supabase 凭据
- 自动化超时(>5 分钟无回复)
潜在客户表:
- id, email, name, phone, source, status, priority
- custom_fields (JSON), metadata (JSON)
- first_reply_sent_at, created_at
对话记录表:
- id, lead_id, direction (inbound/outbound/automated)
- content, subject, channel, sent_at
潜在客户, 客户关系管理, 销售, 自动化, 邮件, supabase
1.0.0