8
n8n 中文网amn8n.com

使用 Redis 和 Anthropic 在 Go High Level 中自动化 WhatsApp 回复

高级

这是一个AI Chatbot, Multimodal AI领域的自动化工作流,包含 31 个节点。主要使用 If, Set, Code, Wait, Merge 等节点。 使用 Go High Level、Redis 和 Anthropic 自动化 WhatsApp 回复

前置要求
  • Redis 服务器连接信息
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Anthropic API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "QiEoooyNMeJcvKKg",
  "meta": {
    "instanceId": "6bad1eba185697a960de5bc9203d6bff2fd56440a0b5303c382e0b1537a2a568"
  },
  "name": "使用Redis和Anthropic在Go High Level中自动化WhatsApp回复",
  "tags": [
    {
      "id": "PnRGSMhEDCtkgPVA",
      "name": "OJAUUMDev",
      "createdAt": "2025-07-21T20:12:28.081Z",
      "updatedAt": "2025-07-21T20:12:28.081Z"
    }
  ],
  "nodes": [
    {
      "id": "6290c10a-80ac-46b8-9d49-dcf5dff98125",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1380,
        320
      ],
      "webhookId": "fce352e8-8edf-447c-9b54-c2c2b6649ccc",
      "parameters": {
        "path": "fce352e8-8edf-447c-9b54-c2c2b6649ccc",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "4f19d6b1-829c-4824-8e75-e0781caa59f3",
      "name": "Switch1",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1220,
        320
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "436fa76a-f948-4de3-86a1-9ed6e568430f",
                    "operator": {
                      "type": "string",
                      "operation": "notContains"
                    },
                    "leftValue": "={{ $json.body.message.body }}",
                    "rightValue": "type message: audio"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "a4574272-ebee-40a4-a1fb-9139e5f6112e",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "leftValue": "={{ $json.body.message.body }}",
                    "rightValue": "type message: audio"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "2f44dc60-d93f-4ee0-8c5a-e481541d6486",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        460,
        160
      ],
      "parameters": {
        "text": "={{ $('messages').first().json.menssage }}",
        "options": {
          "systemMessage": "=# Summary\n\nYou are the customer service assistant for **GlobalPoint Services**. Your task is to answer user questions **only using the information provided by the `ClientInfo` tool**, which contains accurate data about services, branches, locations, schedules, prices, and requirements.\n\n# Tools\n\n**ClientInfo** → Use this tool to obtain the exact information. Its content consists of a list of objects under the `\"response\"` field with the following structure:\n\n```json\n{\n  \"response\": {\n    \"Category\": \"Consulting\",\n    \"Service\": \"Business Strategy Session\",\n    \"Requirements\": \"Schedule at least 48 hours in advance\",\n    \"Price (USD)\": 150\n  }\n},\n{\n  \"response\": {\n    \"Branch\": \"GlobalPoint Downtown Office\",\n    \"Location\": \"123 Main Street, Downtown, Springfield, USA\",\n    \"Schedule\": \"Mon–Fri: 9 a.m.–6 p.m.; Sat: 9 a.m.–1 p.m.; Sun: Closed\",\n    \"Notes\": \"Walk-ins are welcome during business hours.\"\n  }\n}\n```\n\n# Rules\n\n* When a user asks about branches, locations, schedules, services, prices, or requirements, **always use ClientInfo to find exact matches**, regardless of case sensitivity or minor typos.\n* You may accept partial matches or synonyms as long as they clearly refer to the exact service or branch listed in ClientInfo.\n* Always respond using the exact service or branch name **as it appears in ClientInfo**, and clarify:\n  `The price for \"[exact name]\" is XX USD.`\n  or\n  `The branch \"[exact name]\" is located at [exact location]. Schedule: [schedule].`\n* **Never provide information that is not explicitly included in ClientInfo.**\n* If no clear match is found, respond with:\n  `Sorry, we do not offer that service or have that branch in our records. Is there anything else I can help you with?`\n* Use a **friendly, clear, simple, and helpful** tone, always in the **same language as the user**.\n* If the question is generic or just a greeting, respond politely and invite them to ask.\n\n# Examples\n\n**1. Input:** Hello\n**Response:** Hi! Welcome to GlobalPoint Services. How can I assist you today?\n\n**2. Input:** I have a question\n**Response:** Sure, tell me more so I can help.\n\n**3. Input:** What services do you offer?\n**Action:** Read all items in ClientInfo.\n**Response:** At GlobalPoint Services, we offer options such as \\[brief list based on Category and Service].\n\n**4. Input:** How much is the Business Strategy Session?\n**Action:** Search \"Business Strategy Session\" in ClientInfo.\n**Response:** The price for the service \"Business Strategy Session\" is 150 USD. Requirements: Schedule at least 48 hours in advance.\n\n**5. Input:** Where is the Downtown Office?\n**Action:** Search \"Downtown Office\" in branches within ClientInfo.\n**Response:** Our branch \"GlobalPoint Downtown Office\" is located at 123 Main Street, Downtown, Springfield, USA. Schedule: Mon–Fri: 9 a.m.–6 p.m. and Sat: 9 a.m.–1 p.m.\n\n# Final Reminders\n\n* **Never make up data, prices, or addresses.**\n* **Never answer from general knowledge**, only from ClientInfo.\n* **Always use the exact service or branch name when giving prices or requirements.**\n* **Do not give suggestions or recommendations not present in the data.**\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "e60eaf2a-9c68-49bf-b237-d0bbd6bdd1c7",
      "name": "Anthropic 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        380,
        380
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude Sonnet 4"
        },
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "a29f6bab-4088-48f2-802a-c59f44d0d3f5",
      "name": "更新联系人",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1280,
        160
      ],
      "parameters": {
        "url": "=https://rest.gohighlevel.com/v1/contacts/{{ $('Webhook').item.json.body.contact_id }}",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\n  \"customField\": {\n    \"{{ $json.customFields.find(field => field.name === 'IA_answer').id }}\": \"{{ $('Sanitize and Format Message Output').item.json.output }}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "fm62ksvikAH77Hft",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ba1cfe67-f7ce-4f32-82a9-99557f4b6495",
      "name": "GHL自定义字段",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1080,
        160
      ],
      "parameters": {
        "url": "https://rest.gohighlevel.com/v1/custom-fields/",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "fm62ksvikAH77Hft",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5ab4f7b8-ccf3-440b-a9ea-54e6d5e595f7",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        -500,
        220
      ],
      "webhookId": "41f5205b-b571-4c07-a456-8ef0b59bd176",
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "b081b133-b582-447e-bf52-8647d4c18e24",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        -180,
        220
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "41b0355b-7204-4e25-b74a-7bf70dea8a9c",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.messages.last() }}",
              "rightValue": "={{ $('Sanitize and Format Message Body').item.json.text }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1f6b0707-cd9d-4d93-ba39-757348beceb1",
      "name": "无操作,不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -20,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "86cb66f8-0d79-40ee-88c6-48ac440a08cf",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        520,
        380
      ],
      "parameters": {
        "sessionKey": "={{ $('Webhook').item.json.body.phone }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "27d0db94-0317-423f-8b58-8178211f8dfb",
      "name": "保存消息",
      "type": "n8n-nodes-base.redis",
      "position": [
        -660,
        220
      ],
      "parameters": {
        "list": "={{ $('Webhook').item.json.body.contact_id }}",
        "tail": true,
        "operation": "push",
        "messageData": "={{ $json.text }}"
      },
      "typeVersion": 1
    },
    {
      "id": "6c8b6cb0-7cd7-4e3d-90c4-4e117f3449eb",
      "name": "获取消息",
      "type": "n8n-nodes-base.redis",
      "position": [
        -340,
        220
      ],
      "parameters": {
        "key": "={{ $('Webhook').item.json.body.contact_id }}",
        "options": {},
        "operation": "get",
        "propertyName": "mensajes"
      },
      "typeVersion": 1
    },
    {
      "id": "877a16b7-b461-439f-8501-9a4c418dc7d0",
      "name": "清理并格式化消息正文",
      "type": "n8n-nodes-base.code",
      "position": [
        -940,
        220
      ],
      "parameters": {
        "jsCode": "return [{\n  text: $input.first().json.body.message.body\n    .replace(/\\\\+\"/g, '\"')   // Fix incorrectly escaped double quotes\n    .replace(/\\n/g, \"\\\\n\")   // Properly escape line breaks\n    .replace(/\\r/g, \"\\\\r\")   // Escape carriage returns\n    .replace(/\\t/g, \"\\\\t\")   // Escape tab characters\n    .trim()                  // Remove unnecessary whitespace\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "8c8a0ce0-4fc3-4979-8f1a-331a0861bfe4",
      "name": "删除消息",
      "type": "n8n-nodes-base.redis",
      "position": [
        120,
        160
      ],
      "parameters": {
        "key": "={{ $('Webhook').item.json.body.contact_id }}",
        "operation": "delete"
      },
      "typeVersion": 1
    },
    {
      "id": "55e65c69-54ec-4df1-8197-0dd0b4f6f416",
      "name": "消息",
      "type": "n8n-nodes-base.set",
      "position": [
        -20,
        160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "7bb3ef98-b766-4ad7-8343-b2885bd70225",
              "name": "message",
              "type": "string",
              "value": "={{ $node[\"Get messages\"].json[\"messages\"].join(\"\\n\") }}"
            },
            {
              "id": "62dfc214-fb40-4a59-81a4-b01c6c0860af",
              "name": "id",
              "type": "string",
              "value": "={{ $('Webhook').item.json.body.contact_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e65eca71-742f-4301-bbab-5130fe7e4d34",
      "name": "当被其他工作流执行时",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -600,
        1140
      ],
      "parameters": {
        "inputSource": "passthrough"
      },
      "typeVersion": 1.1
    },
    {
      "id": "22b16984-474c-488a-b012-17d6cc8f26c9",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -440,
        1140
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "list",
          "value": "1Im72SvVQhzjLk_rVUidGK0du4s2zMZ3H",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Im72SvVQhzjLk_rVUidGK0du4s2zMZ3H/edit?usp=drivesdk&ouid=107080324345235325088&rtpof=true&sd=true",
          "cachedResultName": "Examenes de Laboratorio Prueba Doctor Premier.xlsx"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "CVPYPrKE5BtLWWzx",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "aabc26f2-36a2-469c-8c60-5a7b35030c16",
      "name": "成功",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        1140
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "39c2f302-03be-4464-a17a-d7cc481d6d44",
              "name": "=response",
              "type": "object",
              "value": "={{ $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ce02d432-ecca-44ff-ac7e-2f3d12f09185",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        -60,
        1140
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "e9836dfc-8a86-41be-ac81-5e706ce38a23",
      "name": "调用n8n工作流工具",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        680,
        380
      ],
      "parameters": {
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "yVUPXPNCNlo5HkJs",
          "cachedResultName": "My Sub-Workflow 1"
        },
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "7a881605-ce1d-4ed4-9c61-36533b759286",
      "name": "提取测试数据",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -240,
        1060
      ],
      "parameters": {
        "options": {
          "sheetName": "Tests"
        },
        "operation": "xlsx"
      },
      "typeVersion": 1
    },
    {
      "id": "44d5d6c6-add6-424c-ad6c-0108435a1c1b",
      "name": "提取站点数据",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -240,
        1240
      ],
      "parameters": {
        "options": {
          "sheetName": "Sites"
        },
        "operation": "xlsx",
        "binaryPropertyName": "=data"
      },
      "typeVersion": 1
    },
    {
      "id": "b8d3874e-ee58-4da7-bcf5-3b6b67071411",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        580
      ],
      "parameters": {
        "color": 5,
        "width": 900,
        "height": 820,
        "content": "# Google Drive Excel合并工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "62d3abdc-7eac-4552-a064-23097d6ea7d6",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1400,
        -300
      ],
      "parameters": {
        "width": 680,
        "height": 860,
        "content": "# GHL到n8n短信回复桥接"
      },
      "typeVersion": 1
    },
    {
      "id": "20e82e23-0434-495e-9676-0cf6d91f1c5a",
      "name": "更新联系人 非音频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -860,
        400
      ],
      "parameters": {
        "url": "=https://rest.gohighlevel.com/v1/contacts/{{ $('Webhook').item.json.body.contact_id }}",
        "method": "PUT",
        "options": {},
        "jsonBody": "={\n  \"customField\": {\n    \"{{ $json.customFields.find(field => field.name === 'IA_answer').id }}\": \"Sorry, I can’t listen to voice notes at the moment. Could you please write your question or concern? Thank you very much.\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "fm62ksvikAH77Hft",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ad9f2916-0f90-4c4a-85eb-6b7dfc705fa8",
      "name": "获取GHL自定义字段",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1060,
        400
      ],
      "parameters": {
        "url": "https://rest.gohighlevel.com/v1/custom-fields/",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "fm62ksvikAH77Hft",
          "name": "Bearer Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1cd6d85e-62e7-41d4-a4a8-5e6ded3140de",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -300
      ],
      "parameters": {
        "color": 6,
        "width": 900,
        "height": 860,
        "content": "# Redis消息缓冲工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "6949cf34-0086-4493-b281-2d8d200c7fcb",
      "name": "清理并格式化消息输出",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        160
      ],
      "parameters": {
        "jsCode": "return [{\n  output: $input.first().json.output\n    .replace(/^\"{|}\"$/g, \"\") // Removes double quotes at the start and end if present\n    .replace(/^{\"response\":\\s*\"/, '') // Removes '{\"response\":\"' at the beginning if present\n    .replace(/\"}$/, '') // Removes '\"}' at the end if present\n    .replace(/\\\\\"/g, '\"') // Converts escaped quotes \\\" into normal quotes \"\n    .replace(/\\n/g, \"\\\\n\") // Escapes newlines correctly\n    .replace(/\\r/g, \"\\\\r\") // Escapes carriage returns\n    .replace(/\\t/g, \"\\\\t\") // Escapes tabs\n    .replace(/^\"+|\"+$/g, \"\") // 🔥 New line: Removes extra double quotes at the edges\n    .replace(/\"/g, '\\\\\"') // Escapes internal double quotes for JSON\n    .trim() // Removes unnecessary whitespace\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "99f56ece-0c95-4148-938a-51e9d32d047f",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        -300
      ],
      "parameters": {
        "color": 3,
        "width": 660,
        "height": 860,
        "content": "# ClientInfo LLM响应工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "3608f575-00cf-42a8-acd8-44771e584288",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -300
      ],
      "parameters": {
        "width": 460,
        "height": 620,
        "content": "# GHL更新联系人工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "996bfe66-4b59-4702-aa59-55da2c5282e3",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2600,
        -300
      ],
      "parameters": {
        "color": 3,
        "width": 1120,
        "height": 1040,
        "content": "# 使用Redis和Anthropic在Go High Level中自动化WhatsApp回复"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7ff7549a-738b-4be0-8c59-bdd9f605edfa",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "messages",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch1": {
      "main": [
        [
          {
            "node": "Sanitize and Format Message Body",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get GHL Custom fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Switch1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Sanitize and Format Message Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "messages": {
      "main": [
        [
          {
            "node": "Delete messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get messages": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save message": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Extract Tests",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract Sites",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Sites": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Extract Tests": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Delete messages": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GHL Custom fields": {
      "main": [
        [
          {
            "node": "Update Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get GHL Custom fields": {
      "main": [
        [
          {
            "node": "Update Contact No audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call n8n Workflow Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize and Format Message Body": {
      "main": [
        [
          {
            "node": "Save message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize and Format Message Output": {
      "main": [
        [
          {
            "node": "GHL Custom fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - AI 聊天机器人, 多模态 AI

需要付费吗?

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

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

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

作者
Jorge Martínez

Jorge Martínez

@jorgemartinezjam

AI Engineer & Full Stack Developer skilled in designing intelligent agents, workflow automation, and NLP solutions. Experienced with LLMs, Relevance AI, make, zapier, and n8n. Proficient in integrating AI and chatbots into web apps, optimizing processes, and leveraging automation for real-time productivity. Strong background in backend and frontend development, REST APIs, and database management.

外部链接
在 n8n.io 查看

分享此工作流