Zendesk -> Pinecone -> AI 智能体 -> Slack

高级

这是一个Ticket Management、AI RAG领域的自动化工作流,包含 18 个节点。主要使用 Wait、Slack、Zendesk、Agent、ScheduleTrigger 等节点。 基于 Pinecone、OpenAI 和 Slack 的 Zendesk 工单摘要生成器

前置要求
  • Slack Bot Token 或 Webhook URL
  • OpenAI API Key
  • Pinecone API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "xoCD0HfXQ6cHOBOT",
  "meta": {
    "instanceId": "fe52080916406a2a9812a7975b2d9b9e9838f3ce0f0b34614c611fb2ca1528d3",
    "templateCredsSetupCompleted": true
  },
  "name": "Zendesk -> Pinecone -> AI 智能体 -> Slack",
  "tags": [],
  "nodes": [
    {
      "id": "fc6bd8eb-249e-42c4-9114-c79041cb55d9",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -16,
        -1712
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "iAPtqcVj4gp3rRy2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0e334499-89f1-4a35-857b-6927d41b02f0",
      "name": "Pinecone 向量存储2",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        144,
        -1616
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "topK": 200,
        "options": {
          "pineconeNamespace": "=<namespace_name_here>"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-zendesk-YOUR_BRAND_NAME_HERE",
          "cachedResultName": "n8n-zendesk-YOUR_BRAND_NAME_HERE"
        },
        "toolDescription": "This is the vector store for the ticket data you need to answer queries."
      },
      "credentials": {
        "pineconeApi": {
          "id": "AhisTk5eS6H3HYiC",
          "name": "PineconeApi account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "db1cecb2-d8a8-459d-b4e2-3a7fdd8a22e5",
      "name": "OpenAI嵌入2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        144,
        -1472
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "iAPtqcVj4gp3rRy2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a0d15954-bc55-4218-9c7b-b4c4f01bdbf1",
      "name": "发送到 Slack 频道",
      "type": "n8n-nodes-base.slack",
      "notes": "Send summary to the Slack channel",
      "position": [
        464,
        -1920
      ],
      "webhookId": "50033838-ae3f-4963-b396-defa22ae00ee",
      "parameters": {
        "text": "={{ $('AI Agent - Summary generator').item.json.output }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "C1111111"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "id": "tVU8HVcP92PJGgqD",
          "name": "Slack account"
        }
      },
      "notesInFlow": true,
      "typeVersion": 2.3
    },
    {
      "id": "25d2b22a-3586-477a-a6f9-70030c60a258",
      "name": "默认数据加载器1",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "notes": "Load tickets",
      "position": [
        -384,
        -1584
      ],
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "=url",
                "value": "={{ $json.url }}"
              },
              {
                "name": "created_at",
                "value": "={{ $json.created_at }}"
              }
            ]
          }
        },
        "jsonData": "=subject: {{ $json.raw_subject }} | description: {{ $json.description }} | device: {{ $json.fields[3].value }} | OS: {{ $json.fields[5].value }}",
        "jsonMode": "expressionData"
      },
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "ea89f205-9399-48dd-a59b-106aabdc6725",
      "name": "等待1",
      "type": "n8n-nodes-base.wait",
      "notes": "15 seconds wait",
      "position": [
        -208,
        -1904
      ],
      "webhookId": "21cf6961-8f38-496d-99d0-932bca035d2e",
      "parameters": {
        "amount": 15
      },
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "ed674d9d-0432-4e58-9c7c-65e7d93a5b32",
      "name": "每日触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "notes": "Trigger omce a day at 10am",
      "position": [
        -1040,
        -1904
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2,
      "alwaysOutputData": true
    },
    {
      "id": "aeefa7d5-c15b-4728-8f07-ef4c2a06db25",
      "name": "获取工单",
      "type": "n8n-nodes-base.zendesk",
      "notes": "Fetch tickets created in the last 24 hours",
      "position": [
        -784,
        -1904
      ],
      "parameters": {
        "options": {
          "query": "=created>{{$now.minus({hours: 24})}} brand:<brand_id_here>",
          "sortBy": "created_at",
          "sortOrder": "desc"
        },
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "zendeskApi": {
          "id": "3YnOaMxI5QwxM5ij",
          "name": "Zendesk account - Woodoku (old)"
        }
      },
      "notesInFlow": true,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "e0ca2b57-f1e3-401a-8341-8205502ef315",
      "name": "Pinecone 向量存储 - 工单",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        -544,
        -1904
      ],
      "parameters": {
        "mode": "insert",
        "options": {
          "clearNamespace": true,
          "pineconeNamespace": "<namespace_name_here>"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "n8n-zendesk-YOUR_BRAND_NAME_HERE",
          "cachedResultName": "n8n-zendesk-YOUR_BRAND_NAME_HERE"
        }
      },
      "credentials": {
        "pineconeApi": {
          "id": "AhisTk5eS6H3HYiC",
          "name": "PineconeApi account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0d1b212f-c907-48a7-9602-836a375c4285",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -576,
        -1680
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "iAPtqcVj4gp3rRy2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dd0b1804-0b5c-4ffd-9ce1-3f25c4d61238",
      "name": "AI 智能体 - 摘要生成器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        32,
        -1904
      ],
      "parameters": {
        "text": "=Create a summary of tickets available in the vector store. Highlight main complaints that are mentioned in multiple tickets. For each complaint, mention the number of different tickets that the complaint was raised in.",
        "options": {
          "systemMessage": "=Your job is to respond to prompts using the information you gather from the customer support tickets. Your main role is to help your users to gain insights from tickets without having to read tickets one by one. "
        },
        "promptType": "define"
      },
      "typeVersion": 2,
      "alwaysOutputData": false
    },
    {
      "id": "4d6a7e9c-ce40-45f8-9857-0b924782892f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -2048
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 304,
        "content": "从 Zendesk 获取过去 24 小时内创建的工单。如果查询特定品牌的工单,请确保查询字符串包含品牌 ID。"
      },
      "typeVersion": 1
    },
    {
      "id": "e9a14c2c-7b73-4687-b7b5-057af80ce64c",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -2048
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 304,
        "content": "将工单存储在 Pinecone 索引和命名空间中。在节点中选择索引并定义命名空间。命名空间会自动创建。在存储新工单之前清除命名空间。"
      },
      "typeVersion": 1
    },
    {
      "id": "15021f15-a1ff-45fb-b10d-7ea06ecb4bf3",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -1696
      ],
      "parameters": {
        "color": 7,
        "width": 176,
        "height": 256,
        "content": "将 Zendesk 工单字段与 Pinecone 中的数据和元数据匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "28cd0979-3fe6-4721-817d-e01b7389b6ba",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -2048
      ],
      "parameters": {
        "color": 7,
        "width": 176,
        "height": 304,
        "content": "在 AI 智能体开始总结存储在 Pinecone 中的工单之前需要短暂等待。"
      },
      "typeVersion": 1
    },
    {
      "id": "3d31efa1-5a49-4fa0-9d9f-f79c72fc9309",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -1712
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 208,
        "content": "选择与 \"Pinecone 向量存储 - 工单\" 节点中使用的相同索引和命名空间"
      },
      "typeVersion": 1
    },
    {
      "id": "02c9850e-82f6-4a5e-a993-2d3ef0a85b7f",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -2048
      ],
      "parameters": {
        "color": 7,
        "width": 256,
        "height": 304,
        "content": "AI 智能体总结工单。"
      },
      "typeVersion": 1
    },
    {
      "id": "95f9a3cb-4658-4dd6-8b5d-85b5960a0073",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -2144
      ],
      "parameters": {
        "width": 544,
        "height": 720,
        "content": "## 使用 Pinecone、OpenAI 和 Slack 的"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2823fade-39a2-43c7-8c1f-bb0626910012",
  "connections": {
    "Wait1": {
      "main": [
        [
          {
            "node": "AI Agent - Summary generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get tickets": {
      "main": [
        [
          {
            "node": "Pinecone Vector Store - Tickets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily trigger": {
      "main": [
        [
          {
            "node": "Get tickets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store - Tickets",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Pinecone Vector Store2",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Summary generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader1": {
      "ai_document": [
        [
          {
            "node": "Pinecone Vector Store - Tickets",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store2": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Summary generator",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Summary generator": {
      "main": [
        [
          {
            "node": "Send to Slack channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pinecone Vector Store - Tickets": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个高级难度的工作流,适用于Ticket Management、AI RAG等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

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

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

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

外部链接
在 n8n.io 上查看 →

分享此工作流