8
n8n 中文网amn8n.com

Telegram AI研究助手(GPT-4o mini + DeepSeek R1 + SerpAPI)

中级

这是一个Personal Productivity, AI Chatbot领域的自动化工作流,包含 13 个节点。主要使用 Telegram, Agent, TelegramTrigger, ToolSerpApi, LmChatOpenAi 等节点。 Telegram AI研究助手(GPT-4o mini + DeepSeek R1 + SerpAPI)

前置要求
  • Telegram Bot Token
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "0a82a9d5784b67ad963ceff89283b2e40cb771be10fe58ba2682f3598a37c6e1",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "2103bf29-ca9c-48a0-91f7-9ff81f2385b1",
      "name": "DeepSeek R1 AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -320,
        368
      ],
      "parameters": {
        "text": "={{ $json.message.text }} ",
        "options": {
          "systemMessage": "=You are an intelligent assistant specialized in understanding user queries and structuring them for deeper investigation. You act as a first-layer analyst, helping clarify, reformulate, or expand the user's original question when needed.\n\nYou have access to short-term memory and can recall recent context to ensure continuity in multi-turn conversations. Your goal is to understand what the user really needs, extract relevant context, and prepare a refined, focused query for a research agent.\n\nYou do not perform live research yourself. Instead, you pass refined questions forward.\nRespond clearly, naturally, and like a helpful human—not robotic or overly formal.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "c11f364a-f8f5-4894-b95a-c0aba8abdf70",
      "name": "DeepSeek 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        -336,
        608
      ],
      "parameters": {
        "model": "deepseek-reasoner",
        "options": {}
      },
      "credentials": {
        "deepSeekApi": {
          "id": "djoVzbnfBXUw4V0K",
          "name": "DeepSeek Oficial account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2f14ea0b-67de-4eb2-bd20-37134914ae00",
      "name": "简单记忆",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -160,
        608
      ],
      "parameters": {
        "sessionKey": "={{ $json.message.chat.id }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "09271ba5-f172-4463-a56e-e68c6509624e",
      "name": "Research AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        64,
        368
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {
          "systemMessage": "=You are a research assistant with access to real-time search results provided by SerpAPI. You must always base your answers exclusively on the information retrieved from SerpAPI—never speculate or guess.\n\nFor every user query, you will receive structured results including titles, snippets, prices, images, and links.\n\nYour job is to:\n- Carefully analyze the SerpAPI results\n- Identify the most relevant and helpful information\n- Summarize or compare the top 2–3 options clearly and concisely\n- Include: product name, short description, price (if available), link, and image URL (if available)\n\nFormat the response in a user-friendly, readable style—using bullets or emojis to improve clarity. Always include direct links and image URLs if they are provided in the search data.\n\nIf no useful results are found, say so transparently.\n\nDo not generate information outside of what SerpAPI returns. Your role is to process, summarize, and organize real web search data—nothing more.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "34c0f954-121a-44cd-af1b-eda624d4e05a",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        608
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "wAP7QjMnHDyoGfIB",
          "name": "OpenAi Arlindeveloper"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d1fcc1af-f669-42b7-9886-b59e3fd08f1c",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        272,
        608
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "serpApi": {
          "id": "OZlBEWEuwOPID81O",
          "name": "SerpAPI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "be7af2e5-f78e-4354-9f37-3eaa4a47fd35",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -640,
        192
      ],
      "webhookId": "3e00a8f3-50f1-4b71-9af3-f06813efd5e5",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "pl9ohsZOqEJv2B8U",
          "name": "Invest...Deep_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c9d87edb-252b-4dc9-9d1b-67d5aeeb4e38",
      "name": "发送短信",
      "type": "n8n-nodes-base.telegram",
      "position": [
        512,
        272
      ],
      "webhookId": "c933873b-ee2d-48ad-a3d9-24f238083a64",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "pl9ohsZOqEJv2B8U",
          "name": "Invest...Deep_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "60e010f3-cca8-4081-9ebc-e424444ce0f0",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "disabled": true,
      "position": [
        -1328,
        -336
      ],
      "parameters": {
        "width": 540,
        "height": 1240,
        "content": "## 通过 Telegram 的 AI 研究助手 (GPT-4o mini + DeepSeek R1 + SerpAPI)"
      },
      "typeVersion": 1
    },
    {
      "id": "eec392b0-3809-4d7f-8db8-cb31d378fe73",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        -336
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 1240,
        "content": "## 📲 Telegram 触发器节点"
      },
      "typeVersion": 1
    },
    {
      "id": "c8c3f661-1d73-4117-ab00-67a634fd2ad2",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        -336
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 1240,
        "content": "## 📲 🧠 DeepSeek R1 代理(带简单内存)"
      },
      "typeVersion": 1
    },
    {
      "id": "78f47408-284b-4ae3-a575-a056fca6d135",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -336
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 1240,
        "content": "## 🔍 研究 AI 代理 (OpenAI GPT-4o mini + SerpAPI)"
      },
      "typeVersion": 1
    },
    {
      "id": "6ba3e890-7a90-48e3-ab12-4cc8be49376a",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -336
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 1240,
        "content": "## 📲 ✉️ 发送 Telegram 消息"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "DeepSeek R1 AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "DeepSeek R1 AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Research AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Research AI Agent": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "DeepSeek R1 AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek R1 AI Agent": {
      "main": [
        [
          {
            "node": "Research AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 个人效率, AI 聊天机器人

需要付费吗?

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

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

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

作者
Arlin Perez

Arlin Perez

@arlindeveloper

👋 Hi! I'm Arlin - a QA Engineer with 2 years of experience and a background in Dart & Flutter for mobile app development. ⚙️ I'm passionate about automation and love building efficient workflows using n8n. 📬 Reach out for any help with custom workflows

外部链接
在 n8n.io 查看

分享此工作流