8
n8n 中文网amn8n.com

呼叫中心转录情感分析 n8n

中级

这是一个AI Summarization, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Set, GoogleSheets, SplitInBatches, Agent, ScheduleTrigger 等节点。 使用GPT-4o-mini和Google Sheets自动化呼叫中心情感分析

前置要求
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "6kTlui6CDAIL3vNV",
  "meta": {
    "instanceId": "9272721148ea09184b6bbb7ce6219dab088562dd450e2df8280d57c2e34c7d84",
    "templateCredsSetupCompleted": true
  },
  "name": "呼叫中心转录情感分析 n8n",
  "tags": [],
  "nodes": [
    {
      "id": "eee89774-3c9b-4e26-8bf2-9f14ee1ced97",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        192,
        128
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "=gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "zHTJ5AI7kBmTnuvv",
          "name": "InfyOm"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "77912e60-0f2a-4434-b8c7-00bc53c474a9",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -256,
        32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "d44b524d-3b67-4c48-8d52-34bba6ad16b9",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -704,
        32
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 19
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3173c049-13c7-483c-a6ea-65340bf585f9",
      "name": "获取所有转录",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        32
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU/edit?usp=drivesdk",
          "cachedResultName": "Transcript_analysis_system"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "WdaCQmtoNquNSoAA",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "856d4c88-f8a6-41ab-b52c-639e58df2b0c",
      "name": "仅发送转录字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -32,
        -96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "697b9e87-2767-43a8-9dfe-72c50903a5d5",
              "name": "Full Transcript",
              "type": "string",
              "value": "={{ $json[\"Full Transcript\"] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0aa10ec0-c836-44df-ad85-9a503e1d10e3",
      "name": "分析转录",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        192,
        -96
      ],
      "parameters": {
        "text": "={{ $json[\"Full Transcript\"] }}",
        "options": {
          "systemMessage": "=You are an advanced AI assistant specialized in sentiment analysis for customer service conversations.\n\nYour task is to extract structured data from a customer service chat transcript. Return values for each field listed below.\n\nRespond in JSON format using structured output tool with the following fields:\n\n\n- Topic (Topic name for discussion like 'Medical Report','shipping delay')\n- Customer Name\n- Agent Name\n- Greeting Sentiment (1 to 5, where 5 is very polite/friendly/Greeting and 1 is rude)\n- Closing Sentiment (1 to 5, where 5 is very Closing polite/friendly and 1 is rude)\n- Problem Solving (1 to 5, where 5 is excellent and 1 is poor)\n- Agent Friendliness (1 to 5, where 5 is very polite/friendly and 1 is rude)\n- Customer Sentiment (Before → After, e.g. \"Angry → Satisfied\")\n- Issue Resolved (Yes / No / Partially)"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "1c427949-04d9-4ed8-9d17-d62bf34c18e8",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        368,
        128
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"Topic\": \"XYZ\",\n  \"Customer Name\": \"John D\",\n  \"Agent Name\": \"Priya M\",\n  \"Greeting Sentiment\": 5,\n  \"Closing Sentiment\": 5,\n  \"Problem Solving\": 5,\n  \"Agent Friendliness\": 5,\n  \"Customer Sentiment\": \"Frustrated → Satisfied\",\n  \"Issue Resolved\": \"Yes\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "79c31b02-f5bc-4185-b83a-6ca7caa25f6c",
      "name": "存储分析转录",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        608,
        32
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Done",
            "Agent Name": "={{ $json.output[\"Agent Name\"] }}",
            "Total Rating": "={{( Number($json.output[\"Greeting Sentiment\"]) + Number($json.output[\"Closing Sentiment\"]) + Number($json.output[\"Problem Solving\"]) + Number($json.output[\"Agent Friendliness\"]))/4}}\n",
            "Customer Name": "={{ $json.output[\"Customer Name\"] }}",
            "Issue Resolved": "={{ $json.output[\"Issue Resolved\"] }}",
            "Full Transcript": "={{ $('Loop Over Items').item.json['Full Transcript'] }}",
            "Problem Solving": "={{ $json.output[\"Problem Solving\"] }}",
            "Closing Sentiment": "={{ $json.output[\"Closing Sentiment\"] }}",
            "Agent Friendliness": "={{ $json.output[\"Agent Friendliness\"] }}",
            "Customer Sentiment": "={{ $json.output[\"Customer Sentiment\"] }}",
            "Greeting Sentiment": "={{ $json.output[\"Greeting Sentiment\"] }}",
            "Conversations Topics": "={{ $json.output.Topic }}"
          },
          "schema": [
            {
              "id": "Full Transcript",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Full Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Conversations Topics",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Conversations Topics",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Customer Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Customer Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Agent Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Agent Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Greeting Sentiment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Greeting Sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Closing Sentiment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Closing Sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Problem Solving",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Problem Solving",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Agent Friendliness",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Agent Friendliness",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Customer Sentiment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Customer Sentiment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Issue Resolved",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Issue Resolved",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total Rating",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Total Rating",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Full Transcript"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU/edit?usp=drivesdk",
          "cachedResultName": "Transcript_analysis_system"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "WdaCQmtoNquNSoAA",
          "name": "Google Sheets"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "735bad42-0258-4076-a4d2-939a4a2677f6",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -176
      ],
      "parameters": {
        "width": 512,
        "height": 128,
        "content": "### 示例 Google Sheet"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a54e879a-6738-4edb-b195-8b47945d70a7",
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Send only Transcript Field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analysis Transcript",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analysis Transcript",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get All Transcript": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analysis Transcript": {
      "main": [
        [
          {
            "node": "Store Analysis Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Analysis Transcript": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send only Transcript Field": {
      "main": [
        [
          {
            "node": "Analysis Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
InfyOm Technologies

InfyOm Technologies

@infyom

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.

外部链接
在 n8n.io 查看

分享此工作流