8
n8n 中文网amn8n.com

我的工作流 4

中级

这是一个Support, AI领域的自动化工作流,包含 6 个节点。主要使用 Webhook, Function, Telegram, EmailSend, HttpRequest 等节点,结合人工智能技术实现智能自动化。 客户反馈收集与分析器(表单 → AI 摘要 → 邮件 + 社交媒体草稿)

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "mW6b4dMHkIDfnaIj",
  "meta": {
    "instanceId": "7b7fd5f72a378d0859f4d1cf8dd3c226094df4777ef6aca192ac32e815fe212a",
    "templateCredsSetupCompleted": true
  },
  "name": "我的工作流 4",
  "tags": [],
  "nodes": [
    {
      "id": "9ae28c07-bb44-4e64-b38c-a74a9de81b2e",
      "name": "接收反馈",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -440,
        540
      ],
      "webhookId": "89e8d5ec-d442-41ea-9ff1-93a9df0b2aa1",
      "parameters": {
        "path": "client-feedback",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "770bc041-1846-4ac1-b8dc-61756686f906",
      "name": "准备 AI 提示语",
      "type": "n8n-nodes-base.function",
      "position": [
        -240,
        540
      ],
      "parameters": {
        "functionCode": "\nconst feedback = $json.feedback || \"No feedback provided.\";\nreturn [{\n  json: {\n    prompt: `Analyze this client feedback: \"${feedback}\"\\n\\n1. Summarize the positive points.\\n2. Suggest improvements.\\n3. Generate a short social media post based on the positive elements.`\n  }\n}];\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0b3a469a-f6f4-4140-9c6f-fd7ba7689c5e",
      "name": "使用 AI 分析",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -40,
        540
      ],
      "parameters": {
        "url": "https://api.deepseek.com/generate",
        "options": {},
        "authentication": "predefinedCredentialType",
        "jsonParameters": true
      },
      "typeVersion": 2
    },
    {
      "id": "bdbf3a85-e68f-4fe3-b0b4-d44578d11c31",
      "name": "格式化 AI 输出",
      "type": "n8n-nodes-base.function",
      "position": [
        160,
        540
      ],
      "parameters": {
        "functionCode": "\nconst output = $json.response || $json.choices?.[0]?.text || \"No AI output.\";\nconst splitIndex = output.indexOf(\"3.\");\nlet summary = output;\nlet post = \"No post generated.\";\n\nif (splitIndex !== -1) {\n  summary = output.substring(0, splitIndex).trim();\n  post = output.substring(splitIndex).replace(/^3\\./, \"\").trim();\n}\n\nreturn [{\n  json: {\n    report: summary,\n    post: post\n  }\n}];\n"
      },
      "typeVersion": 1
    },
    {
      "id": "47093d4d-645b-4dc8-a5a4-1b35a649ac97",
      "name": "发送反馈报告",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        380,
        500
      ],
      "parameters": {
        "text": "={{ $json[\"report\"] }}",
        "options": {},
        "subject": "Client Feedback Summary",
        "toEmail": "team@email.com",
        "fromEmail": "your@email.com"
      },
      "typeVersion": 1
    },
    {
      "id": "e49a4898-00d9-4413-ac6d-87aafdfe6ff9",
      "name": "发送社交媒体草稿",
      "type": "n8n-nodes-base.telegram",
      "position": [
        380,
        660
      ],
      "webhookId": "07598764-aee9-41ea-82c1-0ded0ac08b57",
      "parameters": {
        "text": "={{ $json[\"post\"] }}",
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "additionalFields": {}
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "54d175ec-080f-4d2d-9d83-60dd36c8f11b",
  "connections": {
    "Analyze with AI": {
      "main": [
        [
          {
            "node": "Format AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI Output": {
      "main": [
        [
          {
            "node": "Send Feedback Report",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Social Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Feedback": {
      "main": [
        [
          {
            "node": "Prepare AI Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Prompt": {
      "main": [
        [
          {
            "node": "Analyze with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 客户支持, 人工智能

需要付费吗?

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

工作流信息
难度等级
中级
节点数量6
分类2
节点类型5
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流