8
n8n 中文网amn8n.com

每日安全新闻

高级

这是一个Personal Productivity, Multimodal AI领域的自动化工作流,包含 19 个节点。主要使用 If, Code, Gmail, Limit, Merge 等节点。 每日技术与网络安全简报:RSS、OpenAI GPT-4o 和 Gmail

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "w2WtfGSXajdHe739",
  "meta": {
    "instanceId": "146ab8f1ce0cef4bd9c6b91db262ad7cd77638e200455d5838ba053a27e415bc",
    "templateCredsSetupCompleted": true
  },
  "name": "每日安全新闻",
  "tags": [],
  "nodes": [
    {
      "id": "45ad3107-8415-4aef-9f48-488d349e6b81",
      "name": "Bleeping Computer",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        0
      ],
      "parameters": {
        "url": "https://www.bleepingcomputer.com/feed/",
        "options": {
          "ignoreSSL": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "667f2d98-f124-4369-adaa-e0ec275c3a03",
      "name": "CISA GOV",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        192
      ],
      "parameters": {
        "url": "https://www.cisa.gov/cybersecurity-advisories/all.xml",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "afe2a490-54cb-4392-84b9-40ab342003b7",
      "name": "Feedburner",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        576
      ],
      "parameters": {
        "url": "https://feeds.feedburner.com/securityweek",
        "options": {
          "ignoreSSL": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "536c49f7-fc45-4a06-b187-10abaa12e689",
      "name": "Ars Technica",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        768
      ],
      "parameters": {
        "url": "https://arstechnica.com/security/feed/",
        "options": {
          "ignoreSSL": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "75f95f11-346c-4848-93b3-eae5989fe37e",
      "name": "Techcrunch",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        960
      ],
      "parameters": {
        "url": "https://techcrunch.com/category/security/feed/",
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "7a389f55-3f00-4b5a-8f03-72b6ef243338",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        80,
        416
      ],
      "parameters": {
        "numberInputs": 6
      },
      "typeVersion": 3.2
    },
    {
      "id": "3589c7b5-7233-4594-ae52-f052f9f18a2c",
      "name": "hnrss",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        -144,
        384
      ],
      "parameters": {
        "url": "https://hnrss.org/frontpage?points=150",
        "options": {
          "ignoreSSL": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f25dba96-2902-421e-98b2-e2b78fc7cdc0",
      "name": "移除重复项",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        304,
        480
      ],
      "parameters": {
        "compare": "selectedFields",
        "options": {},
        "fieldsToCompare": "link"
      },
      "typeVersion": 2
    },
    {
      "id": "d4ca3559-91e2-4cba-b54d-40daa5948a2f",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        528,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1a6ca407-e101-4c3d-842a-38d71b2e2bcf",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ new Date($json.isoDate || $json.pubDate || $json.date || 0) > new Date(Date.now() - 24*60*60*1000) }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e0088947-6cc5-4695-8b91-f20cd1c76827",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        752,
        384
      ],
      "parameters": {
        "keep": "=",
        "maxItems": 25
      },
      "typeVersion": 1
    },
    {
      "id": "90017426-e506-4102-9804-383b3a733f82",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1776,
        384
      ],
      "webhookId": "086722fa-c6d4-447f-b4d4-def7feeed704",
      "parameters": {
        "sendTo": "test@gmail.com",
        "message": "={{ $json.html || '<p>(empty)</p>' }}",
        "options": {},
        "subject": "={{ $json.subject || 'Daily Cyber & Tech Brief' }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "08JLRuwZ9PDSXSVk",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e93cb3a3-228a-4afe-8a2c-9ade67d1eef6",
      "name": "向模型发送消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1200,
        384
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "maxTokens": 1600
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a security editor writing a crisp daily brief for a VP of Cybersecurity.\nGroup stories into: Vulnerabilities, Breaches/Ransomware, Cloud/SaaS, Policy/Regulation, Startups/Funding, Research.\nFor each story: 1–2 sentence summary + one “Why it matters”.\nExtract CVEs/vendors if present. Be concise, no hype.\nOutput STRICT JSON with keys: subject, html, text. Do not include code fences.\n"
            },
            {
              "content": "=Today's items (JSON array):\n{{ JSON.stringify($json.stories) }}\n"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "fYx3byxTFkzmN222",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "57c7251c-6071-480c-b334-8430f48e63ff",
      "name": "代码1",
      "type": "n8n-nodes-base.code",
      "position": [
        976,
        384
      ],
      "parameters": {
        "jsCode": "// code by ca7ai\nconst cutoff = Date.now() - 24*60*60*1000; // optional if you want another guard\n\nconst stories = $input.all().map(i => {\n  const j = i.json;\n  const link = j.link || '';\n  let host = 'unknown';\n  try { host = link ? new URL(link).hostname : 'unknown'; } catch(e) {}\n\n  return {\n    source: j.source || j.feed || host,\n    title: j.title || '',\n    link,\n    published: j.isoDate || j.pubDate || j.date || null,\n    snippet: j.contentSnippet || j.description || '',\n  };\n});\n\n// output ONE item that contains all stories\nreturn [{ json: { stories } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "059da84b-51ff-4536-b51a-a2b8936b4df8",
      "name": "代码2",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        384
      ],
      "parameters": {
        "jsCode": "// code by ca7ai\nlet c = $json?.message?.content ?? '';\nif (typeof c !== 'string') c = String(c || '');\n\n// remove ```json ... ``` fences if present\nc = c.replace(/^```(?:json)?\\s*/i, '').replace(/\\s*```$/,'');\nlet out;\ntry {\n  out = JSON.parse(c);\n} catch (e) {\n  // fallback: send raw content so you still get an email\n  out = {\n    subject: 'Daily Cyber & Tech Brief (parse issue)',\n    html: `<pre>${c.replace(/[<>&]/g, s => ({'<':'&lt;','>':'&gt;','&':'&amp;'}[s]))}</pre>`,\n    text: c\n  };\n}\nreturn [{ json: out }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "876fe1bc-5070-46d3-8a46-60c919e07dd6",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -368,
        480
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f47577dd-d5b6-466e-af97-6f8e90fcb1f4",
      "name": "无新项目",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        576
      ],
      "parameters": {
        "jsCode": "// code by ca7ai\nif (items.length === 0) {\n  return [{\n    json: {\n      empty: true,\n      subject: `Daily Cyber & Tech Brief — No major updates`,\n      html: `<p>No notable headlines in the last 24h from your sources.</p>`,\n      text: `No notable headlines in the last 24h.`\n    }\n  }];\n}\nreturn items;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "fbd4700b-0df1-458f-acea-c98e7b29f034",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        272
      ],
      "parameters": {
        "width": 256,
        "height": 128,
        "content": "**编辑订阅源** --- 打开每个 RSS 节点并粘贴您偏好的免费来源(CISA、BleepingComputer 等)。"
      },
      "typeVersion": 1
    },
    {
      "id": "ef324391-f58e-4776-b7ca-79437008700e",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        464
      ],
      "parameters": {
        "color": 4,
        "width": 256,
        "height": 144,
        "content": "**定时计划** --- 设置您希望接收每日简报的 Cron 时间/时区。"
      },
      "typeVersion": 1
    },
    {
      "id": "7f7734d7-cd35-4983-b272-5634f8bf4c08",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        656
      ],
      "parameters": {
        "color": 6,
        "width": 256,
        "content": "**投递设置** --- 更新 Gmail 的\"收件人\"地址并选择轻量级 OpenAI 模型;可添加二次去重以避免重复链接。"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "602ef71a-929b-44f0-80af-e110a6ab43fe",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No New Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "hnrss": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "CISA GOV": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Feedburner": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Techcrunch": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 5
          }
        ]
      ]
    },
    "Ars Technica": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Bleeping Computer",
            "type": "main",
            "index": 0
          },
          {
            "node": "CISA GOV",
            "type": "main",
            "index": 0
          },
          {
            "node": "hnrss",
            "type": "main",
            "index": 0
          },
          {
            "node": "Feedburner",
            "type": "main",
            "index": 0
          },
          {
            "node": "Ars Technica",
            "type": "main",
            "index": 0
          },
          {
            "node": "Techcrunch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bleeping Computer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Duplicates": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 个人效率, 多模态 AI

需要付费吗?

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

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

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

作者
Calistus Christian

Calistus Christian

@ca7ai

Automation strategist and AI workflow architect creating intelligent, agent-driven processes that streamline operations. I build advanced n8n solutions integrating AI, cloud services, and real-time data orchestration for scalable impact. Explore my free workflows to get started. Premium, custom-built solutions are also available. Connect with me on LinkedIn for tailored automation expertise.

外部链接
在 n8n.io 查看

分享此工作流