语音与文本线索生成助手,集成Telegram、GPT-4和Apollo
高级
这是一个Lead Generation, AI Chatbot领域的自动化工作流,包含 20 个节点。主要使用 Set, Switch, Telegram, Agent, TelegramTrigger 等节点。 语音与文本线索生成助手,集成Telegram、GPT-4和Apollo
前置要求
- •Telegram Bot Token
- •OpenAI API Key
使用的节点 (20)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "a88d54d0dc140647df8f628579b3d5aae0dedb13c983a1f5c11ee14f54f18774",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "171159eb-9936-4dbd-94a3-4277799353bc",
"name": "行政规划师和管理员",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
680,
460
],
"parameters": {
"name": "leadScraping",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "IPhiwjZXcxi0UDSf",
"cachedResultName": "Lead Scraping"
},
"description": "=当您获得足够的搜索查询详情后,调用此工具来抓取潜在客户。",
"workflowInputs": {
"value": {},
"schema": [],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2
},
{
"id": "b561761a-a725-4b6e-b37f-090563107d24",
"name": "潜在客户挖掘",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
840,
440
],
"parameters": {
"name": "leadResearch",
"workflowId": {
"__rl": true,
"mode": "list",
"value": "LAvUyCmqSnNmVrjk",
"cachedResultName": "Lead Research Agent"
},
"description": "调用此工具来研究潜在客户。输入应为他们的 LinkedIn URL,格式如下:",
"workflowInputs": {
"value": {
"query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('query', ``, 'string') }}"
},
"schema": [
{
"id": "query",
"display": true,
"removed": false,
"required": false,
"displayName": "query",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"quer"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2
},
{
"id": "7ad71d24-25fd-4ca8-80c8-3124651ec6cf",
"name": "潜在客户代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueErrorOutput",
"position": [
520,
100
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "=# Overview \nYou are Sam Ovens, a lead generation agent, responsible for scraping and researching leads. \n\n# Tools \n### leadScraping: \nUse 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. \n\n### leadResearch: \nUse this tool to research a lead by their linkedIn URL. \n\n# Rules:\n- Ask clarifying questions if you're unsure about something. \n- Ask questions to gather enough information to satisfy the query for each of the tools. \n- You should introduce yourself as \"Sam Ovens\" and ask the user what leads they want to scrape today. \n- Always replace spaces with '+' in your search queries. For example, instead of \"los angeles united states\", your query should be \"los+angeles+united+states\". \n- You always need a linkedIn URL to research a lead. \n- You can only research one person at a time. \n- Feel free to be lighthearted and funny.\n- Make sure you always call the tools with correct JSON formatting, but don't wrap the query in ```json```.\n\n# Example \n- Input: \"Hi\" \n- 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! \" \n- Input: \"Let's do \\n Locations: \\n - Chicago United States \\n - Sydney Australia \\n\\n Business: \\n - Financial Planners \\n] \n- Output: \"Awesome. I think you forgot the job titles. Which job titles should I search for?\" \n- Input: \"Only CEOs please\" \n- Call leadScrape tool with query: \n\n[\n {\n \"location\": [\n \"chicago+united+states\",\n \"sydney+australia\"\n ],\n \"business\": [\n \"financial+planner\"\n ],\n \"job_title\": [\n \"ceo\"\n ]\n }\n] \n- Input from tool: \"25 new contacts have been added to the Google Sheet!\" \n- Output: \"Done! I've added 25 new contacts to the Google Sheet. Let me know if you need anything else!\" \n"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "0d408086-fcd9-4d45-a3f3-8513fc6b3286",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
440,
320
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "E9waf1c33TsN4RCh",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "db2aefae-bd30-4ec1-8f10-21be6ffc51b7",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
560,
400
],
"parameters": {
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 10
},
"typeVersion": 1.3
},
{
"id": "5b27c7d7-3b29-4dfa-8ee3-8e6db26683cd",
"name": "下载文件",
"type": "n8n-nodes-base.telegram",
"position": [
0,
0
],
"webhookId": "3e98f8c1-55f9-4643-9740-b8a7db8aed09",
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file"
},
"credentials": {
"telegramApi": {
"id": "krnf5YegLf5AW5Ad",
"name": "Lead Gen Sam"
}
},
"typeVersion": 1.2
},
{
"id": "4dedbb6f-1f11-4e9a-a878-e08625674ac8",
"name": "转录",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
220,
0
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"id": "E9waf1c33TsN4RCh",
"name": "OpenAi account"
}
},
"typeVersion": 1.6
},
{
"id": "3958a793-f379-4703-aabe-e2d508b1f2c4",
"name": "文本",
"type": "n8n-nodes-base.set",
"position": [
220,
200
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "fe7ecc99-e1e8-4a5e-bdd6-6fce9757b234",
"name": "text",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "79fc7be1-4af8-440d-aa98-f66ae47884f9",
"name": "语音或文本",
"type": "n8n-nodes-base.switch",
"position": [
-220,
100
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice.file_id }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "8c844924-b2ed-48b0-935c-c66a8fd0c778",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "4e6e5070-1498-4e92-bd60-a6241f52f309",
"name": "响应",
"type": "n8n-nodes-base.telegram",
"position": [
1000,
0
],
"webhookId": "16a2fb0a-5e8d-4585-88e7-6d55298b4af7",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "krnf5YegLf5AW5Ad",
"name": "Lead Gen Sam"
}
},
"typeVersion": 1.2
},
{
"id": "4d8e1de4-a02b-4fa9-ad0e-d57a03ef2aaa",
"name": "错误响应",
"type": "n8n-nodes-base.telegram",
"position": [
1000,
200
],
"webhookId": "f90cf8b1-6cd6-43e4-857e-1916585ec2e2",
"parameters": {
"text": "={{ $json.error }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "krnf5YegLf5AW5Ad",
"name": "Lead Gen Sam"
}
},
"typeVersion": 1.2
},
{
"id": "5f476e63-4b80-43c4-957d-85261db977b9",
"name": "Telegram 触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-480,
100
],
"webhookId": "e3dd6506-5997-4024-ba33-ff7c1ad12815",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "krnf5YegLf5AW5Ad",
"name": "Lead Gen Sam"
}
},
"typeVersion": 1.2
},
{
"id": "f21ff98d-e562-4ab6-9d14-0b675717e8ab",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
-640
],
"parameters": {
"color": 3,
"width": 320,
"height": 540,
"content": "## 研究报告"
},
"typeVersion": 1
},
{
"id": "e70fba28-bcd8-4d34-912f-9a14676c6dee",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
-640
],
"parameters": {
"color": 5,
"width": 780,
"height": 540,
"content": "## 示例输出"
},
"typeVersion": 1
},
{
"id": "55a0f125-836d-45c6-af8b-fa7dbca2337c",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
-1200
],
"parameters": {
"color": 3,
"width": 320,
"height": 540,
"content": "## 抓取潜在客户"
},
"typeVersion": 1
},
{
"id": "345b869b-6150-4d03-8429-fd4fc577573a",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
-1200
],
"parameters": {
"color": 5,
"width": 780,
"height": 540,
"content": "## 示例输出"
},
"typeVersion": 1
},
{
"id": "d27149b2-bfc3-4d4a-a0b6-2414322c8700",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-520,
-40
],
"parameters": {
"color": 6,
"width": 880,
"height": 440,
"content": "## 发送 Telegram 机器人消息"
},
"typeVersion": 1
},
{
"id": "4d9b792a-4d43-4702-873e-539ad6c5bf59",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-40
],
"parameters": {
"color": 6,
"width": 800,
"height": 660,
"content": "## 调用研究或抓取工作流并通过 Telegram 回复"
},
"typeVersion": 1
},
{
"id": "2e106fbe-506c-4d8c-90a8-2a12fd07a10a",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
440
],
"parameters": {
"color": 5,
"width": 440,
"height": 240,
"content": "## 你好,我是 Abdul 👋"
},
"typeVersion": 1
},
{
"id": "8260426e-0e2f-4fbe-9327-8b4248014f70",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-740,
-1260
],
"parameters": {
"width": 780,
"height": 1160,
"content": "# 终极潜在客户生成代理 Telegram"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Text": {
"main": [
[
{
"node": "Lead Agent",
"type": "main",
"index": 0
}
]
]
},
"Lead Agent": {
"main": [
[
{
"node": "Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Error Response",
"type": "main",
"index": 0
}
]
]
},
"Transcribe": {
"main": [
[
{
"node": "Lead Agent",
"type": "main",
"index": 0
}
]
]
},
"leadResearch": {
"ai_tool": [
[
{
"node": "Lead Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"leadScraping": {
"ai_tool": [
[
{
"node": "Lead Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Download File": {
"main": [
[
{
"node": "Transcribe",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Lead Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Voice or Text": {
"main": [
[
{
"node": "Download File",
"type": "main",
"index": 0
}
],
[
{
"node": "Text",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Voice or Text",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Lead Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 潜在客户开发, AI 聊天机器人
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI知识库助手与OpenAI、Supabase及Google Drive文档同步
AI知识库助手与OpenAI、Supabase及Google Drive文档同步
Set
Limit
Switch
+16
49 节点Abdul Mir
内部知识库
使用Apollo、GPT-4和Telegram的AI驱动潜在客户生成至数据库
基于AI的潜在客户生成:使用Apollo、GPT-4和Telegram输出到数据库
Set
Code
Limit
+15
26 节点Paul
潜在客户开发
J.A.R.V.I.S.
在Telegram上使用OpenAI、SERP和向量存储构建全面的多模态助手
If
Set
Code
+16
48 节点FabioInTech
客服机器人
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
商业AI指挥中心:Google Workspace模块化代理、向量搜索与多渠道报告
Set
Gmail
Slack
+35
80 节点Paul
文档提取
通过Telegram AI代理管理KlickTipp中的联系人
通过Telegram机器人和GPT-4o代理管理KlickTipp联系人
Set
Switch
Telegram
+10
47 节点KlickTipp
客户关系管理
我的工作流2
使用多个GPT-4o AI代理管理个人数据:Telegram上的Gmail、任务和财务
Set
Code
Gmail
+14
62 节点Mahmoud Shrouf
AI 聊天机器人
工作流信息
难度等级
高级
节点数量20
分类2
节点类型10
作者
Abdul Mir
@abdulmirHey 👋 I'm Abdul. I build AI-powered systems for marketing agencies and consultants who want to move fast and automate the boring stuff. Think lead gen agents, proposal generators, and content creation systems. I specialize in growth-focused automations and share workflows that save time and land clients.
外部链接
在 n8n.io 查看 →
分享此工作流