8
n8n 中文网amn8n.com

使用 AI 汇总来自多家报纸的每日科技新闻

中级

这是一个Personal Productivity, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 If, Set, Html, EmailSend, HttpRequest 等节点。 每日科技新闻摘要:Google 新闻经 Llama AI 汇总并通过邮件投递

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "EJkg3fmJep0B94zU",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 AI 汇总来自多家报纸的每日科技新闻",
  "tags": [],
  "nodes": [
    {
      "id": "9ce6590f-db9d-4981-9445-6426690c9d3b",
      "name": "计划每日科技新闻触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -900,
        1310
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f97e0ede-5341-4d52-a360-b49d6741e828",
      "name": "获取 Google 科技新闻",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Fetches tech news from Google News India",
      "position": [
        -680,
        1310
      ],
      "parameters": {
        "url": "https://news.google.com/search?q=tech%20news&hl=en-IN&gl=IN&ceid=IN%3Aen",
        "options": {
          "timeout": 15000
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "501e3abb-e82c-4fb1-84aa-458ca3a6d09e",
      "name": "提取科技新闻文章",
      "type": "n8n-nodes-base.html",
      "notes": "Updated selectors for Google News structure - extracts titles, sources, times and full content",
      "position": [
        -460,
        1310
      ],
      "parameters": {
        "options": {
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Article Titles",
              "cssSelector": "article h3 a, article h4 a, .JtKRv",
              "returnArray": true
            },
            {
              "key": "Article Links",
              "cssSelector": "article h3 a, article h4 a, .JtKRv",
              "returnArray": true
            },
            {
              "key": "Article Sources",
              "cssSelector": "article .wEwyrc, .vr1PYe, .CEMjEf",
              "returnArray": true
            },
            {
              "key": "Publication Times",
              "cssSelector": "article time, .WW6dff, .hvbAAd",
              "returnArray": true
            },
            {
              "key": "Article Snippets",
              "cssSelector": "article .GI74Re, .St8ea, .y3G2Ed",
              "returnArray": true
            },
            {
              "key": "All Articles",
              "cssSelector": "article",
              "returnArray": true
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "15702e6e-5ee9-470a-ac3f-5c8604e97ced",
      "name": "格式化科技新闻数据",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        1310
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5412a5ee-dbbe-4fcc-98a5-6fafc37b94d1",
              "name": "Formatted_Tech_News",
              "type": "string",
              "value": "=DAILY TECH NEWS SUMMARY - {{ new Date().toLocaleDateString('en-IN') }}\n========================================================\n\nSource: Google News - Tech Category (India)\nExtracted at: {{ new Date().toLocaleTimeString('en-IN') }}\n\n📰 HEADLINES EXTRACTED:\n{{ $json['Article Titles'] && Array.isArray($json['Article Titles']) ? $json['Article Titles'].slice(0, 15).map((title, i) => `${i+1}. ${title}`).join('\\n') : 'No titles found' }}\n\n⏰ PUBLICATION TIMES:\n{{ $json['Publication Times'] && Array.isArray($json['Publication Times']) ? $json['Publication Times'].slice(0, 10).join(' | ') : 'No times found' }}\n\n📄 ARTICLE CONTENT FOR AI ANALYSIS:\n{{ $json['All Articles'] && Array.isArray($json['All Articles']) ? $json['All Articles'].slice(0, 8).join('\\n\\n=== NEXT ARTICLE ===\\n\\n') : 'No article content found' }}\n\n📊 EXTRACTION SUMMARY:\nTitles found: {{ $json['Article Titles'] ? $json['Article Titles'].length : 0 }}\nSources found: {{ $json['Article Sources'] ? $json['Article Sources'].length : 0 }}\nTimes found: {{ $json['Publication Times'] ? $json['Publication Times'].length : 0 }}"
            },
            {
              "id": "news_count",
              "name": "Article_Count",
              "type": "number",
              "value": "={{ $json['Article Titles'].length }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "be8b1b53-26b7-4713-bbce-f59a7a13e940",
      "name": "AI 科技新闻分析器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        200,
        1060
      ],
      "parameters": {
        "text": "=Analyze and summarize today's tech news:\n\n{{ $json['Formatted_Tech_News'] }}",
        "options": {
          "systemMessage": "You are a tech industry analyst and news curator. Your role is to analyze the latest technology news and provide a comprehensive yet concise daily summary for tech professionals, entrepreneurs, and enthusiasts.\n\nYour summary should include:\n\n1. **KEY TECH TRENDS** - Identify 2-3 major themes or trends from today's news\n2. **MAJOR ANNOUNCEMENTS** - Highlight significant product launches, acquisitions, or company news\n3. **INDUSTRY IMPACT** - Brief analysis of how these developments might affect the tech ecosystem\n4. **EMERGING TECHNOLOGIES** - Note any mentions of AI, blockchain, cloud computing, cybersecurity, or other cutting-edge tech\n5. **MARKET MOVEMENTS** - Any notable stock movements or funding announcements in tech sector\n6. **OUTLOOK** - Brief prediction or what to watch for tomorrow/this week\n\nKeep the tone professional yet accessible. Focus on actionable insights for tech professionals. Limit the summary to 300-400 words maximum.\n\nFormat your response with clear sections using markdown headers."
        },
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "5ea649f0-f389-450b-b128-26add07ff485",
      "name": "发送科技新闻邮件",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        576,
        1160
      ],
      "webhookId": "5ca3faf6-d857-4d58-8676-90e392fa9cc2",
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {},
        "subject": "🚀 Daily Tech News Summary - {{ new Date().toLocaleDateString('en-IN') }}",
        "toEmail": "recipient@gmail.com",
        "fromEmail": "your-email@gmail.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "1941552b-cf75-4b69-bbcc-dfe8978224c9",
      "name": "LLM - 科技新闻模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        288,
        1280
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {
          "temperature": 0.3
        }
      },
      "credentials": {
        "ollamaApi": {
          "id": "h9CEBFmYALm3FvZf",
          "name": "Ollama account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "163f6f7a-e18e-4798-a30d-ae2dda2f2ebb",
      "name": "工作流信息",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        780
      ],
      "parameters": {
        "color": 5,
        "width": 420,
        "height": 380,
        "content": "🚀 **每日科技新闻自动化**"
      },
      "typeVersion": 1
    },
    {
      "id": "98d88b46-aa1d-4d41-931a-c5c280b15844",
      "name": "检查是否找到新闻",
      "type": "n8n-nodes-base.if",
      "position": [
        -20,
        1310
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "condition_1",
              "operator": {
                "type": "number",
                "operation": "gte",
                "rightType": "number"
              },
              "leftValue": "={{ $json['Article_Count'] }}",
              "rightValue": 1
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7b956366-8c47-4538-adce-9d9916f7a121",
      "name": "发送错误警报",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        278,
        1460
      ],
      "webhookId": "ef03f3c0-044d-48f0-b289-f46bf6dbfe6e",
      "parameters": {
        "text": "The daily tech news workflow ran but found no articles to process.\n\nThis could be due to:\n- Changes in Google News website structure\n- Network connectivity issues\n- CSS selector updates needed\n\nPlease check the workflow configuration.\n\nTime: {{ new Date().toLocaleString('en-IN') }}",
        "options": {},
        "subject": "⚠️ Tech News Workflow Alert - No Articles Found",
        "toEmail": "recipient@gmail.com",
        "fromEmail": "your-email@gmail.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "id": "G1kyF8cSWTZ4vouN",
          "name": "SMTP -test"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "38bf1c7a-6241-4fbf-8002-3870e1654869",
  "connections": {
    "Check if News Found": {
      "main": [
        [
          {
            "node": "AI Tech News Analyzer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Tech News Analyzer": {
      "main": [
        [
          {
            "node": "Send Tech News Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Tech News Data": {
      "main": [
        [
          {
            "node": "Check if News Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM - Tech News Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Tech News Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Google Tech News": {
      "main": [
        [
          {
            "node": "Extract Tech News Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Tech News Articles": {
      "main": [
        [
          {
            "node": "Format Tech News Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Daily Tech News Trigger": {
      "main": [
        [
          {
            "node": "Fetch Google Tech News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Oneclick AI Squad

Oneclick AI Squad

@oneclick-ai

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.

外部链接
在 n8n.io 查看

分享此工作流