8
n8n 中文网amn8n.com

16 - InsightMark:AI驱动的评论分析

中级

这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Code, ClickUp, Hubspot, MondayCom, FormTrigger 等节点。 使用GPT-4分析表单反馈并将任务同步到Monday、ClickUp和HubSpot

前置要求
  • HubSpot API Key
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "sewE6RsPSzHTD82d",
  "meta": {
    "instanceId": "c91c5b6efe2709e07c37996245857ac5d863d575d07e0072127351337c204c40",
    "templateCredsSetupCompleted": true
  },
  "name": "16 - InsightMark:AI驱动的评论分析",
  "tags": [
    {
      "id": "2V3HXFbv2wqNGm6s",
      "name": "Dev",
      "createdAt": "2025-06-17T05:42:41.949Z",
      "updatedAt": "2025-06-17T05:42:41.949Z"
    }
  ],
  "nodes": [
    {
      "id": "ab9f0698-cf91-4bde-bae9-f7b4f0beeea7",
      "name": "🧪 代码",
      "type": "n8n-nodes-base.code",
      "position": [
        -1680,
        -40
      ],
      "parameters": {
        "jsCode": "const raw = $input.first().json;\n\nreturn {\n  review_text: raw.Message,\n  customer_name: raw.Name,\n  rating: parseInt(raw.Rating),\n  product_service: raw[\"Product Service\"],\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "35d329e3-d4fb-4c54-a8e4-b4525f02789d",
      "name": "📝 表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1900,
        -40
      ],
      "webhookId": "b757ef50-c8d1-4041-95c5-2b1aa62cf017",
      "parameters": {
        "options": {},
        "formTitle": "Feedback Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Name",
              "placeholder": "Your Name",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Message",
              "placeholder": "Feedback",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Rating",
              "fieldOptions": {
                "values": [
                  {
                    "option": "1"
                  },
                  {
                    "option": "2"
                  },
                  {
                    "option": "3"
                  },
                  {
                    "option": "4"
                  },
                  {
                    "option": "5"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Product Service",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Please Let us know about your concerns"
      },
      "typeVersion": 2.2
    },
    {
      "id": "dc7bd1ea-c3d3-48b5-8294-24fcfe958947",
      "name": "🧠 OpenAI分析",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "notes": "AI ANALYSIS: Uses OpenAI GPT-4 to analyze sentiment, categorize feedback, and determine required actions. Adjust temperature for more/less creative responses.",
      "position": [
        -1460,
        -40
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "temperature": 0.3
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert customer feedback analyzer. Analyze the provided customer review and return a JSON response with the following structure:\n\n{\n  \"sentiment\": \"positive/negative/neutral\",\n  \"sentiment_score\": 0.85,\n  \"category\": \"product/service/support/delivery/pricing\",\n  \"priority\": \"high/medium/low\",\n  \"department\": \"customer_support/product_team/marketing/sales\",\n  \"action_required\": true/false,\n  \"key_insights\": [\"insight1\", \"insight2\"],\n  \"suggested_response_tone\": \"apologetic/grateful/informative\",\n  \"keywords\": [\"keyword1\", \"keyword2\"],\n  \"summary\": \"Brief summary of the review\"\n}\n\nBe accurate and consistent in your analysis."
            },
            {
              "content": "=Please analyze this customer review:\n\nReview: {{ $json.review_text }}\nCustomer: {{ $json.customer_name }}\nRating: {{ $json.rating }}/5\nProduct/Service: {{ $json.product_service }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "c8cbK7g7bUw6Ifjy",
          "name": "OpenAi account 8"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c41226f7-9ccc-4852-bccd-b64f7e09aff5",
      "name": "🧮 数据处理",
      "type": "n8n-nodes-base.code",
      "notes": "DATA PROCESSING: Parses AI response, prepares task data, and sets routing flags. Modify the create_*_task flags to enable/disable integrations.",
      "position": [
        -1084,
        -40
      ],
      "parameters": {
        "jsCode": "const aiInput = $input.first().json;\n\n// Extract original form data (passed through from previous nodes)\nconst formData = {\n  review_text: $('🧪 Code').first().json.review_text,\n  customer_name: $('🧪 Code').first().json.customer_name,\n  rating: $('🧪 Code').first().json.rating,\n  product_service: $('🧪 Code').first().json.product_service,\n  review_date: new Date().toISOString()\n};\n\n// Parse AI response - it should be a JSON string\nlet aiResponse = {};\ntry {\n  if (typeof aiInput.response === 'string') {\n    aiResponse = JSON.parse(aiInput.response);\n  } else if (aiInput.response && typeof aiInput.response === 'object') {\n    aiResponse = aiInput.response;\n  } else {\n    aiResponse = aiInput;\n  }\n} catch (error) {\n  console.error('Failed to parse AI response:', error);\n  aiResponse = {\n    sentiment: 'neutral',\n    sentiment_score: 0.5,\n    category: 'unspecified',\n    priority: 'medium',\n    department: 'customer_support',\n    action_required: true,\n    key_insights: ['Failed to analyze review'],\n    suggested_response_tone: 'informative',\n    keywords: [],\n    summary: 'Analysis failed'\n  };\n}\n\n// Safety fallback\nconst sentiment = aiResponse.sentiment ?? 'neutral';\n\n// Construct final processed output (data only)\nconst processedData = {\n  // Original data\n  review_text: formData.review_text,\n  customer_name: formData.customer_name,\n  rating: formData.rating,\n  product_service: formData.product_service,\n  review_date: formData.review_date,\n\n  // Enriched data\n  sentiment,\n  sentiment_score: aiResponse.sentiment_score ?? 0.5,\n  category: aiResponse.category ?? 'unspecified',\n  priority: aiResponse.priority ?? 'medium',\n  department: aiResponse.department ?? 'customer_support',\n  action_required: aiResponse.action_required ?? true,\n  key_insights: aiResponse.key_insights ?? [],\n  suggested_response_tone: aiResponse.suggested_response_tone ?? 'informative',\n  keywords: aiResponse.keywords ?? [],\n  summary: aiResponse.summary ?? '',\n\n  // Computed metadata\n  task_title: `Review Response: ${sentiment.toUpperCase()} - ${formData.customer_name}`,\n  task_description: `Customer Review Analysis\n\nCustomer: ${formData.customer_name}\nRating: ${formData.rating}/5\nSentiment: ${sentiment} (${aiResponse.sentiment_score ?? 'N/A'})\nCategory: ${aiResponse.category ?? 'unspecified'}\nPriority: ${aiResponse.priority ?? 'medium'}\n\nReview: \"${formData.review_text}\"\n\nKey Insights:\n${(aiResponse.key_insights ?? []).map(i => `• ${i}`).join('\\n')}\n\nSuggested Response Tone: ${aiResponse.suggested_response_tone ?? 'informative'}\n\nKeywords: ${(aiResponse.keywords ?? []).join(', ')}`,\n\n  // Due date logic\n  due_date:\n    (aiResponse.priority ?? 'medium') === 'high'\n      ? new Date(Date.now() + 1 * 24 * 60 * 60 * 1000).toISOString()\n      : (aiResponse.priority ?? 'medium') === 'medium'\n      ? new Date(Date.now() + 3 * 24 * 60 * 60 * 1000).toISOString()\n      : new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString()\n};\n\nreturn processedData;"
      },
      "typeVersion": 2
    },
    {
      "id": "cadef244-c319-4166-936a-6fb2943bdb75",
      "name": "🕵️‍♂️ AI代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -864,
        -40
      ],
      "parameters": {
        "text": "=Create a structured task using the following customer review analysis. The output must be in valid JSON format and contain fields that are friendly for Monday.com, HubSpot, and ClickUp.\n\nRequirements:\nOutput only a JSON object.\n\nUse a clear, professional tone.\n\nEnsure the task is actionable, with proper metadata, title, description, and priority.\n\nInclude customer insights, sentiment analysis, and due date.\n\nUser Provided Data:\n{\n  \"review_text\": \"{{ $json.review_text }}\",\n  \"customer_name\": \"{{ $json.customer_name }}\",\n  \"rating\": \"{{ $json.rating }}\",\n  \"product_service\": \"{{ $json.product_service }}\",\n  \"review_date\": \"{{ $json.review_date }}\",\n  \"sentiment\": \"{{ $json.sentiment }}\",\n  \"sentiment_score\": {{ $json.sentiment_score }},\n  \"category\": \"{{ $json.category }}\",\n  \"priority\": \"{{ $json.priority }}\",\n  \"department\": \"{{ $json.department }}\",\n  \"action_required\": {{ $json.action_required }},\n  \"due_date\": \"{{ $json.due_date }}\",\n  \"task_title\": \"{{ $json.task_title }}\",\n  \"task_description\": `{{ $json.task_description }}`\n}\n\nOutput format (example structure):\n\n{\n  \"title\": \"Review Response: POSITIVE - John Doe\",\n  \"description\": \"Clear, professional task description with insights and action items.\",\n  \"priority\": \"High\",\n  \"due_date\": \"2025-08-08\",\n  \"metadata\": {\n    \"customer_name\": \"John Doe\",\n    \"rating\": 5,\n    \"product_service\": \"Product X\",\n    \"review_date\": \"2025-08-05\",\n    \"sentiment\": \"positive\",\n    \"sentiment_score\": 0.95,\n    \"category\": \"delivery\",\n    \"department\": \"customer_support\",\n    \"action_required\": true\n  }\n}\n\nMake sure:\n\nThe order is exactly maintained as above.\n\nNo additional fields are included.\n\nNo surrounding commentary or formatting is added.\n\nReturn the result as a pure JSON object (no markdown, no explanations, no code block formatting like ```json).\n\nOutput is only the JSON object.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c35348dd-0830-465a-ac90-d65cebb7de98",
      "name": "💬 OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -776,
        180
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "c8cbK7g7bUw6Ifjy",
          "name": "OpenAi account 8"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "93e07162-0348-49f4-88bc-73aab6d34584",
      "name": "🗓️ 创建Monday.com项目",
      "type": "n8n-nodes-base.mondayCom",
      "notes": "MONDAY.COM INTEGRATION: Creates item in Monday.com board. Update BOARD_ID and column IDs to match your board structure.",
      "position": [
        -488,
        -240
      ],
      "parameters": {
        "name": "=Feedback",
        "boardId": "2054150933",
        "groupId": "group_mktjh98q",
        "resource": "boardItem",
        "additionalFields": {
          "columnValues": "={{ $json.output }}"
        }
      },
      "credentials": {
        "mondayComApi": {
          "id": "phJg8XbofdmenpXl",
          "name": "Monday.com account - (Dev)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e934b992-6063-4178-a3e3-71e78bc087fa",
      "name": "✅ 创建ClickUp任务",
      "type": "n8n-nodes-base.clickUp",
      "notes": "CLICKUP INTEGRATION: Creates task in ClickUp with priority mapping and keyword tagging. Update LIST_ID with your ClickUp list.",
      "position": [
        -488,
        -40
      ],
      "parameters": {
        "list": "901610042700",
        "name": "=Feedback",
        "team": "90161084725",
        "space": "90164686646",
        "folder": "90166023626",
        "authentication": "oAuth2",
        "additionalFields": {
          "customFieldsJson": "={{ $json.output }}"
        }
      },
      "credentials": {
        "clickUpOAuth2Api": {
          "id": "oWjc2WsgQYtkq2Aq",
          "name": "ClickUp account - (DEV)"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "386f2bf4-948e-4032-b4f4-2ea46a30d401",
      "name": "📌 创建HubSpot任务",
      "type": "n8n-nodes-base.hubspot",
      "notes": "HUBSPOT INTEGRATION: Creates task in HubSpot CRM with priority mapping and due date. Requires HubSpot API key in credentials.",
      "position": [
        -488,
        160
      ],
      "parameters": {
        "type": "task",
        "metadata": {
          "body": "={{ $json.output }}"
        },
        "resource": "engagement",
        "authentication": "appToken",
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "ZfQVFpoeed975usK",
          "name": "HubSpot account - (Dev)"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4e46e5a1-e1ab-40c6-bbe4-67e6f072b3d4",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        -360
      ],
      "parameters": {
        "width": 440,
        "height": 700,
        "content": "## 涵盖节点:表单提交时,代码"
      },
      "typeVersion": 1
    },
    {
      "id": "f60c29cf-8f8d-4451-aa75-846a01a8ec7d",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1480,
        -360
      ],
      "parameters": {
        "color": 5,
        "width": 540,
        "height": 700,
        "content": "## 涵盖节点:OpenAI分析,数据处理"
      },
      "typeVersion": 1
    },
    {
      "id": "7ab41f5f-ca38-4fcc-aa8d-e14844dc7c71",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        -360
      ],
      "parameters": {
        "color": 3,
        "width": 340,
        "height": 700,
        "content": "## 涵盖节点:AI代理,OpenAI聊天模型"
      },
      "typeVersion": 1
    },
    {
      "id": "3ec93f97-6d95-42fa-b4fc-242d31827a63",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -540
      ],
      "parameters": {
        "color": 4,
        "width": 440,
        "height": 880,
        "content": "## 涵盖节点:创建Monday.com项目,创建ClickUp任务,创建HubSpot任务"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "da2bc46c-abcc-4537-bd0c-ea048e7e42e3",
  "connections": {
    "🧪 Code": {
      "main": [
        [
          {
            "node": "🧠 OpenAI Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧠 OpenAI Analysis": {
      "main": [
        [
          {
            "node": "🧮 Data Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧮 Data Processing": {
      "main": [
        [
          {
            "node": "🕵️‍♂️ AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💬 OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "🕵️‍♂️ AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "✅ Create ClickUp Task": {
      "main": [
        []
      ]
    },
    "📝 On form submission": {
      "main": [
        [
          {
            "node": "🧪 Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📌 Create HubSpot Task": {
      "main": [
        []
      ]
    },
    "🕵️‍♂️ AI Agent": {
      "main": [
        [
          {
            "node": "🗓️ Create Monday.com Item",
            "type": "main",
            "index": 0
          },
          {
            "node": "✅ Create ClickUp Task",
            "type": "main",
            "index": 0
          },
          {
            "node": "📌 Create HubSpot Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🗓️ Create Monday.com Item": {
      "main": [
        []
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - AI 摘要总结, 多模态 AI

需要付费吗?

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

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

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

作者
Avkash Kakdiya

Avkash Kakdiya

@itechnotion

🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.

外部链接
在 n8n.io 查看

分享此工作流