8
n8n 中文网amn8n.com

为特定关键词总结新闻文章并发布到 Slack

中级

这是一个自动化工作流,包含 12 个节点。主要使用 Set, Slack, HackerNews, Agent, ScheduleTrigger 等节点。 使用 OpenRouter 从 Hacker News 生成 AI 摘要并发送到 Slack

前置要求
  • Slack Bot Token 或 Webhook URL

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "HLup1R1WiyVLVn5s",
  "meta": {
    "instanceId": "7036f994fcf077f382ea0edc134b49e1ce0556fa914b12051651961e7fbc3600"
  },
  "name": "为特定关键词总结新闻文章并发布到 Slack",
  "tags": [
    {
      "id": "PDXCRJntY9S84S1b",
      "name": "News",
      "createdAt": "2025-10-16T10:59:57.579Z",
      "updatedAt": "2025-10-16T10:59:57.579Z"
    },
    {
      "id": "OhBk3bnGEbNlHLVm",
      "name": "AI",
      "createdAt": "2025-10-16T10:59:57.640Z",
      "updatedAt": "2025-10-16T10:59:57.640Z"
    },
    {
      "id": "K2HrF2UlgnMFO8mJ",
      "name": "Slack",
      "createdAt": "2025-10-16T10:59:57.618Z",
      "updatedAt": "2025-10-16T10:59:57.618Z"
    },
    {
      "id": "cL27z0iZWgjKzz3B",
      "name": "Automation",
      "createdAt": "2025-10-16T10:59:57.660Z",
      "updatedAt": "2025-10-16T10:59:57.660Z"
    }
  ],
  "nodes": [
    {
      "id": "9fe57470-dc45-4e2c-9777-27d9b7bf0db5",
      "name": "每日上午 9 点触发",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c97876de-b1f6-4b7c-a4af-506bd01c5936",
      "name": "发送摘要到 Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1248,
        0
      ],
      "webhookId": "12acd924-f67f-4f60-902b-c627eea29b2c",
      "parameters": {
        "text": "={{ $('Format Message for Slack').item.json.slackMessage }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09L12N8F45",
          "cachedResultName": "test"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2
    },
    {
      "id": "31b5c5b7-4f78-4d5a-98fd-ea125f7ee365",
      "name": "为 Slack 格式化消息",
      "type": "n8n-nodes-base.set",
      "position": [
        1024,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e9b2a1c3-4d5e-4f6a-8b7c-9d8e1a2b3c4d",
              "name": "slackMessage",
              "type": "string",
              "value": "={{ `*${$json.title}*\\n\\n*AI Summary:*\\n${$json.output}` }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e527a3f7-5adf-4a71-a59b-afce5aaf3ba9",
      "name": "使用 AI 总结文章",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        672,
        0
      ],
      "parameters": {
        "text": "={{ $('Get many items').item.json.url }}",
        "options": {
          "systemMessage": "You are a highly skilled news summarization AI. Your task is to analyze the provided news article snippet and create a concise, easy-to-understand summary. The summary must be in Japanese, presented as 3 bullet points. Focus on the key information and maintain a neutral, professional tone. Do not add any introductory phrases.",
          "passthroughBinaryImages": true
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "1f106c8c-0e3d-4baf-aba5-d19c0f37926a",
      "name": "OpenRouter聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        672,
        224
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "3cd48b0f-cfdc-47bc-8b80-7df2922792a1",
      "name": "获取多个项目",
      "type": "n8n-nodes-base.hackerNews",
      "position": [
        448,
        0
      ],
      "parameters": {
        "limit": "={{ 3 }}",
        "resource": "all",
        "additionalFields": {
          "keyword": "={{ $json.keywords[0] }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "db0d771c-eaf5-4845-8168-50b02d3fc1bc",
      "name": "配置您的设置",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        0
      ],
      "parameters": {
        "options": {
          "dotNotation": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "f1a2b3c4-d5e6-4f7a-8b9c-0d1e2f3a4b5c",
              "name": "keywords",
              "type": "json",
              "value": "={{ ['AI'] }}"
            },
            {
              "id": "a2b3c4d5-e6f7-4a8b-9c0d-1e2f3a4b5c6d",
              "name": "slack_channel",
              "type": "string",
              "value": "news-updates"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "65bf5c33-71d4-481f-9cef-d55ad33e46ba",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -128
      ],
      "parameters": {
        "height": 384,
        "content": "## 为特定关键词总结新闻文章并发布到 Slack"
      },
      "typeVersion": 1
    },
    {
      "id": "efe5b1d7-de72-4783-b111-52f4d900941a",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        -256
      ],
      "parameters": {
        "color": 7,
        "height": 224,
        "content": "## 设置您的日程安排"
      },
      "typeVersion": 1
    },
    {
      "id": "1f8a5f0c-20e3-4fe1-aa90-98d0ed90758a",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        208
      ],
      "parameters": {
        "color": 7,
        "height": 352,
        "content": "## 配置关键词和 Slack 频道"
      },
      "typeVersion": 1
    },
    {
      "id": "a51a48bd-9788-4204-8c67-d5e4acbab4da",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 256,
        "content": "## 连接您的 AI 模型"
      },
      "typeVersion": 1
    },
    {
      "id": "351403d1-7240-41da-bb60-0b3f2bc348c6",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -208
      ],
      "parameters": {
        "color": 7,
        "content": "## 连接 Slack"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "639bdd62-3525-472c-9458-7897f99033cf",
  "connections": {
    "Get many items": {
      "main": [
        [
          {
            "node": "Summarize Article with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize Article with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Daily at 9 AM": {
      "main": [
        [
          {
            "node": "Configure Your Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Your Settings": {
      "main": [
        [
          {
            "node": "Get many items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Message for Slack": {
      "main": [
        [
          {
            "node": "Send Summary to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Article with AI": {
      "main": [
        [
          {
            "node": "Format Message for Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级

需要付费吗?

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

工作流信息
难度等级
中级
节点数量12
分类-
节点类型7
难度说明

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

外部链接
在 n8n.io 查看

分享此工作流