使用AI研究生成个性化B2B外联邮件
高级
这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 17 个节点。主要使用 Limit, HttpRequest, GoogleSheets, ManualTrigger, SplitInBatches 等节点。 通过Tavily研究和OpenRouter LLM创建个性化B2B外联邮件
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
使用的节点 (17)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "4IHvU7TL8cJuEdRh",
"meta": {
"instanceId": "15d6057a37b8367f33882dd60593ee5f6cc0c59310ff1dc66b626d726083b48d",
"templateCredsSetupCompleted": true
},
"name": "使用 AI 研究生成个性化 B2B 外联邮件",
"tags": [],
"nodes": [
{
"id": "47326b63-fedc-45c8-acaa-392f49fa7ac3",
"name": "将潜在客户添加到 Instantly AI",
"type": "n8n-nodes-base.httpRequest",
"position": [
1232,
-80
],
"parameters": {
"url": "https://api.instantly.ai/api/v2/leads",
"method": "POST",
"options": {},
"jsonBody": "={\n \"campaign\": \"YOUR_CAMPAIGN_ID\",\n \"email\": \"{{ $('Loop Over Items').item.json.email }}\",\n \"full_name\": \"{{ $('Loop Over Items').item.json.full_name }}\",\n \"company_name\": \"{{ $('Loop Over Items').item.json.company_name }}\",\n \"custom_variables\": {\n \"custom_body\": \"{{ $('Generate Outreach Message').item.json.text }}\"\n }\n\n }",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_TOKEN_HERE"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "357f24f2-50ce-4100-9f09-ed8e1dcaf29a",
"name": "将公司信息添加到 Google 表格",
"type": "n8n-nodes-base.googleSheets",
"onError": "continueRegularOutput",
"position": [
928,
-208
],
"parameters": {
"columns": {
"value": {
"status": "complete",
"company_name": "={{ $('Limit(Test)').item.json.company_name }}",
"Key Offerings": "={{ $('Company Research').item.json.output.keyOfferings }}",
"Company Summary": "={{ $('Company Research').item.json.output.comprehensiveSummary }}",
"Outreach Message": "={{ $json.text }}",
"Company Background": "={{ $('Company Research').item.json.output.companyOverview }}",
"Recent Company News": "={{ $('Company Research').item.json.output.recentWebsiteNews }}"
},
"schema": [
{
"id": "date",
"type": "string",
"display": true,
"required": false,
"displayName": "date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "company_name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "company_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "department",
"type": "string",
"display": true,
"required": false,
"displayName": "department",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "job_title",
"type": "string",
"display": true,
"required": false,
"displayName": "job_title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "full_name",
"type": "string",
"display": true,
"required": false,
"displayName": "full_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "postal_code",
"type": "string",
"display": true,
"required": false,
"displayName": "postal_code",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "mobile_phone_number",
"type": "string",
"display": true,
"required": false,
"displayName": "mobile_phone_number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone_number",
"type": "string",
"display": true,
"required": false,
"displayName": "phone_number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "fax_number",
"type": "string",
"display": true,
"required": false,
"displayName": "fax_number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "website_url",
"type": "string",
"display": true,
"required": false,
"displayName": "website_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Company Background",
"type": "string",
"display": true,
"required": false,
"displayName": "Company Background",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Recent Company News",
"type": "string",
"display": true,
"required": false,
"displayName": "Recent Company News",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Key Offerings",
"type": "string",
"display": true,
"required": false,
"displayName": "Key Offerings",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Company Summary",
"type": "string",
"display": true,
"required": false,
"displayName": "Company Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Outreach Message",
"type": "string",
"display": true,
"required": false,
"displayName": "Outreach Message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"company_name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4/edit#gid=0",
"cachedResultName": "BusinessCardList"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4/edit?usp=drivesdk",
"cachedResultName": "Demo"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja0tGvoFNudNwqMM",
"name": "md83 H2"
}
},
"typeVersion": 4.5
},
{
"id": "c00b9130-4f3f-41c1-a670-77098f59c804",
"name": "结构化输出解析器 1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
448,
-32
],
"parameters": {
"jsonSchemaExample": "{\n \"companyOverview\": \"String: 1-2 sentence description from website. (Source: ...)\",\n \"recentWebsiteNews\": \"String: Bullet points of recent website news/blog posts. (Source: ...)\",\n \"keyOfferings\": \"String: Bullet points of key products/services. (Source: ...)\",\n\"comprehensiveSummary\": \"String: 1-2 sentence synthesis of companyOverview, recentWebsiteNews, keyOfferings, and thirdPartySentiment\"\n}"
},
"typeVersion": 1.2
},
{
"id": "2b52baa3-d06f-4427-8315-9b2fc62322eb",
"name": "生成外联消息",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"onError": "continueRegularOutput",
"position": [
608,
-208
],
"parameters": {
"text": "=name: {{ $('Loop Over Items').item.json.full_name }}\n\ncompany name: {{ $('Loop Over Items').item.json.company_name }}\n\ncompany background: {{ $json.output.comprehensiveSummary }}",
"messages": {
"messageValues": [
{
"message": "=You are an Expert B2B Cold Outreach Email Drafter. \nYour objective is to compose a concise, professional, and highly personalized email body (target 100–150 words) to introduce **YOUR_COMPANY_NAME’s AI training and automation services** to a business prospect.\n\n---\n\n**Your Company:** YOUR_COMPANY_NAME \n**Your Offering:** We provide AI talent development and automation training programs. In particular, we conduct AI training that enables even non-engineers to learn workflow automation through no-code methods.\n\n---\n\n**Input Data Provided:** \nYou will receive the following information about the prospect and their company:\n* `name`: The prospect's name \n* `company name`: The name of the prospect's company \n* `company background`: A summary of the company's background \n\n---\n\n**Drafting Instructions:**\n\n1. **Identify the Strongest Hook:** \n * Analyze the `company background` input carefully. \n * Look for the *single most relevant and compelling detail* to use as a personalized opening. \n * Prioritize items such as: \n - Recent company news or announcements (e.g., funding, launch, partnership) \n - A key offering or business focus that aligns with potential AI applications \n - A technical or operational aspect that could benefit from automation or AI training \n * Choose the hook that allows a natural transition to the value of AI training for *this specific prospect* in *their specific company*.\n\n2. **Structure & Content:** \n * **Opening (Personalized Hook):** Start by acknowledging the company or referencing the specific hook you identified (1 sentence). \n * **Introduction:** Briefly introduce YOUR_COMPANY_NAME and mention that you offer AI training and automation programs (1 sentence). \n * **Value Proposition:** Explain *why* AI training might be relevant *specifically* to their company, based on the hook or company background (1–2 sentences). Focus on benefits like efficiency, productivity, innovation, or growth. \n * **Call to Action (Soft):** Suggest a light, non-intrusive next step (e.g., “Would exploring how AI could apply to your operations be valuable?” or “Would you be open to a short conversation next week?”).\n\n3. **Tone:** \n * Professional, concise, respectful, and confident. \n * Avoid jargon or unnecessary complexity. \n * Maintain a helpful and value-oriented tone.\n\n4. **Constraints:** \n * Word count: strictly aim for 100–150 words. \n * Output language: **English only.** \n * Use only the information provided in the input fields — do not invent details. \n * If the company background lacks strong details, focus on general AI training benefits relevant to typical business operations. \n * Return **only** the drafted email body as plain text — no subject line, greeting (“Hi [Name],”), or signature (“Best,”). \n\n---\n\n**Output Format:** \nReturn ONLY the drafted email body as a single English text string. \nDo not include a subject line, greeting, or closing signature. \n\n---\n\n**Example Output:** \n\nWe at YOUR_COMPANY_NAME provide AI talent development and automation training designed to help teams improve efficiency and adopt no-code workflow solutions. Based on your company’s focus on digital transformation and process innovation, we believe structured AI training could provide tangible value. By empowering even non-technical employees to automate routine workflows, your organization could streamline operations and reduce manual effort. This approach not only enhances productivity but also frees your team to focus on higher-impact initiatives. Would you be open to a brief discussion about how our AI training could support your company’s goals?\n"
}
]
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "7f2b9a2f-8de7-42d6-b725-9d35e0a231ed",
"name": "公司研究",
"type": "@n8n/n8n-nodes-langchain.agent",
"onError": "continueRegularOutput",
"position": [
256,
-208
],
"parameters": {
"text": "=company: {{ $json.company_name }}\n\ncompany website: {{ $json.website_url }}\n\n\n",
"options": {
"systemMessage": "=You are a Company Information Synthesizer. \nYour primary goal is to extract key information about a target company by leveraging the `tavilysearch` tool, prioritizing content likely originating from the company's official website. \nYour secondary goal is to check recent news or updates about the company from credible sources when available.\n\n---\n\n**CORE DIRECTIVES:**\n1. **TOOL USAGE:** You MUST ONLY use the `tavilysearch` tool for information gathering. No other tools or external data sources may be used.\n2. **PRIMARY SOURCE FOCUS (Website):** Prioritize finding and summarizing information directly presented on the company’s official website — especially pages like “About Us,” “News,” “Press Releases,” “Products,” or “Services.” Use Tavily to locate these pages or relevant summaries.\n3. **SECONDARY SOURCE (Recent Updates ONLY):** When possible, use Tavily to find recent updates or press coverage about the company (e.g., partnerships, launches, or expansion news). Avoid unverified or opinion-based sources.\n4. **RECENCY:** For company news and updates, focus on content from the last 12–18 months.\n5. **CONCISENESS:** Keep summaries factual, short, and objective.\n6. **ACCURACY:** Do not invent or assume information that is not explicitly found in your search results.\n\n---\n\n**RESEARCH FOCUS (Guide for using Tavily):**\nUse Tavily to gather concise factual information for each category:\n\n* **Core Business:** Search for `\"[Company Name] About Us\"`, `\"[Company Name] Mission\"`, or similar queries to identify what the company does and its core purpose.\n* **Recent Website News:** Search for `\"[Company Name] news\"`, `\"[Company Name] press release\"`, or `\"[Company Name] blog\"` to identify recent official announcements.\n* **Products/Services:** Search for `\"[Company Name] products\"` or `\"[Company Name] services\"` to list main offerings or product categories.\n\n---\n\n**OUTPUT FORMAT:**\nYour final response MUST be a **single valid JSON object** containing only the following four keys. \nEach value should be concise, factual, and where possible, include a short citation (link or reference to the company website).\n\n```json\n{\n \"companyOverview\": \"[1–2 sentences summarizing what the company does and its mission, primarily from its official website. Example: 'ABC Corp is a technology company specializing in cloud infrastructure solutions.' (Source: Company Website via Tavily)]\",\n \"recentWebsiteNews\": \"[• A bullet point describing a recent announcement, update, or press release. Include a source link if possible. (Source: Company Website News/Blog)\\n- Additional bullet if applicable.]\",\n \"keyOfferings\": \"[• A bullet point listing a core product or service. (Source: Company Website via Tavily)\\n- Additional bullet if applicable.]\",\n \"comprehensiveSummary\": \"[1–2 sentences synthesizing the overall company profile, combining the overview, news, and offerings into a cohesive summary.]\"\n}\n```\n\n---\n\n**HANDLING NO RESULTS:**\nIf `tavilysearch` finds no relevant information for a specific field, output the following text for that key: \n`\"No relevant [Category Name] found via Tavily search.\"` \n(Example: `\"No relevant recent website news found via Tavily search.\"`)\n\nAll responses must remain in valid JSON format and must not include any commentary, markdown, or explanations outside of the JSON structure.\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "020b5c79-829d-4de0-b334-e8d1dc246bb4",
"name": "Tavily",
"type": "@tavily/n8n-nodes-tavily.tavilyTool",
"position": [
336,
-32
],
"parameters": {
"query": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Query', ``, 'string') }}",
"options": {
"time_range": "year",
"max_results": 3,
"search_depth": "basic"
}
},
"credentials": {
"tavilyApi": {
"id": "tb0nQRxUD3kv1KUd",
"name": "Tavily account Click to start"
}
},
"typeVersion": 1
},
{
"id": "d19473e0-f4d5-410d-b3e8-15225ee8d6c9",
"name": "OpenRouter 聊天模型2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
224,
-32
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "D1q69WNrqGh2Tmie",
"name": "OpenRouter 使える"
}
},
"typeVersion": 1
},
{
"id": "df1ad316-e343-4bbf-8299-f00a6c43b4f6",
"name": "OpenRouter 聊天模型3",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
608,
-32
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "D1q69WNrqGh2Tmie",
"name": "OpenRouter 使える"
}
},
"typeVersion": 1
},
{
"id": "36901dc7-1d07-48d7-9eff-de4ea41aec5c",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"onError": "continueRegularOutput",
"position": [
0,
-128
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "18d2c0e4-c6ee-4ddb-b46c-1492b6fd25f2",
"name": "当点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-672,
-128
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b2be533c-4393-4dba-a988-47559d43dd0b",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
192,
-352
],
"parameters": {
"color": 2,
"width": 896,
"height": 320,
"content": "## ② 获取公司信息并生成外联消息"
},
"typeVersion": 1
},
{
"id": "dc5299f5-7b23-415f-9e98-847e26c2bfc9",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-768,
-272
],
"parameters": {
"width": 912,
"height": 352,
"content": "## ① 名片数据提取"
},
"typeVersion": 1
},
{
"id": "467c675b-d753-4f09-90f6-d84adc348086",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1152,
-272
],
"parameters": {
"color": 3,
"width": 256,
"height": 400,
"content": "## ③ 将潜在客户注册到 instantlyAI"
},
"typeVersion": 1
},
{
"id": "ebd00e04-5502-414b-8ed7-e76c50800011",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
-432
],
"parameters": {
"color": 4,
"width": 848,
"height": 512,
"content": "## 使用 AI 研究生成个性化 B2B 外联邮件 (Google Sheets → AI → instantlyAI)"
},
"typeVersion": 1
},
{
"id": "041d5602-fd2a-4e7c-be83-7a18abdfb226",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
64
],
"parameters": {
"color": 4,
"width": 848,
"height": 224,
"content": "**使用场景**"
},
"typeVersion": 1
},
{
"id": "60dcab6b-14c4-46f4-a2a0-5fc09bace828",
"name": "Limit (测试)",
"type": "n8n-nodes-base.limit",
"position": [
-224,
-128
],
"parameters": {
"maxItems": 10
},
"typeVersion": 1
},
{
"id": "9368676a-b904-4f30-8f53-196c794f7f9c",
"name": "获取名片数据提取",
"type": "n8n-nodes-base.googleSheets",
"position": [
-448,
-128
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "ready",
"lookupColumn": "status"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4/edit#gid=0",
"cachedResultName": "BusinessCardList"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1rYf2kqfmMRUtpFAb5YdhOcsvGg8Gr1CTbO-lvrd48m4/edit?usp=drivesdk",
"cachedResultName": "Demo"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Ja0tGvoFNudNwqMM",
"name": "md83 H2"
}
},
"typeVersion": 4.7
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "70df54f5-644e-46c1-b25a-faf603362cac",
"connections": {
"Tavily": {
"ai_tool": [
[
{
"node": "Company Research",
"type": "ai_tool",
"index": 0
}
]
]
},
"Limit(Test)": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Company Research",
"type": "main",
"index": 0
}
]
]
},
"Company Research": {
"main": [
[
{
"node": "Generate Outreach Message",
"type": "main",
"index": 0
}
]
]
},
"OpenRouter Chat Model2": {
"ai_languageModel": [
[
{
"node": "Company Research",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenRouter Chat Model3": {
"ai_languageModel": [
[
{
"node": "Generate Outreach Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Add Lead to Instantly AI": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Generate Outreach Message": {
"main": [
[
{
"node": "Add Company Info to Google Sheet",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Company Research",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Add Company Info to Google Sheet": {
"main": [
[
{
"node": "Add Lead to Instantly AI",
"type": "main",
"index": 0
}
]
]
},
"Get Business card data extraction": {
"main": [
[
{
"node": "Limit(Test)",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Get Business card data extraction",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 客户培育, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
B2B 外联自动化:LinkedIn 到邮件序列
B2B 外联自动化:使用 GPT、AnyMailFinder 和 Perplexity 从 LinkedIn 到邮件序列
If
Set
Code
+11
25 节点LukaszB
客户培育
基于LinkedIn数据通过OpenRouter使用Claude 3.7生成个性化销售邮件
基于LinkedIn数据通过OpenRouter使用Claude 3.7生成个性化销售邮件
If
Set
Gmail
+10
23 节点Adam Janes
客户培育
Apollo 数据抓取与触达流程 1 ✅
使用 Apollo、AI 解析和定时邮件跟进自动生成潜在客户
If
Code
Wait
+13
39 节点Deniz
内容创作
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
使用OpenAI-Gemini创建Dev.to文章 - AI生成带图片内容
使用OpenAI/Gemini创建Dev.to文章 - AI生成带图片内容
Set
Limit
Split Out
+13
30 节点LukaszB
内容创作
基于AI的潜在客户研究与个性化邮件生成(Groq和Google Sheets)
基于AI的潜在客户研究与个性化邮件生成:使用Groq和Google Sheets
If
Code
Google Sheets
+7
22 节点ainabler
客户培育