ChatGPT销售找线索AI 评分 · 68/100AI 辅助编辑·未发现明显提示词注入风险n8n.io

Telegram 潜在客户开发 AI Agent

通过 Telegram 语音或文本指令,自动抓取潜在客户或生成 LinkedIn 调研报告

有一点经验步骤流程提示词贴士
给谁
需要自动化潜在客户开发的外贸人员、增长营销者、独立创始人或 SDR
你会得到
在 Telegram 聊天中发送语音或文字,AI Agent 自动调用 Apollo 抓取线索存入 Google Sheets,或基于 LinkedIn 链接生成调研报告
你需要
n8n · openai · telegram · apollo · google-sheets

硬约束

在 n8n 中导入官方模板,配置 Telegram Bot、OpenAI、Apollo 凭证,设置 Lead Agent 系统提示词,部署后通过 Telegram 触发工作流。需要 n8n 实例;子工作流 leadScraping 与 leadResearch 需另行准备或替换为自有实现。

他们做了什么

作者 Abdul Mir 在 n8n 官方模板库发布了该工作流模板。模板将 Telegram Bot 作为入口,通过 AI Agent 解析用户意图,调用 Apollo 抓取线索存入 Google Sheets,或基于 LinkedIn 链接生成调研报告。工作流包含语音转录(Whisper)、文本/语音分流、Agent 决策、工具调用和 Telegram 回复的完整节点链。

效果如何

模板在 n8n 平台获得 7374 次浏览,状态为 published。作者描述其可即时响应语音或文本指令,输出包含联系人信息的电子表格或 PDF 风格调研简报。(author_report)

值得知道

1. 本模板仅包含主控工作流,leadScraping 和 leadResearch 为外部子工作流引用,需用户自行准备或替换实现。2. 子工作流默认引用的 workflowId(IPhiwjZXcxi0UDSf 和 LAvUyCmqSnNmVrjk)不在当前 snapshot 中,直接导入可能无法运行。3. Apollo API 有调用费用,且需要合规使用。4. 调研报告通过邮件发送的功能可能在子工作流中实现,主工作流未展示邮件节点。5. 本站未实测该工作流,reproduction=not_tested。

n8n 工作流模板

结构已检查 · 未实际运行

下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。

配置与测试清单

需要绑定的凭证

  • OpenAI Chat Model 节点:绑定OpenAI API 凭证。
  • Download File 节点:绑定Telegram API 凭证。
  • Transcribe 节点:绑定OpenAI API 凭证。
  • Response 节点:绑定Telegram API 凭证。
  • Error Response 节点:绑定Telegram API 凭证。
  • Telegram Trigger 节点:绑定Telegram API 凭证。

需要替换的配置

  • 源模板来自 n8n 公开库 #6532(约 20 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
  • Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。

测试输入与预期结果

  • 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
  • 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。

模板处理说明

  • 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
  • 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。

模板获取日期: 2026-10-24

