8
n8n 中文网amn8n.com

AI驱动的Facebook页面支持聊天机器人:自动回复与智能客户处理

高级

这是一个Support Chatbot, AI Chatbot领域的自动化工作流,包含 32 个节点。主要使用 If, Set, Wait, Webhook, GoogleDocsTool 等节点。 使用GPT-4.1的Facebook Messenger聊天机器人,支持人工升级

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
  • Facebook Graph API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "JYcvkULVcMN3xRmu",
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "name": "AI-Powered Facebook Page Support Chatbot: Auto Reply & Smart Customer Handling",
  "tags": [],
  "nodes": [
    {
      "id": "8fd8c105-3183-4b16-998c-bec0a66ef9d3",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -352,
        368
      ],
      "webhookId": "2e3dcee9-2346-42c5-9e55-787604c91d7e",
      "parameters": {},
      "notesInFlow": false,
      "retryOnFail": false,
      "typeVersion": 2,
      "alwaysOutputData": false
    },
    {
      "id": "fdf6fb02-7811-425f-b308-0b57f04ae3e6",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        576,
        336
      ],
      "parameters": {},
      "typeVersion": 1.4
    },
    {
      "id": "23d555f7-dd7a-495c-a6d4-f5323ac0126a",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1120,
        624
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "ed206620-e550-4cfd-a23f-aaaec680d71d",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "notes": "You are a friendly and intelligent customer support assistant for a business.\n\nYour job is to:\n\nUnderstand the user’s message carefully and respond in a way that shows you understand the question or issue.\n\nAutomatically reply in Bengali if the user writes in Bengali, and in English if the user writes in English.\n\nSound like a helpful human, not like a robot. Be clear, warm, and polite.\n\n🗣️ Tone Guide:\nUse simple, everyday language. Don’t use overly formal or robotic phrases.\nExample Bengali:\n\n“ধন্যবাদ আপনার প্রশ্নের জন্য! আমি দেখছি…”\n\n“এই বিষয়ে একটু বিস্তারিত বলবেন?”\nExample English:\n\n“Thanks for your message! Let me check that for you.”\n\n“Could you please give me a bit more detail?”\n\n❗ If you're unsure or can’t answer, say:\n\n“এই বিষয়টা একজন সহকারী দেখে দেবে।”\n\n“Let me forward this to a human assistant for better help.”\n\nNever guess or make up information. Keep replies short, helpful, and natural.",
      "position": [
        1200,
        848
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "2c2792b4-c4d3-4d19-9cb1-968486e61b67",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1648,
        624
      ],
      "webhookId": "214bd7aa-99f4-4123-9259-dca27d434246",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5cd9578c-2619-4d28-9293-ce332d843b4b",
      "name": "AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        480,
        1024
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "7c26a106-2562-4705-adb1-9802ec8806cd",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -16,
        784
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "ff62b18c-4770-4b2d-9c42-ef493a02d0a3",
      "name": "HTTP",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1328,
        848
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "aa32f617-6a44-41dd-bb63-ad727385bf03",
      "name": "Google Docs",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        1456,
        848
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "8d01dc1b-30a8-4ea0-8e73-fb913507d2e3",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1072,
        848
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "c433f959-b495-4fc9-a695-cec427e4ea94",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        784,
        1024
      ],
      "webhookId": "214bd7aa-99f4-4123-9259-dca27d434246",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c66511c7-db66-49e3-9304-98b5d45bb728",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1232,
        1024
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ce53539d-f846-4fdc-b899-2a625af8ff31",
      "name": "Edit Fields1",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        384
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "b89a5e6e-8e52-4072-937f-664e4f330e21",
      "name": "If2",
      "type": "n8n-nodes-base.if",
      "position": [
        768,
        512
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "6704b261-754e-4cce-9de2-e02456654d20",
      "name": "Wait3",
      "type": "n8n-nodes-base.wait",
      "position": [
        1648,
        384
      ],
      "webhookId": "214bd7aa-99f4-4123-9259-dca27d434246",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "983dbe1e-b0f3-4e9f-ab13-ee3aab98ca20",
      "name": "Admin Message",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1904,
        288
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "63009f02-5c12-4aca-8624-411ae7dd1660",
      "name": "User Message",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1904,
        464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "27149952-d3e1-4a40-b76f-9727063be7c2",
      "name": "Admin Message1",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1904,
        1024
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f53eade6-0680-4344-ac53-03c44780b899",
      "name": "User Replay Message",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        1904,
        624
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a108028e-1233-49d2-87f8-e387da054198",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "4e0146d7-e0c0-4d4f-86b4-b1b0f29e0450",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2a621ce0-f8bc-4fcb-b882-32c768d1f403",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        944
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a0a7f878-2774-4ba6-9b94-a65f3079089b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2016,
        432
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "63eaa3a4-a545-4978-b4d7-6190c4a4a370",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        608
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "947d05db-9937-45ed-8239-a6743be4011d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        1008
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "395fbcf9-9248-4480-86e3-4e7385df3b75",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        496
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e2296442-2615-414c-b9fd-5b732a949e2e",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        608
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b617714f-8cfe-4802-8be5-4f191a9b1d2c",
      "name": "If3",
      "type": "n8n-nodes-base.if",
      "position": [
        -16,
        352
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "0b078ace-f67e-4fc4-896a-3cb0d17fda14",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        1216
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a6310755-b471-4f6a-85b8-f08b9776f92c",
      "name": "Classify text",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        480,
        512
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "2d3e5185-b81b-47bc-840c-4fc9db6149ac",
      "name": "OpenAI Chat",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        848
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "afb09507-d8d3-4400-a299-516c9eff4abc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "b105f592-5f3f-49a0-abc1-7e1d9cdc3fae",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Classify text",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "User Replay Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "User Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Admin Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Admin Message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Docs": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify text": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        []
      ]
    },
    "User Replay Message": {
      "main": [
        []
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 客服机器人, AI 聊天机器人

需要付费吗?

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

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

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

作者
SpaGreen Creative

SpaGreen Creative

@spagreen

SpaGreen Creative is a leading software company specializing in SaaS solutions, AI automation, and Laravel/Vue.js development. With 800+ eCommerce platforms and 8,000+ global clients, we deliver powerful tools for OTT, CRM, ERP, and WhatsApp marketing. We combine innovation and tech to build scalable digital products.

外部链接
在 n8n.io 查看

分享此工作流