8
n8n 中文网amn8n.com

使用 Claude 3.5、Slack 和 Tavily 搜索生成数据管道蓝图

高级

这是一个Engineering, Multimodal AI领域的自动化工作流,包含 16 个节点。主要使用 Set, Slack, SlackTrigger, Agent, LmChatAnthropic 等节点。 使用 Claude 3.5、Slack 和 Tavily 搜索生成数据管道蓝图

前置要求
  • Slack Bot Token 或 Webhook URL
  • Anthropic API Key
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "lLSGdfDV5YquV47C",
  "meta": {
    "instanceId": "b78775038dd0551b144b274015d3475f3d849cef508e40745901d6f4436e7d88",
    "templateCredsSetupCompleted": true
  },
  "name": "ArchitectureAgent",
  "tags": [],
  "nodes": [
    {
      "id": "6951e1cc-2e93-4ba9-924b-547ca5e68d35",
      "name": "Tavily",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        128,
        416
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "method": "POST",
        "jsonBody": "{\n    \"api_key\": \"<API-KEY>\",\n    \"query\": \"{searchTerm}\",\n    \"search_depth\": \"basic\",\n    \"include_answer\": true,\n    \"topic\": \"news\",\n    \"include_raw_content\": true,\n    \"max_results\": 3\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "toolDescription": "Use this tool to search the internet",
        "placeholderDefinitions": {
          "values": [
            {
              "name": "searchTerm",
              "type": "string",
              "description": "What the user has requested to write a blog about"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "2215c979-d0bb-43ab-874d-2bb414c7a9e0",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -160,
        368
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "76cff1a1-5a63-49ed-a005-defea8475045",
      "name": "Response",
      "type": "n8n-nodes-base.set",
      "position": [
        448,
        48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "14d9076e-27ea-4846-8b44-f83cf4022b9e",
              "name": "response",
              "type": "string",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d6b63763-d1ce-4585-a603-77610dad8ec0",
      "name": "Try Again",
      "type": "n8n-nodes-base.set",
      "position": [
        448,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f2a8ff2d-6b59-4ad6-a2e7-8705354f4105",
              "name": "response",
              "type": "string",
              "value": "Error occurred. Please try again."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "036b34fd-4998-411d-bd9f-b1aaf6f89fad",
      "name": "Architect Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueErrorOutput",
      "position": [
        16,
        128
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {
          "systemMessage": "=You are a senior software architect. Your job is to design software solutions based on user requests. Provide a clear, concise technical design that outlines what the program should do, what components are needed, and how it should be structured. Assume the reader is an experienced developer."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "67fde122-b02c-4f03-82c5-e985b5c4d360",
      "name": "Slack Trigger",
      "type": "n8n-nodes-base.slackTrigger",
      "position": [
        -272,
        128
      ],
      "webhookId": "c31b498b-4773-48a8-95c3-cc045c5f8db1",
      "parameters": {
        "options": {},
        "trigger": [
          "message"
        ],
        "watchWorkspace": true
      },
      "typeVersion": 1
    },
    {
      "id": "d3de555d-d1b9-48a1-b0d1-8e5472345c0e",
      "name": "Send a message",
      "type": "n8n-nodes-base.slack",
      "position": [
        672,
        48
      ],
      "webhookId": "33789ebc-eb82-43f8-9582-475d900511ce",
      "parameters": {
        "text": "={{ $json.response }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C094L9A4B4J",
          "cachedResultName": "ai-agent"
        },
        "otherOptions": {}
      },
      "typeVersion": 2.3
    },
    {
      "id": "51c63a7d-3fc1-4c9a-a19f-d785662af0ed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        128
      ],
      "parameters": {
        "color": 6,
        "width": 264,
        "height": 140,
        "content": "## Message in Slack Channel\nThe node listens for new messages in a Slack Channel.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0fc05b79-9681-4b5f-84f1-d7d8c6927b37",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        528
      ],
      "parameters": {
        "color": 6,
        "width": 304,
        "height": 152,
        "content": "## Claude 3.5 LLM model\nInteracts with Anthropic’s Claude 3.5 language models.\n\nMonetary Credits are needed for Claude 3.5. \n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f082fcdd-1d2e-43c7-86f7-0ddd7d97f195",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        448
      ],
      "parameters": {
        "color": 6,
        "height": 216,
        "content": "## Internet searches using Tavily\nEnables automated, real-time web searches to find best practices, patterns, and emerging trends in software architectures.\nRequires a valid Tavily API key for access."
      },
      "typeVersion": 1
    },
    {
      "id": "15870461-730b-4d0d-b0a1-ae7a8727cf34",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -160
      ],
      "parameters": {
        "color": 6,
        "width": 500,
        "height": 260,
        "content": "## Architecture Agent\n### Role\nThis agent acts as a Senior Software Architect, specializing in the design of software systems based on user-provided requirements. It interprets high-level functional needs and converts them into robust, scalable, and maintainable software architecture blueprints.\n\n### Primary Function\nTo deliver clear, concise technical designs for software projects, suitable for handoff to experienced developers."
      },
      "typeVersion": 1
    },
    {
      "id": "f09a107f-94e2-4f56-94c9-214accdabdf6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -2000
      ],
      "parameters": {
        "color": 5,
        "width": 1820,
        "height": 480,
        "content": "## Generate Data Pipeline Blueprints with Claude 3.5, Slack, and Tavily Search\n\n### Overview\nThe Architect Agent listens to Slack messages and generates full data architecture blueprints in response. Powered by Claude 3.5 (Anthropic) for reasoning and design, and Tavily for real-time web search, this agent creates production-ready data pipeline scaffolds on-demand — transforming natural language prompts into structured data engineering solutions.\n\n### Capabilities\n- Understands and interprets user requests from Slack\n- Designs end-to-end data pipelines architectures using industry best practices.\n\nOutputs include:\n- High-level architecture diagrams\n\n### Required Connections\nSlack, Anthropic, Tavily\n\n### Example input:\n\"Create a data pipeline orchestrated by Airflow, running on a Docker image. It should connect to a MySQL database, load in the data into a PostgreSQL DB (incremental load) and then transform the data into business-oriented tables also in the PostgreSQL database. Create an example setup with raw sales data.\"\n"
      },
      "typeVersion": 1
    },
    {
      "id": "cff09e44-ea99-4ffd-9a72-3a5b88979a66",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -1520
      ],
      "parameters": {
        "color": 3,
        "width": 608,
        "height": 1280,
        "content": "## Configuring the Slack API Acces\n### Step 1: Create a Slack App\n1. Go to https://api.slack.com/apps\n2. Click Create New App\n3. Select From scratch\n4. Give your app a name (e.g., n8n Slack Integration)\n5. Choose your workspace and click Create App\n\n### Step 2: Enable Event Subscriptions\n1. In your Slack app’s settings, go to Event Subscriptions\n2. Toggle Enable Events to On\n3. In the Request URL field, enter the webhook URL for your Slack Trigger node:\n4. In n8n, open your Slack Trigger node → copy the Webhook URL\n5. Slack will verify this URL — your n8n workflow must be active for verification to succeed\n6. Under Subscribe to Bot Events, click Add Bot User Event and add:\n    - message.channels (for public channel messages)\n    - message.groups (for private channels, if needed)\n7. Click Save Changes\n\n### Step 3: Set Bot Token Scopes\n1. Go to OAuth & Permissions in your Slack app settings\n2. Under Bot Token Scopes, add:\n    - channels:history\n    - channels:read\n    - groups:history (if you need private channels)\n    - groups:read\n    - chat:write (if you want to send messages back)\n3. Click Save Changes\n\n### Step 4: Install the App to Your Workspace\n1. In the Slack app settings, go to Install App\n2. Click Install to Workspace\n3. Approve the requested permissions\n4. Copy the Bot User OAuth Token (starts with xoxb-) — you’ll use this in n8n\n\n### Step 5: Configure Slack Credentials in n8n\n1. Open your n8n instance\n2. Go to Settings → Credentials\n3. Create new Slack API credentials:\n    - Name: e.g., Slack Bot Access\n    - Access Token: Paste the Bot User OAuth Token from Step 4\n4. Save the credentials\n\n### Step 6: Connect the Credentials to the Slack Trigger Node\n1. Open your existing Slack Trigger node\n2. Under Credentials, select the Slack credentials you just created\n3. Make sure Event Type matches what you subscribed to (message events)\n4. Save the node configuration\n\n### Step 7: Activate and Test\n1. Activate your n8n workflow\n2. In Slack, post a message in the configured channel\n3. Check n8n’s execution logs — you should see the workflow triggered"
      },
      "typeVersion": 1
    },
    {
      "id": "aad1c339-ff79-4306-ac58-0b8e45b9fbf6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 1824,
        "height": 1024,
        "content": "## Workflow\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fe73ea06-6c2b-4abb-82ef-40f5f60dc290",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -1520
      ],
      "parameters": {
        "color": 3,
        "width": 608,
        "height": 1280,
        "content": "## Configuring the Anthropic Claude 3.5 API Access\n### Step 1: Get Your Anthropic API Key\n1. Go to the Anthropic console: https://console.anthropic.com/\n2. Sign in or create an account\n3. In the dashboard, go to API Keys\n4. Click Create Key\n5. Give the key a name (e.g., n8n Claude Access)\n6. Copy the generated API key — it will look like: sk-ant-xxxxxxxxxxxxxxxxxxxxxxxx\n7. Store it securely — you will need it in n8n\n\n### Step 2: Open Your Existing Anthropic Node in n8n\n1. In n8n, open the workflow that contains the Anthropic node\n2. Click the Anthropic node to view its settings\n\n### Step 3: Assign Anthropic Credentials\n1. In the node settings, locate the Credentials field\n2. If no credentials are assigned:\n    - Click Select Credential → Create New\n    - Name: e.g., Claude 3.5 Access\n    - API Key: Paste the key from Step 1\n3. Save the credentials\n\n### Step 4: Verify Node Configuration\n1. Make sure the Model is set to claude-3-5-sonnet (or whichever Claude 3.5 variant you want)\n2. Ensure the Prompt or Messages field contains valid input:\n    - Static test text for verification\n    - Or dynamic expressions from previous nodes\n\n### Step 5: Test the Node\n1. If this node depends on prior nodes (e.g., Slack Trigger, Telegram Trigger), run those first\n2. Click Execute Node on the Anthropic node\n3. Check the output panel for a text completion or chat response"
      },
      "typeVersion": 1
    },
    {
      "id": "eb223292-ddd5-4605-b1c2-fecb19196eb0",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -1520
      ],
      "parameters": {
        "color": 3,
        "width": 608,
        "height": 1280,
        "content": "## Configuring the Tavily API Access\n### Step 1: Get Your Tavily API Key\n1. Go to the Tavily website: https://tavily.com/\n*(or directly to the developer portal if you have the link from Tavily’s docs)*\n2. Sign in or create a free account\n3. Navigate to the API Keys or Developer Settings section\n4. Click Create API Key\n5. Copy the generated key — it will look something like: tavily-xxxxxxxxxxxxxxxxxxxxxxxx\n6. Store this key securely — you will use it in n8n\n\n### Step 2: Open the Existing Tavily Node in n8n\n1. In n8n, open the workflow containing the Tavily node\n2. Click on the Tavily node to view its settings\n\n### Step 3: Assign Tavily Credentials\n1. In the node settings, locate the Credentials section\n2. If no credentials are selected:\n    - Click Select Credential → Create New\n    - Name: Give the credentials a label (e.g., Tavily Search Access)\n    - API Key: Paste the key from Step 1\n3. Click Save\n\n### Step 4: Configure the Tavily Node\n1. In the Operation field, select what you want Tavily to do (e.g., Search)\n2. In the Query field:\n    - Enter a static test search term (for testing)\n    - Or use an expression to pass dynamic input from previous nodes\n3. Adjust optional parameters (e.g., search depth, filters) based on your needs\n\n### Step 5: Test the Node\n1. If your node depends on prior input, run those first\n2. Click Execute Node in n8n\n3. Review the output to confirm Tavily returned relevant search results\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "27c1ec40-0670-4373-8d08-ff7bde8eccd2",
  "connections": {
    "6951e1cc-2e93-4ba9-924b-547ca5e68d35": {
      "ai_tool": [
        [
          {
            "node": "036b34fd-4998-411d-bd9f-b1aaf6f89fad",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "76cff1a1-5a63-49ed-a005-defea8475045": {
      "main": [
        [
          {
            "node": "d3de555d-d1b9-48a1-b0d1-8e5472345c0e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "67fde122-b02c-4f03-82c5-e985b5c4d360": {
      "main": [
        [
          {
            "node": "036b34fd-4998-411d-bd9f-b1aaf6f89fad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "036b34fd-4998-411d-bd9f-b1aaf6f89fad": {
      "main": [
        [
          {
            "node": "76cff1a1-5a63-49ed-a005-defea8475045",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "d6b63763-d1ce-4585-a603-77610dad8ec0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2215c979-d0bb-43ab-874d-2bb414c7a9e0": {
      "ai_languageModel": [
        [
          {
            "node": "036b34fd-4998-411d-bd9f-b1aaf6f89fad",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 工程, 多模态 AI

需要付费吗?

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

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

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

作者
Humble Turtle

Humble Turtle

@humbleturtle

Elegant AI agents that quietly do the work for you

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34