使用GPT-4o-mini和谷歌表格生成个性化冷邮件
中级
这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Code, GoogleSheets, ManualTrigger, SplitInBatches, OpenAi 等节点。 使用GPT-4o-mini和谷歌表格生成个性化冷邮件
前置要求
- •Google Sheets API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "7ch9fPwlQk0fZlsj",
"meta": {
"instanceId": "10309936d50af530652bf012ffd604ca965cd862fc2c4ceac16a0b773fc15d8e",
"templateCredsSetupCompleted": true
},
"name": "谷歌邮件开场白",
"tags": [],
"nodes": [
{
"id": "8791c4c6-6b15-486e-806d-53f3add6e8a0",
"name": "点击“测试工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-864,
-448
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5509f1fa-a7f5-47b8-8e94-9bc0febb3cb4",
"name": "添加行1",
"type": "n8n-nodes-base.googleSheets",
"position": [
-592,
-448
],
"parameters": {
"options": {
"returnFirstMatch": false
},
"filtersUI": {
"values": [
{
"lookupValue": "Good",
"lookupColumn": "category"
},
{
"lookupValue": "no",
"lookupColumn": "email created"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 2062707747,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg/edit#gid=2062707747",
"cachedResultName": "california"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg/edit?usp=drivesdk",
"cachedResultName": "verified emails"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "dtJiH0StOVAQxDPK",
"name": "Google Sheets account"
}
},
"executeOnce": false,
"typeVersion": 4.5
},
{
"id": "ea570276-818e-46d9-9223-8fbbb0177cf4",
"name": "代码1",
"type": "n8n-nodes-base.code",
"position": [
544,
-432
],
"parameters": {
"jsCode": "// Use $input to access the first item\nconst input = $input.first();\n\n// Get the content safely\nlet rawJson = input.json.message.content;\n\n// Remove backticks and optional \"json\" label\nrawJson = rawJson.replace(/```json|```/g, '').trim();\n\n// Parse the cleaned JSON string\nlet parsed;\ntry {\n parsed = JSON.parse(rawJson);\n} catch (e) {\n throw new Error(\"Invalid JSON format: \" + e.message);\n}\n\n// Return subject and body\nreturn [\n {\n json: {\n subject: parsed.subject,\n body: parsed.body\n }\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "7fc98079-b298-4a40-93a5-4738dc57fb0a",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-384,
-448
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "5194c7af-d5e2-4f06-9252-676967261a68",
"name": "在表格中更新行",
"type": "n8n-nodes-base.googleSheets",
"position": [
768,
-432
],
"parameters": {
"columns": {
"value": {
"body": "={{ $json.body }}",
"email created": "yes",
"email subject": "={{ $json.subject }}",
"EMAIL verified": "={{ $('Add Row1').item.json['EMAIL verified'] }}"
},
"schema": [
{
"id": "EMAIL verified",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "EMAIL verified",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "companyName",
"type": "string",
"display": true,
"required": false,
"displayName": "companyName",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": " description",
"type": "string",
"display": true,
"required": false,
"displayName": " description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website",
"type": "string",
"display": true,
"required": false,
"displayName": "website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "category",
"type": "string",
"display": true,
"required": false,
"displayName": "category",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email subject",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "body",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "body",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email created",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "email created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "sent",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "sent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"EMAIL verified"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 2062707747,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg/edit#gid=2062707747",
"cachedResultName": "california"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/14JjbOiXXakwQrWpjdudiXrNDOVNfVKUGcNoBccgIJxg/edit?usp=drivesdk",
"cachedResultName": "verified emails"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "dtJiH0StOVAQxDPK",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "817537f3-43fe-4c6e-a7a7-ab492c10c8d7",
"name": "邮件撰写器",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
16,
-432
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "=you are cold email writer for dentist.keep your tone friendly and persuasive.\nWe just scraped a series of web pages form google map we will provide you email,company name,description,and social media links. Your task is to take their summaries and turn them into catchy, personalized openers for a cold email campaign to imply that the rest of the campaign is personalized.\n\n now please upgrade it to a chat bot automation that chat bot will put to your website and book oppointment to a user of website and add to your google calender and also to google sheet 24/7 work and also any other ai automation\n"
},
{
"content": "=You'll return your icebreakers in the following JSON format:\n\n{ \"subject\": \"Noticed something on {Shortened company name\\_or person name}’s site\", \"body\": \"I saw your excellent reviews around {specific\\_copmany name\\_service\\_or\\_location}, and really admire how {Shortened Clinic Name} delivers patient-focused care. I help dental clinics install a smart AI chatbot that answers visitor questions, books appointments instantly, and syncs them to Google Calendar or Sheets.turning your website visitors into clients automatically.while you focus on care. Most clinics using this system see 2–3x more bookings in just a few weeks. Schedule your free 10-min demo here: https://letsautomate.us/contact-us/\"\n}\nRules:\n- Write in a spartan/laconic tone of voice.\n- Make sure to use the above format when constructing your icebreakers. We wrote it this way on purpose.\n- Shorten the company name wherever possible (say, \"XYZ\" instead of \"XYZ Agency\"). More examples: \"Love AMS\" instead of \"Love AMS Professional Services\", \"Love Mayo\" instead of \"Love Mayo Inc.\", etc.\n- Do the same with locations. \"San Fran\" instead of \"San Francisco\", \"BC\" instead of \"British Columbia\", etc.\n- For your variables, focus on small, non-obvious things to paraphrase. The idea is to make people think we *really* dove deep into their website, so don't use something obvious. Do not say cookie-cutter stuff like \"Love your company!\" or \"Love your take on marketing!\".\nemail:{{ $json['EMAIL verified'] }}\ncompany name:{{ $json.companyName }}\ndescription:{{ $json[' description'] }}\nwebsite:{{ $json.website }}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "bCUwOYfbFIRDzSHA",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "08e0e555-3fae-4749-89b7-9ba9579fcac6",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
-608
],
"parameters": {
"width": 304,
"height": 144,
"content": "## 添加包含潜在客户邮箱、姓名、业务描述的 Google Sheet"
},
"typeVersion": 1
},
{
"id": "90706e9a-c487-4d5a-9ae5-318dd05b8a58",
"name": "便签 1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-560
],
"parameters": {
"width": 624,
"height": 240,
"content": "## 此邮件撰写器 AI 节点将撰写包含主题和正文的冷邮件"
},
"typeVersion": 1
},
{
"id": "2ca2806c-2aaa-4cde-bdd5-e279f7cb8150",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
512,
-240
],
"parameters": {
"color": 3,
"content": "## 此代码节点将分离正文和主题"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "c6a18dbb-1344-4923-bfe1-f9d40a5e34a4",
"connections": {
"ea570276-818e-46d9-9223-8fbbb0177cf4": {
"main": [
[
{
"node": "5194c7af-d5e2-4f06-9252-676967261a68",
"type": "main",
"index": 0
}
]
]
},
"5509f1fa-a7f5-47b8-8e94-9bc0febb3cb4": {
"main": [
[
{
"node": "7fc98079-b298-4a40-93a5-4738dc57fb0a",
"type": "main",
"index": 0
}
]
]
},
"817537f3-43fe-4c6e-a7a7-ab492c10c8d7": {
"main": [
[
{
"node": "ea570276-818e-46d9-9223-8fbbb0177cf4",
"type": "main",
"index": 0
}
]
]
},
"7fc98079-b298-4a40-93a5-4738dc57fb0a": {
"main": [
[],
[
{
"node": "817537f3-43fe-4c6e-a7a7-ab492c10c8d7",
"type": "main",
"index": 0
}
]
]
},
"5194c7af-d5e2-4f06-9252-676967261a68": {
"main": [
[
{
"node": "7fc98079-b298-4a40-93a5-4738dc57fb0a",
"type": "main",
"index": 0
}
]
]
},
"8791c4c6-6b15-486e-806d-53f3add6e8a0": {
"main": [
[
{
"node": "5509f1fa-a7f5-47b8-8e94-9bc0febb3cb4",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 客户培育, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
自动化高级潜在客户触达与培育活动系统(含AI)
通过GPT-4、LinkedIn和Hunter.io自动化个性化B2B触达
If
Code
Wait
+
If
Code
Wait
30 节点Marth
客户培育
使用Anthropic、GPT-4和谷歌表格生成个性化冷邮件
使用Anthropic、GPT-4和谷歌表格生成个性化冷邮件
If
Set
Code
+
If
Set
Code
24 节点Bhuvanesh R
客户培育
使用GPT-4、Perplexity和WordPress自动发布生成SEO博客内
使用GPT-4、Perplexity和WordPress自动发布生成SEO博客内容
Set
Code
Wordpress
+
Set
Code
Wordpress
26 节点rana tamure
内容创作
基于AI的潜在客户研究与个性化邮件生成(Groq和Google Sheets)
基于AI的潜在客户研究与个性化邮件生成:使用Groq和Google Sheets
If
Code
Google Sheets
+
If
Code
Google Sheets
22 节点ainabler
客户培育
通过网页爬取、GPT-4o和WhatsApp自动化电话营销
通过网页爬取、GPT-4o和WhatsApp自动化电话营销
Set
Code
Webhook
+
Set
Code
Webhook
48 节点Khaisa Studio
客户培育
B2B 外联自动化:LinkedIn 到邮件序列
B2B 外联自动化:使用 GPT、AnyMailFinder 和 Perplexity 从 LinkedIn 到邮件序列
If
Set
Code
+
If
Set
Code
25 节点LukaszB
客户培育
工作流信息
难度等级
中级
节点数量9
分类2
节点类型6
作者
rana tamure
@tamureI'm the founder and CEO of LetsAutomate, an agency dedicated to building smart scalable automation systems using n8n. With deep hands on experience, I design workflows that power lead generation, AI agents, scheduling CRM syncs and more all built entirely in n8n.
外部链接
在 n8n.io 查看 →
分享此工作流