8
n8n 中文网amn8n.com

自动化新闻检索与Telegram广播,使用OpenAI、SerpAPI和LangChain

高级

这是一个Social Media, AI RAG领域的自动化工作流,包含 23 个节点。主要使用 If, Set, Wait, Gmail, Telegram 等节点。 自动化新闻检索与Telegram广播,使用OpenAI、SerpAPI和LangChain

前置要求
  • Google 账号和 Gmail API 凭证
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "cb9a1e5321767b6316634728341237e564b2587ab15b74ca0a89eb02a53484d6",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "92486939-007d-4b63-afa4-28d41ea13d0a",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1616,
        48
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5cbd0652-b8cc-443e-be65-e4894c754901",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -544,
        -48
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "27ae28d4-0e81-4b75-91cf-a61acda04f3c",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -16,
        16
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0d30a571-f837-4a11-b982-a79bfa02190c",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        672,
        -96
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d4c9cb50-340f-4af8-81e7-14f120fe30fb",
      "name": "AI Agent 工具",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        256,
        560
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "a554dc14-985a-4950-bc8e-0846cd4b59be",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        32,
        576
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "0e868d12-6376-4f71-b02b-02f77316ecc1",
      "name": "思考",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        160,
        576
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "3615df01-5fdf-43d9-b928-c628f0d1897e",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        144,
        352
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "05045f1a-d47a-4d22-8eb6-4b134867373d",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        272
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "c5572771-95ed-4e9f-a05e-264c223bf03f",
      "name": "日程安排",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -384,
        272
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f77a68f0-08c6-4bb7-a049-77ff07187cef",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        32,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b2c21b16-3823-4c9a-91d6-d624bf9033b5",
      "name": "获取 Google Docs 中的文档",
      "type": "n8n-nodes-base.googleDocsTool",
      "position": [
        192,
        704
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "426ff7a3-6cdf-4fa4-93cb-a2bb34c24a74",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        304,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1061b014-e9af-4620-a4b0-a2507ff16326",
      "name": "HTTP 请求",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        400,
        720
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a8af3086-c65c-41e7-bf0b-7f8d25f81ae7",
      "name": "条件判断",
      "type": "n8n-nodes-base.if",
      "position": [
        544,
        352
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "2b22739b-a10c-426b-a66a-84439dcc2767",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        784,
        224
      ],
      "webhookId": "829ccbe5-ea02-4128-bc8c-43897bca1855",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "713ef0fa-1baf-4ed7-a219-153bd78edf8e",
      "name": "不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        784,
        448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "952f0f8e-b728-4a72-a85d-738fcdebaba4",
      "name": "在频道发布",
      "type": "n8n-nodes-base.telegram",
      "position": [
        976,
        304
      ],
      "webhookId": "d60206f7-b55c-41d9-bb2f-04a43dd9dc93",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "b15d087a-6f18-44da-9870-bbb42ecc91a7",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -384,
        448
      ],
      "webhookId": "5c9d850c-c56c-44f6-a5b1-e25762ffae6d",
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "8ebb13e7-2986-41c3-bce8-88b346eba209",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        -160,
        448
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a4330e71-af2d-41c1-8373-5a74976e6aac",
      "name": "Rapiwa",
      "type": "n8n-nodes-rapiwa.rapiwa",
      "position": [
        1184,
        384
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5f729de2-dc9c-482b-8ea4-435ba312d835",
      "name": "发送消息",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1184,
        224
      ],
      "webhookId": "4f107f5a-dbe9-4c51-a387-3ad32bcb40b2",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "a6b4a5df-9438-4701-88b9-22ccc69c4b2a",
      "name": "发送文本消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        976,
        144
      ],
      "webhookId": "4f94ade8-7625-4680-bacd-4264d539a4cf",
      "parameters": {},
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Post on Channel",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent Tool",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Do nothing": {
      "main": [
        []
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "ai_tool": [
        [
          {
            "node": "AI Agent Tool",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Tool": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Post on Channel": {
      "main": [
        [
          {
            "node": "Rapiwa",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Tool",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get a document in Google Docs": {
      "ai_tool": [
        [
          {
            "node": "AI Agent Tool",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体, AI RAG 检索增强

需要付费吗?

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

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

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

作者
DevCode Journey

DevCode Journey

@devcodejourney

I build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.

外部链接
在 n8n.io 查看

分享此工作流