8
n8n 中文网amn8n.com

GHL AI 通话摘要

高级

这是一个CRM, AI Summarization领域的自动化工作流,包含 16 个节点。主要使用 Set, Code, Wait, Webhook, HttpRequest 等节点。 使用 Whisper 和 GPT 转录总结 GoHighLevel 通话录音到 CRM 笔记

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "Gl42xEYFxeKPDz3J",
  "meta": {
    "instanceId": "2aa1e708fef72b335d0b91f52e423607ee1fc85ca2d0967514a06c4b17d7fee2",
    "templateCredsSetupCompleted": true
  },
  "name": "GHL AI Call Summaries",
  "tags": [
    {
      "id": "rat6cvakoZZK8ks3",
      "name": "Creator",
      "createdAt": "2025-10-28T14:44:45.794Z",
      "updatedAt": "2025-10-28T14:44:45.794Z"
    }
  ],
  "nodes": [
    {
      "id": "2878a20f-46dc-4ebd-b5a8-4ad9792ec540",
      "name": "向模型发送消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1760,
        -304
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=Summarize the following sales or real estate call into clear, concise bullet points suitable for CRM notes.  \nThe call is typically between a sales or acquisitions representative and a client, agent, or lead.  \nUse context clues to infer the contact type (e.g., realtor, buyer, seller, vendor, etc.).\n\nFocus on:\n- Current situation or status of the deal or opportunity  \n- Key details about circumstances, constraints, or important context  \n- Agreed next actions or follow-ups  \n\nIf applicable, include:\n- Motivation or situation of the other party  \n- Property or project condition (if discussed)  \n- Timeline (include dates or specific timeframes if mentioned)  \n- Price or terms (only if explicitly stated)  \n- Any risks, objections, or concerns raised  \n\nRules:\n- Do **not** invent or assume any information.  \n- Only include details explicitly present in the transcript.  \n- If a number or date is mentioned, include it **exactly as stated**.  \n- Exclude property data (addresses, bed/bath count, ARV, Zillow links) unless the speaker mentioned them.  \n- If a topic wasn’t discussed, simply omit it — don’t write “not discussed.”\n\nTranscript:\n\"\"\"\n{{ $json.text }}\n\"\"\""
            },
            {
              "role": "system",
              "content": "You are an **EXTRACTIVE summarizer** for sales and real estate calls.  \nUse **only facts** explicitly present in the transcript.  \nIf a detail is missing, write “Not discussed.”  \nNever infer property details, prices, dates, or locations unless clearly stated.  \nExclude any platform mentions (e.g., Zillow) unless explicitly referenced in the call.  \nOutput **5–8 concise bullet points**, each no longer than 20 words, plain text with hyphens."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "arpaxjtIV5CQrdNF",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "933026be-3617-4c59-bcd5-c2a603b07475",
      "name": "转录录音",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1552,
        -304
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "id": "arpaxjtIV5CQrdNF",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "4c473d82-c204-4f59-a56a-f9c9e8d82d2b",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -768
      ],
      "parameters": {
        "width": 656,
        "height": 1104,
        "content": "## 试试看!"
      },
      "typeVersion": 1
    },
    {
      "id": "8a84e80a-017f-4659-9044-ad8c45c9d5d7",
      "name": "GHL Get Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1264,
        -304
      ],
      "parameters": {
        "url": "=https://services.leadconnectorhq.com/conversations/messages/{{ $json.messages.messages[0].id }}/locations/{{ $json.messages.messages[1].locationId }}/recording",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Version",
              "value": "2021-07-28"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6fb40130-2da2-41a2-9876-443586157af7",
      "name": "GHL Get Conversation ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        768,
        -304
      ],
      "parameters": {
        "url": "https://services.leadconnectorhq.com/conversations/search",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "contactId",
              "value": "={{ $('Edit Fields1').item.json.contact_id }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Version",
              "value": "2021-07-28"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "39ddbd75-cf56-4079-884d-9111ca4dd98d",
      "name": "GHL Get Message ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1008,
        -304
      ],
      "parameters": {
        "url": "=https://services.leadconnectorhq.com/conversations/{{ $json.conversations[0].id }}/messages",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "type",
              "value": "=TYPE_CALL"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Version",
              "value": "2021-07-28"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a557d6d4-63c7-4306-93d6-af05ea8ef599",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        -400
      ],
      "parameters": {
        "color": 3,
        "width": 736,
        "height": 288,
        "content": "## 查找对话并获取通话录音"
      },
      "typeVersion": 1
    },
    {
      "id": "2aa1e8d6-f687-469d-85ac-1f44b2d157f8",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        -400
      ],
      "parameters": {
        "color": 4,
        "width": 592,
        "height": 288,
        "content": "## AI转录和总结"
      },
      "typeVersion": 1
    },
    {
      "id": "e6f9d8e9-367b-474d-b859-797093735f2f",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2160,
        -400
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 288,
        "content": "## 查找并更新GHL联系人笔记"
      },
      "typeVersion": 1
    },
    {
      "id": "facf7a0c-0289-47fb-901f-703fc6f5f7ee",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        -304
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "80f07c1f-1e91-450e-be42-8cc8404a9008",
              "name": "full_name",
              "type": "string",
              "value": "={{ $(\"Call Ended\").first().json.body.full_name }}"
            },
            {
              "id": "f2e2330f-e763-4a0c-903d-d952ba5d7179",
              "name": "phone",
              "type": "string",
              "value": "={{ $(\"Call Ended\").first().json.body.phone  }}"
            },
            {
              "id": "809d7415-fc51-4be9-ae6e-828472c02f34",
              "name": "contact_id",
              "type": "string",
              "value": "={{ $(\"Call Ended\").first().json.body.contact_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "813260b3-3d41-4e0f-8366-85574a18bf76",
      "name": "Call Ended",
      "type": "n8n-nodes-base.webhook",
      "position": [
        192,
        -304
      ],
      "webhookId": "39c6861d-8b65-40f3-b146-6233c6b3f29a",
      "parameters": {
        "path": "sample",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1c1dab8f-2bca-40fe-9979-050da7329fcd",
      "name": "Add note to contact",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2432,
        -304
      ],
      "parameters": {
        "url": "=https://services.leadconnectorhq.com/contacts/{{ $('Call Ended').item.json.body.contact_id }}/notes",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json }}",
        "sendBody": true,
        "sendQuery": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Version",
              "value": "2021-07-28"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "be6a1a89-bda9-4f9f-aa3d-e099208265af",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        2208,
        -304
      ],
      "parameters": {
        "jsCode": "// n8n Code node (JavaScript)\n\nconst DEFAULT_USER_ID = 'QLOTR0qfCRK9TMKR9jHs';\n// ======================\n\nfunction extractContent(obj) {\n  // Handles several possible shapes:\n  // 1) { message: { content: \"...\" } }\n  // 2) { result: [ { message: { content: \"...\" } }, ... ] }\n  // 3) [ { message: { content: \"...\" } }, ... ] directly in json\n  if (!obj) return null;\n\n  if (obj.message?.content) return obj.message.content;\n\n  if (Array.isArray(obj.result) && obj.result[0]?.message?.content) {\n    return obj.result[0].message.content;\n  }\n\n  if (Array.isArray(obj) && obj[0]?.message?.content) {\n    return obj[0].message.content;\n  }\n\n  return null;\n}\n\nfunction normalizeBody(text) {\n  if (typeof text !== 'string') return '';\n  // Convert Windows line breaks, remove trailing double-space markdown breaks,\n  // collapse excessive blank lines, and trim edges.\n  return text\n    .replace(/\\r\\n/g, '\\n')\n    .replace(/[ \\t]+\\n/g, '\\n')\n    .replace(/\\n{3,}/g, '\\n\\n')\n    .trim();\n}\n\nconst out = [];\n\nfor (const item of items) {\n  const j = item.json ?? {};\n\n  // Try multiple places to find the AI message content\n  const content =\n    extractContent(j) ??\n    extractContent(j.data) ??          // sometimes nested\n    extractContent(j.output) ??\n    null;\n\n  const body = normalizeBody(content);\n\n  // Choose userId: prefer one passed in via the item (e.g., from a Set node), else default\n  const userId = j.userId || DEFAULT_USER_ID;\n\n  if (!userId) {\n    throw new Error('userId is required. Set DEFAULT_USER_ID or pass userId in the incoming item.');\n  }\n  if (!body) {\n    throw new Error('No note content found from the AI node output.');\n  }\n\n  // Output one item per incoming item, ready for an HTTP Request node (JSON body)\n  out.push({\n    json: {\n      userId,\n      body,\n    },\n  });\n}\n\nreturn out;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "bbba3a38-c31b-4141-9127-15c7f33f6e6d",
      "name": "Wait 60 seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        384,
        -304
      ],
      "webhookId": "b7e19d61-a7ef-4427-a1b0-9b92307326d8",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "f21cca8e-c450-4e93-a989-703d262df180",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        368
      ],
      "parameters": {
        "color": 6,
        "width": 880,
        "height": 800,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cc6d5cb5-62c4-4c31-ab5d-21a6ae984ab0",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        -496
      ],
      "parameters": {
        "color": 7,
        "width": 608,
        "height": 672,
        "content": "## 从HighLevel发送webhook"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a485dd7c-aa07-4310-ae9a-1ae99ff85668",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Add note to contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call Ended": {
      "main": [
        [
          {
            "node": "Wait 60 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "GHL Get Conversation ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Get Audio": {
      "main": [
        [
          {
            "node": "Transcribe a recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 60 seconds": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Get Message ID": {
      "main": [
        [
          {
            "node": "GHL Get Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe a recording": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Get Conversation ID": {
      "main": [
        [
          {
            "node": "GHL Get Message ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 客户关系管理, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量16
分类2
节点类型7
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者

Automation consultant specializing in real estate

外部链接
在 n8n.io 查看

分享此工作流