☎️ 演示呼叫中心

高级

这是一个Support、AI领域的自动化工作流,包含 38 个节点。主要使用 If、Set、Code、Redis、Switch 等节点,结合人工智能技术实现智能自动化。 AI聊天机器人呼叫中心:演示呼叫中心(生产就绪,第2部分)

前置要求
  • Redis 服务器连接信息
  • PostgreSQL 数据库连接信息

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "Oe2Qnkb1PoMSaxKw",
  "meta": {
    "instanceId": "daae7bb90c8655b08e0b68de8a52b1178f2812f6a234efb0b0509279dbb70b3e",
    "templateCredsSetupCompleted": true
  },
  "name": "☎️ 演示呼叫中心",
  "tags": [
    {
      "id": "no8Mb078mvRgw7PS",
      "name": "DEMO",
      "createdAt": "2025-04-30T05:34:10.330Z",
      "updatedAt": "2025-04-30T05:34:10.330Z"
    }
  ],
  "nodes": [
    {
      "id": "66c50a25-19b6-43fc-8131-8bd2ee980cb2",
      "name": "会话",
      "type": "n8n-nodes-base.redis",
      "notes": "{session_id}:session",
      "onError": "continueRegularOutput",
      "position": [
        -1460,
        580
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "c94d1cda-a5ad-4f7b-a12b-310c1203d5b9",
      "name": "输入",
      "type": "n8n-nodes-base.set",
      "position": [
        -2140,
        340
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "864a0b6e-0b01-4ad3-b7a9-d3007a82c788",
      "name": "测试触发器",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -2320,
        540
      ],
      "webhookId": "6ad37989-0fb4-4b34-9e4d-017b02eb3199",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "08d3f83c-bc49-4f0e-abb5-809763558b8c",
      "name": "测试字段",
      "type": "n8n-nodes-base.set",
      "notes": "香港繁體中文",
      "position": [
        -2140,
        540
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "55998238-1744-42af-ac9a-2c563bed01f3",
      "name": "流程触发器",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -2320,
        340
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c90c1520-e0a2-4a7c-b26f-e343d54605a8",
      "name": "速率限制",
      "type": "n8n-nodes-base.redis",
      "notes": "TTL 90s\n{session_id}:hits",
      "onError": "continueRegularOutput",
      "position": [
        -1800,
        340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "c34deb24-4124-4ed7-83f3-4a96ad81616c",
      "name": "如果已评级",
      "type": "n8n-nodes-base.if",
      "notes": "30 CHATS",
      "position": [
        -1800,
        560
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 2.2
    },
    {
      "id": "9efe673e-6935-4567-814f-c2d781af5eab",
      "name": "评级输出",
      "type": "n8n-nodes-base.set",
      "notes": "Please wait...",
      "position": [
        -1800,
        1340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "e58e8ad3-6d5c-4feb-9d21-cdd91cadf862",
      "name": "聊天记忆",
      "type": "n8n-nodes-base.set",
      "notes": "Recall/Create {timestamp}",
      "position": [
        -1260,
        580
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "d6b0be18-a95d-4b18-9a3d-49a4e4acf7b9",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2620,
        280
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b84bb1ee-3298-48bd-8212-f4a6358330a5",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2066d93a-6158-4066-94f7-2fad8fe1f37a",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1560,
        460
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e2e70473-60ad-4b53-a36a-8498e89a0c6a",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        1220
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "bf41212f-31e3-4c15-9b70-8cdd34bc4ed7",
      "name": "便签 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "407df80b-6b3c-4327-a744-3500a1366455",
      "name": "频道切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        -940,
        580
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "935465c9-2578-48c8-82cc-320b77beccf5",
      "name": "便签 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c7bdd165-da05-4fcd-b94e-c42098442e1d",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        -580,
        500
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "a02e65e7-65bb-498c-9377-ce3ea81d9a8e",
      "name": "xAI @grok-2-1212",
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "position": [
        -640,
        700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6d9f3ace-c0ed-4d53-8bf3-bdf81756aa5c",
      "name": "Postgres 聊天记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "notes": "n8n_chat_memory\n{session_id}:{timestamp}\n30 CHAT, EXPIRY 60m",
      "position": [
        -480,
        700
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.3
    },
    {
      "id": "7b524e33-baaf-4bfa-b5f6-b2a95d657490",
      "name": "加载用户记忆",
      "type": "n8n-nodes-base.postgresTool",
      "notes": "n8n_user_memory",
      "position": [
        -480,
        980
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 2.6
    },
    {
      "id": "5091a915-f689-4a42-be68-3348095a7a8f",
      "name": "保存用户记忆",
      "type": "n8n-nodes-base.postgresTool",
      "position": [
        -320,
        980
      ],
      "parameters": {},
      "typeVersion": 2.6
    },
    {
      "id": "3d4ba794-f43b-4293-ad40-4b08cddfd26a",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "ed6bd7e5-15aa-4b68-8664-73476cb86ea0",
      "name": "出租车服务",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "notes": "Demo Taxi Service",
      "position": [
        -260,
        720
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 2.2
    },
    {
      "id": "000738a8-1449-494c-915e-c90c905ac898",
      "name": "提供商",
      "type": "n8n-nodes-base.redis",
      "notes": "{session_id}:service:providers",
      "onError": "continueRegularOutput",
      "position": [
        -640,
        240
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "62afafe0-f3a0-47ae-9f6e-85d53407a3e7",
      "name": "新会话",
      "type": "n8n-nodes-base.redis",
      "notes": "{session_id}:session",
      "onError": "continueRegularOutput",
      "position": [
        20,
        480
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1
    },
    {
      "id": "0f3472f1-4a88-47df-bc59-40898b41d98e",
      "name": "输出",
      "type": "n8n-nodes-base.set",
      "position": [
        440,
        480
      ],
      "parameters": {},
      "notesInFlow": false,
      "typeVersion": 3.4
    },
    {
      "id": "cc82dbc1-71b4-4696-ae5a-fd5e6dbea5b4",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        -420,
        240
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9552eed5-d597-446c-9e40-a29157d06441",
      "name": "测试输出",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        1000
      ],
      "parameters": {},
      "notesInFlow": false,
      "typeVersion": 3.4
    },
    {
      "id": "2a8d673d-0e23-4685-b4c8-c163d9b75afb",
      "name": "聊天切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        200,
        480
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "96a6b050-f392-4aaa-a3ab-0c62644ddde7",
      "name": "提供商切换",
      "type": "n8n-nodes-base.switch",
      "position": [
        -220,
        240
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "8275c11d-d09c-4271-a4b1-bff18dda1680",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        640
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d1779d3c-835c-44f3-b24d-b04f60b36e87",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        460
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9508ff99-720e-44f4-8a75-f554a008ad63",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        880
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f1451ac8-a4ae-4938-9952-c982b7322e60",
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        140
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7030e654-d39b-4342-84ae-90da37d5f513",
      "name": "错误输出",
      "type": "n8n-nodes-base.set",
      "notes": "Please retry.",
      "position": [
        60,
        1320
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 3.4
    },
    {
      "id": "9a5ac53e-5297-4f20-ac62-a5c54ab1c89f",
      "name": "出租车服务重定向",
      "type": "n8n-nodes-base.executeWorkflow",
      "notes": "Demo Taxi Service",
      "position": [
        240,
        260
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "32b1e6ae-f4a1-4b82-aa92-bdb35fb6cabb",
      "name": "回拨",
      "type": "n8n-nodes-base.executeWorkflow",
      "notes": "Demo Call Back",
      "position": [
        440,
        1340
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "bcccdc7a-8d95-498c-9f45-6b5dcc5a45bb",
      "name": "出租车预订工作器",
      "type": "n8n-nodes-base.executeWorkflow",
      "notes": "Test Taxi Booking Worker",
      "position": [
        760,
        220
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "timezone": "Etc/UTC",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "vuso7W8t402BPcT2",
    "executionOrder": "v1"
  },
  "versionId": "d56863e7-49c5-4265-b819-71806ab5146e",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Provider Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input": {
      "main": [
        [
          {
            "node": "Rate Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Session": {
      "main": [
        [
          {
            "node": "Chat Memory",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "New Session",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Rated": {
      "main": [
        [
          {
            "node": "Rated Output",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Session",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit": {
      "main": [
        [
          {
            "node": "If Rated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Memory": {
      "main": [
        [
          {
            "node": "Channel Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Switch": {
      "main": [
        [
          {
            "node": "Output",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Output",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Test Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New Session": {
      "main": [
        [
          {
            "node": "Chat Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Fields": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Output": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Flow Trigger": {
      "main": [
        [
          {
            "node": "Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rated Output": {
      "main": [
        [
          {
            "node": "Call Back",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Taxi Service": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Test Trigger": {
      "main": [
        [
          {
            "node": "Test Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Channel Switch": {
      "main": [
        [
          {
            "node": "Provider",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider Switch": {
      "main": [
        [
          {
            "node": "Taxi Booking Worker",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Taxi Service Redirect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load User Memory": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Save User Memory": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "xAI @grok-2-1212": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个高级难度的工作流,适用于Support、AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

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

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

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

作者
ChatPayLabs

ChatPayLabs

@chatpaylabs

Production Ready AI n8n Workflow Templates Startup Fundraising 💰 Support Us 🦄

外部链接
在 n8n.io 上查看 →

分享此工作流