8
n8n 中文网amn8n.com

每日新闻

中级

这是一个AI, Marketing领域的自动化工作流,包含 6 个节点。主要使用 Gmail, HttpRequest, GoogleSheets, Agent, ScheduleTrigger 等节点,结合人工智能技术实现智能自动化。 自动化新闻摘要,使用GPT-4o + 邮件发送

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "0amwQfcJAlNBQvX6",
  "meta": {
    "instanceId": "ISNTANCE_ID",
    "templateCredsSetupCompleted": true
  },
  "name": "每日新闻",
  "tags": [],
  "nodes": [
    {
      "id": "1145643c-2b2c-44e9-bcf4-30e412f9416e",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -960,
        -340
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "44038509-248a-47d4-9c49-5c0f29ffda22",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -400,
        -340
      ],
      "parameters": {
        "text": "=You are act as news expert and collect all news headlines  in below and summarise in 5 bullets.\n\n\n {{ $json.articles[1].title }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "e97aeaae-a829-40d5-a344-6ae7141095ec",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -400,
        -160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "w5WriC1L8qFxdflM",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7b285d38-5089-4eed-bd81-8ef4667f3c28",
      "name": "拉取新闻",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -680,
        -340
      ],
      "parameters": {
        "url": "https://newsapi.org/v2/top-headlines",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "country",
              "value": "us"
            },
            {
              "name": "apiKey",
              "value": "NEWS_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4c6e30ad-4030-48e7-b735-1d8e228a1c03",
      "name": "发送邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        180,
        -340
      ],
      "webhookId": "e5c02fba-64bc-47f0-b752-2de2b8e6b03c",
      "parameters": {
        "sendTo": "={{ $json.Email }}",
        "message": "=Hi {{ $json.Name }},\nPlease find the top news headlines as below:\n\n{{ $('AI Agent').item.json.output }}",
        "options": {},
        "subject": "News Headlines",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "OgS5yqJfZOSZiv1I",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c05f27cc-fd08-457a-b964-3bbd3e7193a2",
      "name": "邮箱列表",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -40,
        -340
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1L2dLObdw_aicD6fTd-ElHSBBJIj1aBmKT7FecMtbyyE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Emails"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "OdwrcEa5aEuPpUNR",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b5ab7305-3729-4b0a-a432-1e187a93e1bb",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Email list",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull News": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email list": {
      "main": [
        [
          {
            "node": "Send Mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Pull News",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人工智能, 营销

需要付费吗?

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

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

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

作者
Amit Mehta

Amit Mehta

@amitswba

I'm a workflow automation expert with 15+ years in IT industry. I build smart, scalable n8n workflows for AI automation, marketing, CRM, and SaaS integrations. My focus is on simplifying business processes with tools like OpenAI, WhatsApp, Gmail, and Airtable. I help teams and solopreneurs automate smarter, reduce manual tasks, and grow faster—one workflow at a time.

外部链接
在 n8n.io 查看

分享此工作流