8
n8n 中文网amn8n.com

使用n8n和AI总结每日财经新闻 - 自动邮件报告

中级

这是一个Market Research, AI Summarization领域的自动化工作流,包含 9 个节点。主要使用 Set, Html, Wait, EmailSend, HttpRequest 等节点。 使用Ollama LLM的每日财经新闻摘要 - 自动邮件报告

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "nPoiePylbYZrH7kn",
  "meta": {
    "instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281",
    "templateCredsSetupCompleted": true
  },
  "name": "使用n8n和AI总结每日财经新闻 - 自动邮件报告",
  "tags": [],
  "nodes": [
    {
      "id": "de6a3f50-13db-4869-96c4-00efb1633b0d",
      "name": "计划每日触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        0,
        240
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7e60e85a-8357-4fcb-a5af-37f47caa23dc",
      "name": "获取财经新闻网页",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Url : https://www.ft.com/",
      "position": [
        220,
        240
      ],
      "parameters": {
        "url": "https://www.ft.com/",
        "options": {
          "timeout": 10000
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "1e4d85bf-311c-4f61-972b-bfac77d085e0",
      "name": "延迟以确保页面加载",
      "type": "n8n-nodes-base.wait",
      "position": [
        440,
        240
      ],
      "webhookId": "adff7750-f9b0-4796-915d-9c28dcc878b0",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "819d8425-cc56-4277-9b7b-c5de0794d2b0",
      "name": "提取新闻标题和文本",
      "type": "n8n-nodes-base.html",
      "notes": "Extract selected headlines, editor's picks, spotlight etc.",
      "position": [
        660,
        240
      ],
      "parameters": {
        "options": {
          "cleanUpText": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "Headline #1",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span4.layout-desktop__grid--column-start-1.layout-desktop__grid--row-start-1.layout-desktop__grid--with-border.layout--default > div > div > div > div.story-group-stacked__primary-story > div > div > div > div > div.primary-story__teaser"
            },
            {
              "key": "Headline #2",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span6.layout-desktop__grid--column-start-5.layout-desktop__grid--row-start-1.layout-desktop__grid--with-border.layout--default > div > div > div > div > div > div.story-group__article.story-group__article--featured > div > div.featured-story-content > div.headline.js-teaser-headline.headline--scale-5.headline--color-black > a > span"
            },
            {
              "key": "Editor's Picks",
              "cssSelector": "#site-content > div:nth-child(1) > section > div > div > div.layout-desktop__grid.layout-desktop__grid--span2.layout-desktop__grid--column-start-11.layout-desktop__grid--row-start-1.layout--default > div"
            },
            {
              "key": "Top Stories",
              "cssSelector": "#site-content > div:nth-child(3) > section > div",
              "skipSelectors": "h2"
            },
            {
              "key": "Spotlight",
              "cssSelector": "#site-content > div:nth-child(6) > section",
              "skipSelectors": "h2"
            },
            {
              "key": "Various News",
              "cssSelector": "#site-content > div:nth-child(8) > section",
              "skipSelectors": "h2"
            },
            {
              "key": "Europe News",
              "cssSelector": "#site-content > div:nth-child(13) > section",
              "skipSelectors": "h2"
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 1.2
    },
    {
      "id": "9e225c3b-1732-4d22-8a43-cab26c816865",
      "name": "清理提取的新闻数据",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5412a5ee-dbbe-4fcc-98a5-6fafc37b94d1",
              "name": "All data",
              "type": "string",
              "value": "=News :\n{{ $json['Headline #1'] }}\n\n\n\nFinancial news :\n\n{{ $('Extract News Headlines & Text\t').item.json['Headline #1'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Headline #2'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Editor\\'s Picks'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Top Stories'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json.Spotlight }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Various News'] }};\n\n{{ $('Extract News Headlines & Text\t').item.json['Europe News'] }};\n\n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b6a11f10-2dc4-45b9-a9fd-ba4245fa28ca",
      "name": "AI财经新闻摘要器",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1100,
        240
      ],
      "parameters": {
        "text": "=Summarise this news :\n\n{{ $json['All data'] }}",
        "options": {
          "systemMessage": "You are an AI financial analyst. Your role is to read, understand, and summarize key financial news from today. The goal is to provide investors with a clear and concise market overview to support better investment decisions.\n\n\nInvestor Outlook\nToday’s news points to [bullish/bearish/neutral] sentiment. Watch for [economic event/earnings report] tomorrow, which could influence market direction.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "04f50544-39c1-456c-ba8e-3150ae902adb",
      "name": "邮件发送每日财经摘要",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1476,
        240
      ],
      "webhookId": "5ca3faf6-d857-4d58-8676-90e392fa9cc2",
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {},
        "subject": "Today's News",
        "toEmail": "abc@gmail.com",
        "fromEmail": "xyz@gmail.com",
        "emailFormat": "text"
      },
      "credentials": {
        "smtp": {
          "id": "3QSx1pWoS0BZcK4c",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2f4dab06-5786-4ab9-8a54-0b2bc56f6c22",
      "name": "LLM 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1188,
        460
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "id": "h9CEBFmYALm3FvZf",
          "name": "Ollama account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3ac33bfa-1a93-495f-8f72-e10aba74543f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        -180
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 320,
        "content": "📌 **试试看!**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "bf9bf774-b70b-4fcf-9265-0ad47885effd",
  "connections": {
    "LLM Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Financial News Summarizer\t",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Daily Trigger\t": {
      "main": [
        [
          {
            "node": "Fetch Financial News Webpage\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Extracted News Data\t": {
      "main": [
        [
          {
            "node": "AI Financial News Summarizer\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delay to Ensure Page Load\t": {
      "main": [
        [
          {
            "node": "Extract News Headlines & Text\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Financial News Summarizer\t": {
      "main": [
        [
          {
            "node": "Email Daily Financial Summary\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Financial News Webpage\t": {
      "main": [
        [
          {
            "node": "Delay to Ensure Page Load\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract News Headlines & Text\t": {
      "main": [
        [
          {
            "node": "Clean Extracted News Data\t",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 市场调研, AI 摘要总结

需要付费吗?

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

工作流信息
难度等级
中级
节点数量9
分类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 查看

分享此工作流