8
n8n 中文网amn8n.com

多智能体架构免费入门模板

高级

这是一个Document Extraction, Multimodal AI领域的自动化工作流,包含 24 个节点。主要使用 Set, Slack, GoogleDrive, HttpRequest, ManualTrigger 等节点。 协作销售规划:多智能体AI、Google文档和Slack

前置要求
  • Slack Bot Token 或 Webhook URL
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "SvIdF4LUuyHYM2ii",
  "meta": {
    "instanceId": "4a2e6764ba7a6bc9890d9225f4b21d570ce88fc9bd57549c89057fcee58fed0f",
    "templateCredsSetupCompleted": true
  },
  "name": "多智能体架构免费入门模板",
  "tags": [],
  "nodes": [
    {
      "id": "02b4083a-34a1-4d4f-8f7d-936633d5c3ac",
      "name": "点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -416,
        -16
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "405374aa-0fef-4384-9de8-4f996ad880e9",
      "name": "CEO智能体",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        -16
      ],
      "parameters": {
        "text": "=Company: {{ $json.Company }}\nProducts/Focus: {{ $json.Product }}\nTarget customers: {{ $json.Audience }}\nSale window: {{ $json['Sale window'] }}\nPrimary channels: {{ $json['Primary channels'] }}\nSuccess metrics: {{ $json['Success metrics'] }}\n\nCreate a practical plan for the upcoming sales season. Keep to the structure and JSON schema in the system prompt.",
        "options": {
          "systemMessage": "You are the CEO orchestrating three tool agents (departments) to produce a concise sales-season plan.\n\nTOOLS AVAILABLE\n1) MarketingDept – campaign ideas, channels, content calendar.\n2) OpsDept – inventory & staffing readiness, fulfillment steps, key risks.\n3) FinanceDept – pricing/discounts, budget split, targets.\n\nWORKFLOW\n- Read the user brief.\n- Call each tool once with only the info they need.\n- Merge their outputs into a single, consistent plan.\n- Resolve conflicts briefly (prefer feasibility over ambition).\n- Keep it action-oriented and short.\n\nFINAL OUTPUT (markdown sections)\n# Summary\n# Timeline (key dates)\n# Marketing Plan (top 3 campaigns, channels)\n# Operations Readiness (inventory, staffing, fulfillment)\n# Pricing & Budget (discounts, budget split, targets)\n# Risks & Mitigations\n# Next 5 Actions"
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "4d1ed7fa-a106-4a5b-ae0e-67fb8fe99b85",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        32,
        208
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PPSwAKeLQYgAPobT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "de8475ee-2b6a-43ec-85ce-a620996901b2",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -192,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a0237546-a7a6-4f52-b4c9-078f7ef6879f",
              "name": "Company",
              "type": "string",
              "value": "AutomateWithMe"
            },
            {
              "id": "e6fbc3e4-d59e-4ed3-9eac-553d2662bdec",
              "name": "Product",
              "type": "string",
              "value": "Automation Services"
            },
            {
              "id": "bc72c647-c2d9-462f-95da-c3889ca30d20",
              "name": "Sale window",
              "type": "string",
              "value": "Aug to December annually"
            },
            {
              "id": "663cc17d-b979-4b3c-99c9-d82f4ccdb03b",
              "name": "Primary channels",
              "type": "string",
              "value": "Amazon, Ebay"
            },
            {
              "id": "bb9172a7-38e3-4dfb-a181-991257f1d454",
              "name": "Success metrics",
              "type": "string",
              "value": "Revenue"
            },
            {
              "id": "65f42033-edef-4046-9d91-25107d52c81d",
              "name": "Audience",
              "type": "string",
              "value": "SME's owner (CEO, CFO, CIO)"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6b954de8-5ad2-417f-ad36-9c483abd88ae",
      "name": "OpenAI 聊天模型1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        256,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PPSwAKeLQYgAPobT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "92c5d1f4-7a87-4cbd-aff2-b6263dffaa29",
      "name": "OpenAI 聊天模型2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        576,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PPSwAKeLQYgAPobT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "740bc190-ca94-4dd2-b25a-a6b433b58c3f",
      "name": "营销智能体",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        160,
        208
      ],
      "parameters": {
        "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "You are the Marketing Department. From the brief, propose practical campaigns.\n\nOUTPUT (JSON):\n{\n  \"campaigns\":[\n    {\"name\":\"\",\"channel\":\"\",\"audience\":\"\",\"message\":\"\",\"kpi\":\"\"}\n  ],\n  \"content_calendar\":[\n    {\"date\":\"YYYY-MM-DD\",\"channel\":\"\",\"asset\":\"\",\"cta\":\"\"}\n  ],\n  \"notes\":\"\"\n}\n\nRULES\n- Max 3 campaigns, each tied to 1–2 channels.\n- KPIs: choose 1 per campaign (e.g., CTR, leads, revenue).\n- Be realistic with the given constraints and dates."
      },
      "typeVersion": 2.2
    },
    {
      "id": "dca51d1c-5347-4756-b002-193c4ebd3eab",
      "name": "运营智能体",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        480,
        208
      ],
      "parameters": {
        "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "You are Operations. Assess readiness and outline what must happen to deliver.\n\nOUTPUT (JSON):\n{\n  \"inventory_note\":\"\",\n  \"staffing_plan\":[{\"team\":\"\",\"need\":\"\",\"when\":\"\"}],\n  \"fulfillment_steps\":[{\"step\":\"\",\"owner\":\"\",\"due\":\"\"}],\n  \"operational_risks\":[{\"risk\":\"\",\"mitigation\":\"\"}]\n}\n\nRULES\n- Keep it feasible: call out shortages or bottlenecks.\n- Prefer simple, sequenced steps with clear owners and due dates."
      },
      "typeVersion": 2.2
    },
    {
      "id": "b3f5c3e9-a26f-4281-916a-a0bc92f96ead",
      "name": "财务智能体",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        800,
        208
      ],
      "parameters": {
        "text": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {},
        "toolDescription": "You are Finance. Recommend discounts, budget split, and targets.\n\nOUTPUT (JSON):\n{\n  \"discounts\":[{\"product\":\"\",\"type\":\"% or fixed\",\"value\":0,\"notes\":\"\"}],\n  \"budget_split\":{\"marketing\":0,\"ops\":0,\"contingency\":0},\n  \"targets\":{\"revenue\":0,\"roi\":0,\"gross_margin_pct\":0},\n  \"notes\":\"\"\n}\n\nRULES\n- Keep totals sensible and within constraints.\n- Tie discounts to campaigns and inventory realities."
      },
      "typeVersion": 2.2
    },
    {
      "id": "6812da19-e35c-4dad-8fee-be01340430b9",
      "name": "OpenAI聊天模型3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        896,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PPSwAKeLQYgAPobT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c73b0250-c41d-40ae-be5f-9e97098b7afe",
      "name": "创建文档文件",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1424,
        -16
      ],
      "parameters": {
        "url": "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart&supportsAllDrives=true",
        "body": "=--foo_bar_baz\nContent-Type: application/json; charset=UTF-8\n\n{\n  \"name\": \"Company Sale Plan {{ $today.format('yyyy-MM-dd-hhmm') }}\",\n  \"mimeType\": \"application/vnd.google-apps.document\",\n  \"parents\": [\"{{ $json['Drive Folder ID'] }}\"]\n}\n\n--foo_bar_baz\nContent-Type: text/markdown; charset=UTF-8\n\n{{ $json['Document Content'] }}\n--foo_bar_baz--",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "raw",
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "rawContentType": "multipart/related; boundary=foo_bar_baz",
        "queryParameters": {
          "parameters": [
            {
              "name": "uploadType",
              "value": "multipart"
            },
            {
              "name": "supportsAllDrives",
              "value": "true"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "boundary",
              "value": "foo_bar_baz"
            }
          ]
        },
        "nodeCredentialType": "googleDriveOAuth2Api"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "fC471es5gk5Mm900",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "729829e7-565b-43b5-ab77-a78ea976061d",
      "name": "配置元数据",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        -16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1ff0b9a4-7d60-44ec-b047-e49252f1ace9",
              "name": "Drive Folder ID",
              "type": "string",
              "value": "1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI"
            },
            {
              "id": "75ab39ab-44d0-4272-bceb-fe63bd72a5ba",
              "name": "Document Content",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "576f221c-2766-4e28-b3b4-69d9f1d25b39",
      "name": "上传文件",
      "type": "n8n-nodes-base.slack",
      "position": [
        1872,
        -16
      ],
      "webhookId": "b4d5b0ca-b166-4000-abf8-df943fe711ae",
      "parameters": {
        "options": {
          "channelId": "C097VAKKPUP",
          "initialComment": "📄 The Sales Season Plan is ready!  Please find the generated PDF file attached for review and next steps.  "
        },
        "resource": "file",
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "id": "4JSKt9sIRV1KGswQ",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "ad6e678d-000f-47cb-882b-0c7aca453800",
      "name": "转换为PDF",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1648,
        -16
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {
          "googleFileConversion": {
            "conversion": {
              "docsToFormat": "application/pdf"
            }
          }
        },
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "fC471es5gk5Mm900",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "2dd2914f-68e5-4a84-a952-0fca32a2b3e4",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        -992
      ],
      "parameters": {
        "width": 1072,
        "height": 2032,
        "content": "# 多智能体架构免费入门模板"
      },
      "typeVersion": 1
    },
    {
      "id": "e6e8f2b1-be21-4ba4-99a6-69348a05bfbf",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -288
      ],
      "parameters": {
        "width": 272,
        "height": 208,
        "content": "### 1) 开始运行(手动触发器)"
      },
      "typeVersion": 1
    },
    {
      "id": "e13b861b-764d-44d0-834a-84151c860a21",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -272,
        144
      ],
      "parameters": {
        "width": 272,
        "height": 304,
        "content": "### 2) 收集简报(编辑字段)"
      },
      "typeVersion": 1
    },
    {
      "id": "1179b80c-e42a-4605-96b8-88e86ca221e2",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -352
      ],
      "parameters": {
        "width": 512,
        "height": 288,
        "content": "### 3) 像CEO一样协调(CEO智能体)"
      },
      "typeVersion": 1
    },
    {
      "id": "43d1f02b-8e90-46a4-abb5-88c861a3be74",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        560
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 336,
        "content": "### 4) 调用工具#1:营销部门"
      },
      "typeVersion": 1
    },
    {
      "id": "254915c0-cf61-4014-adaf-51300797f217",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        560
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 336,
        "content": "### 5) 调用工具#2:运营部门"
      },
      "typeVersion": 1
    },
    {
      "id": "d4947eba-5a53-4593-941a-b864911b6761",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        560
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 336,
        "content": "### 6) 调用工具#3:财务部门"
      },
      "typeVersion": 1
    },
    {
      "id": "c545990f-2d67-4fdb-888c-733da6043c2e",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -352
      ],
      "parameters": {
        "width": 448,
        "height": 272,
        "content": "### 7) 合并和协调(在CEO智能体内)"
      },
      "typeVersion": 1
    },
    {
      "id": "3cb78770-a21f-488f-b256-c0d78d9316bc",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        -464
      ],
      "parameters": {
        "width": 672,
        "height": 400,
        "content": "#### 设置文档元数据(配置元数据)"
      },
      "typeVersion": 1
    },
    {
      "id": "8d9d8432-6295-461b-ae94-709fdd59950e",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        -96
      ],
      "parameters": {
        "width": 688,
        "height": 240,
        "content": "### 11) Share the artifact (Upload a file)\n**Node:** *Slack: upload file* (or Drive/Email)  \n**Message (example):**\n```\n📄 Sales Season Plan is ready\nCompany: {{ $json.plan_json.company }}\nWindow: {{ $json.plan_json.window.start }} → {{ $json.plan_json.window.end }}\nThe PDF is attached. Please review and add comments.\n```\n**Learning:** Always include context (company/window) in the post."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "abf7f2d5-968e-4883-a52e-c0abefbb3da4",
  "connections": {
    "CEO Agent": {
      "main": [
        [
          {
            "node": "Configure metadata ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "CEO Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Finance Agent": {
      "ai_tool": [
        [
          {
            "node": "CEO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Upload a file": {
      "main": [
        []
      ]
    },
    "Convert to PDF": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Marketing Agent": {
      "ai_tool": [
        [
          {
            "node": "CEO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Operations Agent": {
      "ai_tool": [
        [
          {
            "node": "CEO Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "CEO Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Marketing Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Operations Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Finance Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Configure metadata ": {
      "main": [
        [
          {
            "node": "Create document file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create document file": {
      "main": [
        [
          {
            "node": "Convert to PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 文档提取, 多模态 AI

需要付费吗?

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

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

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

作者
Trung Tran

Trung Tran

@trungtran

Empowering small and medium businesses with smart automation and practical AI, no big tech team required.

外部链接
在 n8n.io 查看

分享此工作流