8
n8n 中文网amn8n.com

使用OpenAI进行产品评论情感分析

中级

这是一个Market Research, AI Summarization领域的自动化工作流,包含 6 个节点。主要使用 GoogleSheets, GoogleSheetsTrigger, LmChatOpenAi, SentimentAnalysis 等节点。 使用Google表格和OpenAI进行产品评论情感分析

前置要求
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "ugi00HVDOW9kN81g",
  "meta": {
    "instanceId": "14e4c77104722ab186539dfea5182e419aecc83d85963fe13f6de862c875ebfa",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 OpenAI 进行产品评论情感分析",
  "tags": [],
  "nodes": [
    {
      "id": "a0c76f41-a0f7-4c15-88ed-9372ecac1db3",
      "name": "情感分析",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        -100,
        -40
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.Review }}"
      },
      "typeVersion": 1
    },
    {
      "id": "4fc752b9-8dcf-4c92-9ffe-83ff63f02a6e",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -80,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2fb5412d-bf2f-4e9c-9f99-e057b6b8c0bc",
      "name": "Google Sheets 触发器",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -300,
        -40
      ],
      "parameters": {
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HOq0GIqZ80rMhlDaU9B4d4Vq9BPj1WsTzfnB1kAmY2g",
          "cachedResultUrl": "",
          "cachedResultName": "Review"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1
    },
    {
      "id": "88925ca1-3294-4655-8943-67f403044dd9",
      "name": "已更新的产品评论情感",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        440,
        -60
      ],
      "parameters": {
        "columns": {
          "value": {
            "Review": "={{ $json.Review }}",
            "Sentiment": "={{ $json.sentimentAnalysis.category }}"
          },
          "schema": [
            {
              "id": "Review",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Review",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Sentiment",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Review"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1HOq0GIqZ80rMhlDaU9B4d4Vq9BPj1WsTzfnB1kAmY2g",
          "cachedResultUrl": "",
          "cachedResultName": "Review"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "dd0610dd-524c-4987-8fca-fc2ed6e1deb2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -240
      ],
      "parameters": {
        "color": 3,
        "width": 1100,
        "height": 520,
        "content": "## 使用 OpenAI 进行产品评论情感分析"
      },
      "typeVersion": 1
    },
    {
      "id": "be858b1d-e0c6-4337-b3da-77b748b82597",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        300
      ],
      "parameters": {
        "color": 7,
        "width": 1100,
        "height": 180,
        "content": "## 描述"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "07a342c5-be90-41f9-99c3-93d918db974d",
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Updated Sentiment of Product Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Updated Sentiment of Product Review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Updated Sentiment of Product Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, AI 摘要总结

需要付费吗?

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

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

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

作者
WeblineIndia

WeblineIndia

@weblineindia

A Leading Software Engineering, Consulting & Outsourcing Services Company in USA & India serving Clients Globally since 1999.

外部链接
在 n8n.io 查看

分享此工作流