使用 Google Gemini AI 和 Telegram 批准的个性化冷邮件系统
高级
这是一个自动化工作流,包含 37 个节点。主要使用 Wait, Limit, Merge, Switch, DateTime 等节点。 基于 Google Gemini、Telegram 批准和 Google Sheets 的个性化冷邮件系统
前置要求
- •Telegram Bot Token
- •Google Sheets API 凭证
- •Google Gemini API Key
使用的节点 (37)
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "3G0lGLofYXfFMJki",
"meta": {
"instanceId": "3dfb5a3650edc2b4757ba54350b9efb3f78be8117da0b1a84cc1dc9700b64bb4"
},
"name": "使用 Google Gemini AI 和 Telegram 批准的个性化冷邮件系统",
"tags": [],
"nodes": [
{
"id": "13f60a77-9d63-4c40-9c9b-5d7f3dea45a5",
"name": "设置指南",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
448
],
"parameters": {
"color": 4,
"width": 428,
"height": 388,
"content": "## 📧 冷邮件系统 - 设置"
},
"typeVersion": 1
},
{
"id": "35009e5d-acb1-496c-9545-26e71726594e",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
352,
560
],
"parameters": {
"color": 5,
"width": 180,
"height": 80,
"content": "🚀 开始"
},
"typeVersion": 1
},
{
"id": "80cd4231-79c4-4605-9c38-1ac7b36c884a",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1600,
512
],
"parameters": {
"color": 6,
"width": 180,
"height": 100,
"content": "📊 获取"
},
"typeVersion": 1
},
{
"id": "c541f67c-c949-4fbd-815f-fbdc69d6e0a8",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2208,
528
],
"parameters": {
"color": 3,
"width": 180,
"height": 80,
"content": "🔁 循环"
},
"typeVersion": 1
},
{
"id": "bd034011-7b57-4cfd-95aa-93b976eae60f",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3344,
528
],
"parameters": {
"color": 2,
"width": 200,
"height": 100,
"content": "🤖 AI 生成器"
},
"typeVersion": 1
},
{
"id": "b7db2d1d-b507-4548-be89-50cd76e14d9c",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3904,
560
],
"parameters": {
"color": 5,
"width": 180,
"height": 80,
"content": "📱 批准"
},
"typeVersion": 1
},
{
"id": "14a9792f-ee2a-4684-aeaa-2da41c640796",
"name": "### 需要帮助?",
"type": "n8n-nodes-base.stickyNote",
"position": [
4480,
560
],
"parameters": {
"width": 160,
"height": 80,
"content": "✉️ 发送"
},
"typeVersion": 1
},
{
"id": "d08c43da-f73c-428f-8f9d-93a90ef2ee6b",
"name": "## 试试看!",
"type": "n8n-nodes-base.stickyNote",
"position": [
4144,
976
],
"parameters": {
"color": 7,
"width": 180,
"height": 100,
"content": "🔄 拒绝"
},
"typeVersion": 1
},
{
"id": "90959807-8827-4587-a2f7-778bf7d91931",
"name": "GET 模型",
"type": "n8n-nodes-base.stickyNote",
"position": [
2912,
960
],
"parameters": {
"color": 2,
"width": 180,
"height": 100,
"content": "📝 跟踪"
},
"typeVersion": 1
},
{
"id": "4d8a3589-6829-451b-b38c-df8c30dc0c1c",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
416,
640
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d88be5e7-7eaf-4f3b-b73b-4ca5a5570e4c",
"name": "AI 代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
3376,
656
],
"parameters": {
"text": "Generate a personalized cold email based on the lead data provided.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "4169bb94-1366-4a47-be9a-d293da73bb81",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
3376,
1008
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "7b543b43-9f4a-4614-8445-6e79a9afddfc",
"name": "切换",
"type": "n8n-nodes-base.switch",
"position": [
4192,
656
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Approved",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c49ca855-bd40-440a-979d-c383586057f7",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": "true"
}
]
},
"renameOutput": true
},
{
"outputKey": "Rejected",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a312a422-53e7-4d4f-964e-ee222ef82f72",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.data.approved }}",
"rightValue": "false"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "8b6572ea-7b9c-4a93-a874-662eb9975d06",
"name": "等待3",
"type": "n8n-nodes-base.wait",
"position": [
5072,
1504
],
"webhookId": "7581b3dc-d25b-4922-ad16-1468712bac24",
"parameters": {
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "f36a5d1b-6a5d-41a9-a718-9dd064a3f2d8",
"name": "Loop Over Items1",
"type": "n8n-nodes-base.splitInBatches",
"position": [
2304,
640
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "8a80e447-ac0c-4110-b97c-28cb1bbe75c9",
"name": "发送文本消息9",
"type": "n8n-nodes-base.telegram",
"position": [
2592,
320
],
"webhookId": "3209c17f-07cd-44c5-9367-d17d1774fc1c",
"parameters": {
"text": "Batch Complete!✅",
"chatId": "5471021866",
"additionalFields": {
"appendAttribution": false
}
},
"executeOnce": true,
"typeVersion": 1.2
},
{
"id": "ae9ca082-637f-43d4-a4ff-1524b7e2ea72",
"name": "发送消息并等待响应",
"type": "n8n-nodes-base.telegram",
"position": [
3968,
656
],
"webhookId": "5021d124-5cf5-4671-a0e6-c4ace2292113",
"parameters": {
"chatId": "5471021866",
"message": "=Subject:{{ $json.output.Subject }}\n\nBody: {{ $json.output.Body }}",
"options": {
"appendAttribution": false
},
"operation": "sendAndWait",
"approvalOptions": {
"values": {
"approvalType": "double"
}
}
},
"typeVersion": 1.2
},
{
"id": "c18f5b55-136a-4455-aa5a-3a89af529407",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
3664,
848
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n\t\"Subject\": \"Subject Line\",\n\t\"Body\": \"Body Text\"\n}"
},
"typeVersion": 1.3
},
{
"id": "edcce28d-4449-44e0-99d1-e1cf5be9dcff",
"name": "Google Gemini 聊天模型3",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
3664,
1008
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "5771def9-6954-498a-99b9-759b258eee66",
"name": "AI 代理1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2928,
1072
],
"parameters": {
"text": "Update sheets: append to Sent Leads and update status to Sent in Filtered Leads.",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "8a0cfceb-a160-4441-80b3-9d8f5e851e59",
"name": "简单记忆1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
3024,
1360
],
"parameters": {
"sessionKey": "={{ $('Get Lead from Google Sheet').item.json['Lead \\nID'] }}",
"sessionIdType": "customKey",
"contextWindowLength": 100
},
"typeVersion": 1.3
},
{
"id": "292a0368-8d45-4211-baef-45627ed2359a",
"name": "Google Gemini 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
2864,
1360
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "1a4f6f59-46a7-44aa-84f7-4743bdb3c591",
"name": "筛选后的潜在客户更新",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
3360,
1360
],
"parameters": {
"columns": {
"value": {
"Status": "={{ $fromAI('Status', '', 'string') }}",
"Lead \nID": "={{ $fromAI('Lead__ID', '', 'string') }}"
},
"mappingMode": "defineBelow",
"matchingColumns": [
"Lead \nID"
]
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w"
}
},
"typeVersion": 4.7
},
{
"id": "4ae9784f-765d-410f-879f-8c09344eeeab",
"name": "已发送潜在客户追加",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
3184,
1360
],
"parameters": {
"columns": {
"value": {
"Name": "={{ $fromAI('Name', '', 'string') }}",
"Email": "={{ $fromAI('Email', '', 'string') }}",
"Lead \nID": "={{ $fromAI('Lead__ID', '', 'string') }}",
"Sent Date ": "={{ $fromAI('Sent_Date', '', 'string') }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 646128004
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w"
}
},
"typeVersion": 4.7
},
{
"id": "64abe51f-b1d9-41bc-8c34-301260b2e1cb",
"name": "AI 代理2",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
4480,
272
],
"parameters": {
"text": "Archive email to Emails Sent sheet.",
"options": {},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "36fd7dec-3823-4cf1-bff8-c18c550aff95",
"name": "Google Gemini 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
4480,
448
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "0e3db645-32c5-4050-aa8e-1108434a4cf5",
"name": "发送消息并等待响应1",
"type": "n8n-nodes-base.telegram",
"position": [
4176,
1072
],
"webhookId": "6ebc9d48-99d4-4760-aa70-88c3c39682eb",
"parameters": {
"chatId": "5471021866",
"message": "How to change email?",
"options": {},
"operation": "sendAndWait",
"responseType": "freeText"
},
"typeVersion": 1.2
},
{
"id": "1a86c08b-7892-471c-8e14-dadb6716c094",
"name": "AI Agent3",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
4384,
1072
],
"parameters": {
"text": "Regenerate email based on user feedback.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "b6bf5560-d1df-46c8-825b-7a549e1fc7b4",
"name": "Google Gemini 聊天模型4",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
4384,
1488
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "03b23058-3f93-4aae-8142-25a08dead41b",
"name": "结构化输出解析器1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
4608,
1328
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n\t\"Subject\": \"Subject Line\",\n\t\"Body\": \"Body Text\"\n}"
},
"typeVersion": 1.3
},
{
"id": "62f96dd4-c9f0-49db-8d69-16d364415c4b",
"name": "Google Gemini 聊天模型5",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
4608,
1488
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "77a8c096-2a84-41b5-9e77-8a17bb88112a",
"name": "发送电子邮件",
"type": "n8n-nodes-base.emailSend",
"position": [
4544,
640
],
"webhookId": "fac38cb2-cf3b-4dd3-a2f4-6b0e837a9fa4",
"parameters": {
"text": "={{ $('AI Agent').item.json.output.Body }}\n\n--\nCompany Team",
"options": {
"bccEmail": "connect@company.com",
"appendAttribution": false
},
"subject": "={{ $('AI Agent').item.json.output.Subject }}",
"toEmail": "={{ $('Get Lead from Google Sheet').item.json.Email }}",
"fromEmail": "connect@company.com",
"emailFormat": "text"
},
"typeVersion": 2.1
},
{
"id": "c7426e71-fc57-4bdc-8e28-f90eeb12e2e4",
"name": "日期与时间",
"type": "n8n-nodes-base.dateTime",
"position": [
1408,
640
],
"parameters": {
"options": {}
},
"typeVersion": 2
},
{
"id": "dc15d5a6-e379-43d2-90f5-76bdaa3bbee3",
"name": "合并数据和代理输出",
"type": "n8n-nodes-base.merge",
"position": [
3824,
272
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "ec682146-6618-4d72-89cc-b4098b9a890a",
"name": "将邮件草稿添加到 Google Sheet",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
4816,
432
],
"parameters": {
"columns": {
"value": {
"Lead \nID": "={{ $fromAI('Lead__ID', '', 'string') }}",
"Email Body": "={{ $fromAI('Email_Body', '', 'string') }}",
"Email Subject": "={{ $fromAI('Email_Subject', '', 'string') }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1377649974
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w"
}
},
"typeVersion": 4.7
},
{
"id": "e6f1291e-0596-499e-8d9a-4293bcf50384",
"name": "限制工作表获取功能",
"type": "n8n-nodes-base.limit",
"position": [
2000,
640
],
"parameters": {
"maxItems": 3
},
"typeVersion": 1
},
{
"id": "2795d16a-e12c-4331-8eb3-eb6c3c8537fd",
"name": "从 Google Sheet 获取潜在客户",
"type": "n8n-nodes-base.googleSheets",
"position": [
1664,
640
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "Available",
"lookupColumn": "Status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w/edit#gid=0",
"cachedResultName": "Filtered Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/13ksc1pWNwxO8yEAftFzmtUMX5IEY69P8yPS4sc_a31w/edit?usp=drivesdk",
"cachedResultName": "FILTERED LEADS"
}
},
"typeVersion": 4.7
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d5131fde-6088-4498-b67f-54d4e02818c6",
"connections": {
"Wait3": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Send email",
"type": "main",
"index": 0
}
],
[
{
"node": "Send message and wait for response1",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Merge Data and Agent output for",
"type": "main",
"index": 1
},
{
"node": "Send message and wait for response",
"type": "main",
"index": 0
}
]
]
},
"AI Agent3": {
"main": [
[
{
"node": "Send message and wait for response",
"type": "main",
"index": 0
}
]
]
},
"Send email": {
"main": [
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Date & Time": {
"main": [
[
{
"node": "Get Lead from Google Sheet",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Loop Over Items1": {
"main": [
[
{
"node": "Send a text message9",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Agent",
"type": "main",
"index": 0
},
{
"node": "Merge Data and Agent output for",
"type": "main",
"index": 0
},
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
},
"Sent Leads Append": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Filtered Leads Update": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Google Gemini Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model2": {
"ai_languageModel": [
[
{
"node": "AI Agent2",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model3": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model4": {
"ai_languageModel": [
[
{
"node": "AI Agent3",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Google Gemini Chat Model5": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Limit Sheets Get Function": {
"main": [
[
{
"node": "Loop Over Items1",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "AI Agent3",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Get Lead from Google Sheet": {
"main": [
[
{
"node": "Limit Sheets Get Function",
"type": "main",
"index": 0
}
]
]
},
"Add Email Draft to Google Sheet": {
"ai_tool": [
[
{
"node": "AI Agent2",
"type": "ai_tool",
"index": 0
}
]
]
},
"Merge Data and Agent output for": {
"main": [
[
{
"node": "AI Agent2",
"type": "main",
"index": 0
}
]
]
},
"When clicking 'Execute workflow'": {
"main": [
[
{
"node": "Date & Time",
"type": "main",
"index": 0
}
]
]
},
"Send message and wait for response": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Send message and wait for response1": {
"main": [
[
{
"node": "AI Agent3",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
音乐生成工作流
使用 Suno API、Flux、Runway 和 Creatomate 生成 AI 歌曲和音乐视频
Set
Wait
Merge
+16
60 节点Joseph
其他
AIAutomationPro终极RAG聊天机器人v1 n8n市场模板
多语言Telegram RAG聊天机器人,集成监督AI和自动化Google Drive流程
If
Set
Wait
+29
128 节点Daniel Ng
客服机器人
AI驱动的潜在客户抓取(使用APIFY爬虫、Gemini筛选,输出到Google Sheets)
基于AI的潜在客户处理:从Apify使用Gemini和Google Sheets
Wait
Telegram
Http Request
+7
19 节点Ahmed Sherif
内容创作
GPT-4驱动的冷邮件工作流,包含完全定制的3封邮件跟进
使用GPT-4、Mailgun和Supabase自动化个性化冷邮件序列
If
Set
Code
+22
100 节点Paul
客户培育
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作