步骤

  1. 准备前提条件

    确保拥有以下资源:Telegram Bot Token(通过 @BotFather 创建)、OpenAI API Key、Apollo API Key 或其他替代抓取工具凭证、以及用于接收线索的 Google Sheets。

  2. 配置 Telegram 触发器

    在 n8n 中导入模板后,打开 Telegram Trigger 节点,选择已创建的 Telegram 凭证。确认 updates 包含 message,以便接收文本和语音消息。

  3. 配置 OpenAI 与模型

    在 OpenAI Chat Model 节点选择 gpt-4o,并绑定 openAiApi 凭证。同一凭证也用于 Transcribe 节点的 Whisper 语音转录功能。

  4. 配置 Lead Agent 系统提示词与子工作流

    打开 Lead Agent 节点,确认 promptType 为 define,将系统提示词替换为以下内容。该提示词定义 Agent 角色为 Sam Ovens,负责通过 leadScraping 和 leadResearch 两个工具分别执行线索抓取和 LinkedIn 调研。注意:搜索查询中的空格必须替换为 '+'。

    运行提示词 · 来源原文。Lead Agent 节点的 systemMessage 字段(promptType=define)

    =# Overview 
    You are Sam Ovens, a lead generation agent, responsible for scraping and researching leads. 
    
    # Tools 
    ### leadScraping: 
    Use this tool to scrape leads into a Google Sheet. Only call this tool once you have enough information to complete the desired JSON search query. 
    
    ### leadResearch: 
    Use this tool to research a lead by their linkedIn URL. 
    
    # Rules:
    - Ask clarifying questions if you're unsure about something. 
    - Ask questions to gather enough information to satisfy the query for each of the tools. 
    - You should introduce yourself as "Sam Ovens" and ask the user what leads they want to scrape today. 
    - Always replace spaces with '+' in your search queries. For example, instead of "los angeles united states", your query should be "los+angeles+united+states". 
    - You always need a linkedIn URL to research a lead. 
    - You can only research one person at a time. 
    - Feel free to be lighthearted and funny.
    - Make sure you always call the tools with correct JSON formatting, but don't wrap the query in ```json```.
    
    # Example 
    - Input: "Hi" 
    - Output: "Sam Ovens here, the god of B2B outreach. Which leads can I help you scrape today? Just tell me the locations, Business and job titles and I'll handle the rest! " 
    - Input: "Let's do \n Locations: \n - Chicago United States \n - Sydney Australia \n\n Business: \n - Financial Planners \n] 
    - Output: "Awesome. I think you forgot the job titles. Which job titles should I search for?" 
    - Input: "Only CEOs please" 
    - Call leadScrape tool with query: 
    
    [
      {
        "location": [
          "chicago+united+states",
          "sydney+australia"
        ],
        "business": [
          "financial+planner"
        ],
        "job_title": [
          "ceo"
        ]
      }
    ] 
    - Input from tool: "25 new contacts have been added to the Google Sheet!" 
    - Output: "Done! I've added 25 new contacts to the Google Sheet. Let me know if you need anything else!"
  5. 配置工具节点与测试

    检查 leadScraping 和 leadResearch 两个 toolWorkflow 节点:前者需要指向实际的线索抓取子工作流(默认 workflowId=IPhiwjZXcxi0UDSf),后者指向调研子工作流(默认 workflowId=LAvUyCmqSnNmVrjk)。若使用自有实现,请替换 workflowId 并更新描述中的输入格式。Simple Memory 节点已按 Telegram chat ID 作为 sessionKey 配置,无需修改。保存并激活工作流,在 Telegram 中向 Bot 发送文字或语音消息测试。

    运行提示词 · 来源原文。leadScraping 节点的 description 字段,供 Agent 理解输入格式

    Call this tool to scrape leads once you have enough details about the search query. 
    
    Your input must be in json like this: 
    
    [
      {
        "location": [
          "LOCATION1+HERE",
          "LOCATION2+HERE",
          ...
        ],
        "business": [
          "BUSINESS1+HERE",
          "BUSINESS2+HERE",
          ...
        ],
        "job_title": [
          "TITLE1+HERE",
          "TITLE2+HERE",
          ...
        ]
      }
    ]

    运行提示词 · 来源原文。leadResearch 节点的 description 字段,供 Agent 理解输入格式

    Call this tool to research leads. the input should be their linkedin URL in the following format: 
    
    {
    "linkedinURL": "[URL-HERE]"
    }

可复制提示词

搭建指导 · 本站建议版本。搭建助手启动词,用于确认输入、权限和子工作流准备情况

这一段是提示词,页面不会在这里插入广告。

你正在搭建一个基于 n8n 的 Telegram AI Agent,用于自动抓取潜在客户或生成 LinkedIn 调研报告。请根据以下清单确认你已准备好所有凭证和子工作流,然后按步骤导入模板并配置节点。

先确认 Telegram Bot Token、OpenAI Key、Apollo Key 和 Google Sheets 已就绪;再检查 leadScraping/leadResearch 子工作流是否可用或需替换

来源

Lead gen agent (Telegram) · abdulmir · n8n.io · 2025-07-27

留言与反馈

试过这个方法吗?分享效果、遇到的问题或改进建议。留言审核后公开,请勿填写敏感信息。

正在加载…

    相关用例