我的工作流5
高级
这是一个Sales, AI, Marketing领域的自动化工作流,包含 37 个节点。主要使用 If, Set, Code, Filter, SplitOut 等节点,结合人工智能技术实现智能自动化。 使用AI邮件个性化的自动化LinkedIn潜在客户生成(未完成)
前置要求
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (37)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "GYu58JC0HXxXzg6c",
"meta": {
"instanceId": "95a1299fb2b16eb2219cb044f54e72c2d00dcd2c72efe717b3c308d200f29927"
},
"name": "我的工作流 5",
"tags": [],
"nodes": [
{
"id": "2840fe16-c0dc-48d9-abb1-538ea1fa8a6a",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-1640,
700
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "deaacb0e-a772-4f6c-861b-c7bae802ce5e",
"name": "提取域名",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-1400,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "GPT-4.1-MINI"
},
"options": {
"temperature": 0.2
},
"messages": {
"values": [
{
"role": "system",
"content": "Your task is to extract only the main domain from a URL. Example: for 'http://www.example.com/home', return 'example.com'. For 'https://subdomain.site.co.uk/login', return 'site.co.uk'. Reply only with the domain, without any comment."
},
{
"content": "=Extract the main domain from the following URL: {{ $json.Website }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "86633b2a-2f58-480c-b850-31d1a367bffb",
"name": "查找员工",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1060,
700
],
"parameters": {
"url": "https://api.ghostgenius.fr/v2/private/sales-navigator",
"options": {},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "current_company",
"value": "={{ $('Loop Over Items').item.json.ID }}"
},
{
"name": "account_id",
"value": "={{ $('Set Variables').item.json['account_id (Ghost Genius API)'] }}"
},
{
"name": "page",
"value": "1"
},
{
"name": "keywords",
"value": "={{ $('Set Variables').item.json['Target Employees'] }}"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "czut032YCs6adYBp",
"name": "Ghost Genius - Lead Machine LK"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"waitBetweenTries": 2000
},
{
"id": "c781f307-9165-4869-b2ef-87347a5df87a",
"name": "检查找到的档案",
"type": "n8n-nodes-base.if",
"position": [
-880,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "62313990-929a-4859-aab7-0efe2f434dc9",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.total }}",
"rightValue": 3
}
]
}
},
"typeVersion": 2.2
},
{
"id": "dbd1c384-5f47-47d3-a61d-ee2175ca089e",
"name": "拆分档案",
"type": "n8n-nodes-base.splitOut",
"position": [
-680,
700
],
"parameters": {
"options": {},
"fieldToSplitOut": "data"
},
"typeVersion": 1
},
{
"id": "aff3a2da-6288-446c-8f5d-ca6fb216d176",
"name": "获取个人资料详情",
"type": "n8n-nodes-base.httpRequest",
"position": [
-480,
700
],
"parameters": {
"url": "https://api.ghostgenius.fr/v2/profile",
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": 2000
}
}
},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "={{ $json.url }}"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "XdFg4wGkcxwRPUMo",
"name": "Header Auth account 4"
}
},
"typeVersion": 4.2
},
{
"id": "13a8de85-3069-4f64-9479-6b1aa0548af7",
"name": "保留相关信息",
"type": "n8n-nodes-base.code",
"position": [
-280,
700
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const simplifiedItem = {\n id: $json?.id || null,\n url: $json?.url || null,\n first_name: $json?.first_name || null,\n last_name: $json?.last_name || null,\n headline: $json?.headline || null,\n position: $json?.experiences?.[0]?.position || null,\n position_description: $json?.experiences?.[0]?.description || null,\n company_website: $('Extract Domain').item.json.message.content.domain || null,\n skills: $json?.skills || []\n};\nreturn simplifiedItem;"
},
"typeVersion": 2
},
{
"id": "f054f4dd-3493-473a-b35b-bbaf0e4795d9",
"name": "合并个人资料",
"type": "n8n-nodes-base.aggregate",
"position": [
-80,
700
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "6aac2d3c-74ed-4555-bcb8-5b8eb016bac1",
"name": "选择前3名",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
100,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-3.5-turbo-0125",
"cachedResultName": "GPT-3.5-TURBO-0125"
},
"options": {
"temperature": 0.1
},
"messages": {
"values": [
{
"role": "system",
"content": "=You are an expert in identifying decision-makers from LinkedIn profiles. Your task is to SELECT EXACTLY 3 PROFILES from the list provided below.\nThese profiles should be the most relevant people to contact about {{ $('Set Variables').item.json['Your product'] }}.\n\nIdeal candidates:\n- Have responsibility for decisions related to {{ $('Set Variables').item.json['Interest'] }}\n- Are in roles that would engage with solutions like ours\n- Have authority to make purchasing decisions\n\nThe BEST profiles match these criteria:\n- Directors or Managers in relevant departments\n- Business Development leaders\n- C-suite executives with decision-making power\n\nPrioritize profiles in this order:\n- Direct roles related to {{ $('Set Variables').item.json['Interest'] }}\n- Decision-makers with budget authority\n- Senior executives with relevant responsibilities\n\nCRITICAL INSTRUCTION: YOU MUST RETURN EXACTLY 3 PROFILES. This is the most important requirement.\nIf there aren't 3 perfect matches, still select 3 profiles that are closest to the criteria.\n\nFormat your response as follows:\n- Include ONLY the 3 selected profiles\n- Keep the original JSON format for each profile\n- Do not add any explanations, comments, or additional text\n- Maintain all properties and exact structure of the input JSON objects\n\nExpected output format:\nfirst_profile:\nsecond_profile:\nthird_profile:"
},
{
"content": "=Here are the profiles to analyze: {{ $json.data.toJsonString() }}\n\nReturn the 3 best profiles.\n\nExpected output format JSON:\nfirst_profile:\nsecond_profile:\nthird_profile"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "b54d1798-498b-4570-b0a2-b630aa9f758c",
"name": "拆分输出",
"type": "n8n-nodes-base.splitOut",
"position": [
440,
700
],
"parameters": {
"options": {},
"fieldToSplitOut": "message.content"
},
"typeVersion": 1
},
{
"id": "d1f5debc-649e-48d4-a030-fcc7fac3d9cb",
"name": "生成邮件",
"type": "n8n-nodes-base.code",
"position": [
720,
700
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Function to clean names by removing accents and special characters\nconst cleanName = (str) => {\n return str.toLowerCase()\n .normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\") // Remove accents\n .replace(/[^a-z0-9]/g, ''); // Remove special characters\n};\n\n// Clean the first and last name from the input JSON\nconst firstName = cleanName($json.first_name);\nconst lastName = cleanName($json.last_name);\n\n// Method 1 - Get the domain from the OpenAI3 node\n// This accesses the domain property from the previous node's output\nconst domain = $('Extract Domain').item.json.message.content.domain;\n\n// Generate various potential email formats using the first name, last name and domain\nconst emailFormats = [\n `${firstName}.${lastName}@${domain}`, // format: firstname.lastname@domain\n `${firstName}${lastName}@${domain}`, // format: firstnamelastname@domain\n `${firstName}@${domain}`, // format: firstname@domain\n `${firstName[0]}.${lastName}@${domain}`, // format: f.lastname@domain\n `${firstName[0]}${lastName}@${domain}`, // format: flastname@domain\n];\n\n// Return a new object containing all original properties \n// plus the potential emails and extracted domain\nreturn {\n ...$json, // Keep all properties from the original item\n potential_emails: emailFormats, // Add the generated email formats\n extracted_domain: domain // Add the extracted domain for debugging purposes\n};"
},
"typeVersion": 2
},
{
"id": "1854e2b9-fd00-4f24-b8f4-81dadb6f66f6",
"name": "拆分邮件",
"type": "n8n-nodes-base.splitOut",
"position": [
900,
700
],
"parameters": {
"options": {},
"fieldToSplitOut": "potential_emails"
},
"typeVersion": 1
},
{
"id": "19224753-9ddd-4f40-b5ca-b84fa86d8dea",
"name": "验证邮件",
"type": "n8n-nodes-base.httpRequest",
"position": [
1080,
700
],
"parameters": {
"url": "https://api.millionverifier.com/api/v3/",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "api",
"value": "={{ $('Set Variables').item.json['api_key MillionVerifier (millionverifier.com)'] }}"
},
{
"name": "email",
"value": "={{ $json.potential_emails }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "87e92aa9-a3cb-4624-aee6-5f1c01d3af33",
"name": "合并结果",
"type": "n8n-nodes-base.aggregate",
"position": [
1260,
700
],
"parameters": {
"include": "specifiedFields",
"options": {},
"aggregate": "aggregateAllItemData",
"fieldsToInclude": "email, quality"
},
"typeVersion": 1
},
{
"id": "ea9af1be-ba6a-42dc-8724-2620448b5176",
"name": "筛选有效邮箱",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1440,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "o3-mini",
"cachedResultName": "O3-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You receive a list of emails and you must return those with quality=good. Be careful not to return emails with quality 'risky'. \n\nIf multiple good emails belong to the same person, return one email per person. If no email is good, return 'No email found'.\n\nYou must return the emails with the corresponding LinkedIn profile for each email.\n\nHere is the expected JSON structure (if at least one email is 'good') for each email:\n\nemail:\nquality:\nurl:\nid:\nfirst_name:\nlast_name:\nheadline:\ncurrent_position:\nposition_description:"
},
{
"content": "=Here is the list of emails: {{ $json.data.toJsonString() }}\n\nHere is the list of LinkedIn profiles: {{ $('Select Top 3 ').item.json.message.content.toJsonString() }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "6178af94-1885-47c9-9c68-f1fab9c01568",
"name": "检查邮件有效性",
"type": "n8n-nodes-base.if",
"position": [
1780,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "8620855f-065c-42fb-b5f5-10d254afeede",
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json.message.content.result }}",
"rightValue": "No email found"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b74b3fe6-adb7-40f4-8e18-6beda82c2223",
"name": "分离",
"type": "n8n-nodes-base.splitOut",
"position": [
1980,
700
],
"parameters": {
"options": {},
"fieldToSplitOut": "message.content.results"
},
"typeVersion": 1
},
{
"id": "2cd367fb-c781-4e5e-97d7-8af921a5addf",
"name": "获取个人资料帖子",
"type": "n8n-nodes-base.httpRequest",
"position": [
2260,
700
],
"parameters": {
"url": "https://api.ghostgenius.fr/v2/profile/posts",
"options": {
"batching": {
"batch": {
"batchSize": 1,
"batchInterval": 2000
}
}
},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "url",
"value": "={{ $json.url }}"
},
{
"name": "page",
"value": "1"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "XdFg4wGkcxwRPUMo",
"name": "Header Auth account 4"
}
},
"typeVersion": 4.2
},
{
"id": "4af2bef9-ce0e-4d7c-9199-7b6c3d302ca2",
"name": "创建个性化",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2480,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {
"temperature": 0.5
},
"messages": {
"values": [
{
"role": "system",
"content": "=You are a cold email customization specialist. Your role is to CREATE A SETUP for ANOTHER AI that will later write personalized cold emails to prospects.\n\nPRODUCT: {{ $('Set Variables').item.json['Your product'] }}\nTARGET AUDIENCE: {{ $('Set Variables').item.json['Target Audience'] }}\n\nYOUR TASK:\n1. Analyze the prospect information provided\n2. Identify ONE specific personalization angle that connects the prospect's needs/challenges to our {{ $('Set Variables').item.json['Your product'] }}\n3. Create a structured setup with personalization recommendations (NOT a complete email)\n\nPERSONALIZATION GUIDELINES:\n- Focus on how the {{ $('Set Variables').item.json['Your product'] }} could benefit their operations\n- Identify relevant pain points from their profile that our {{ $('Set Variables').item.json['Your product'] }} could solve\n- Note specific content from their recent activity (only use posts less than 3 months old)\n- Current date: {{ new Date() }}\n- DO NOT suggest using the {{ $('Set Variables').item.json['Your product'] }} for {{ $('Set Variables').item.json['Irrelevant Use Case '] }} (not relevant)\n\nOUTPUT FORMAT:\nReturn your analysis in this structured format:\n---SETUP FOR EMAIL AI---\nPROSPECT: [Name and position]\nCOMPANY: [Company name]\nKEY INSIGHT: [One specific insight about the prospect/company]\nPERSONALIZATION ANGLE: [The specific personalization angle to use]\nVALUE PROPOSITION: [How our product addresses their specific needs]\n\nRemember: You are NOT writing the email. You are creating a setup for ANOTHER AI that will craft the final email."
},
{
"content": "=Prospect information :\n\nFirst name: {{ $('Split Out').item.json.first_name }},\nHeadline: {{ $('Split Out').item.json.headline }},\nCurrent position: {{ $('Split Out').item.json.current_position }},\nPosition description: {{ $('Split Out').item.json.position_description }},\nPost 1 (posted to {{ $json.data[0].published_at }}, is reshare?{{ $json.data[0].is_reshare }} ): {{ $json.data[0].text.content }},\nPost 2 (posted to {{ $json.data[1].published_at }}, is reshare?{{ $json.data[1].is_reshare }}): \n{{ $json.data[1].text.content }},\nPost_3 (posted to {{ $json.data[2].published_at }}, is reshare?{{ $json.data[2].is_reshare }}): {{ $json.data[1].text.content }},\nCompany: {{ $('Loop Over Items').item.json.Name }},\nCompany description: {{ $('Loop Over Items').item.json.Summary }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "4fdd3ee3-8320-43f6-9723-47431ebd96b0",
"name": "生成电子邮件消息",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2860,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {
"temperature": 0.5
},
"messages": {
"values": [
{
"role": "system",
"content": "=You are a specialist in writing cold emails with high response rates.\n\nIMPORTANT: You are creating email templates that will be used by someone else, not communicating directly with prospects.\n\nYour mission is to write 3 emails. \nIt's important that each email is not written to sell but only to attract attention and get a response.\n\nHere are the rules to follow for writing each email:\n- The email must be very short 100 words maximum)\n- It must be written in {{ $('Set Variables').item.json['Email Language'] }}\n- Use simple words\n- Don't speak with professional language, be direct and go straight to the point. The tone is informal and direct. Be upbeat.\n- Talk in the first person as if you were a simple {{ $('Set Variables').item.json['Sender Role (your role)'] }} who created a {{ $('Set Variables').item.json['Your product'] }}\n- Don't compliment the prospect\n\nHere is the structure of the email (in order):\n- You greet the prospect with their first name\n- A personalized sentence using the prospect's information that shows you've done research on them\n- A sentence explaining that you've created a {{ $('Set Variables').item.json['Your product'] }} ({{ $('Set Variables').item.json['Product Benefits'] }}) and briefly why it might be interesting for their company.\n- A CTA in the form of a question oriented positively that must be very easy for the prospect to answer. It should not appear salesy and must provoke their curiosity.\n- No greeting\n\nThe goal of this first email is not to sell the product but just to get their attention to obtain a response."
},
{
"content": "=Here is the information about the prospect and his company:\n\nContact's first name: {{ $('Split Out').item.json.first_name }}\n\nContact's company: {{ $('Loop Over Items').item.json.Name }}\n\nRelevant information for personalization:{{ $json.message.content.toJsonString() }}\n\nReturn only a JSON (no Markdown) with the three emails:\n1. initial_email\n2. first_follow_up (3 days after)\n3. second_follow_up (5 days after the first)\n\nFormat the emails with appropriate line breaks for readability. Do not include subject lines."
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "4dbbf284-d32f-404e-805a-7c4d0b69fd5a",
"name": "员工数量不足",
"type": "n8n-nodes-base.googleSheets",
"position": [
-680,
960
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Loop Over Items').item.json.ID }}",
"State": "Not enough employees"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "LinkedIn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "State",
"type": "string",
"display": true,
"required": false,
"displayName": "State",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "id",
"value": "=gid=0"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y8D8KsfgZCZmP2Vh",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "c02c6ce7-73a0-4bff-8c13-8baa7f424a00",
"name": "未找到邮件",
"type": "n8n-nodes-base.googleSheets",
"position": [
1980,
960
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Loop Over Items').item.json.ID }}",
"State": "No mail founded"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "LinkedIn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "State",
"type": "string",
"display": true,
"required": false,
"displayName": "State",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10lxvwdeCf7vrAuWsNRGIsSTICEI3z-SUCDVHr8XzAYQ/edit#gid=0",
"cachedResultName": "Companies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y8D8KsfgZCZmP2Vh",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "809d7e65-76dc-4aa6-bb4c-e0de2df59098",
"name": "找到潜在客户",
"type": "n8n-nodes-base.googleSheets",
"position": [
3800,
700
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Loop Over Items').item.json.ID }}",
"State": "Lead(s) found"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Website",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Website",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "LinkedIn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Score",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "State",
"type": "string",
"display": true,
"required": false,
"displayName": "State",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10lxvwdeCf7vrAuWsNRGIsSTICEI3z-SUCDVHr8XzAYQ/edit#gid=0",
"cachedResultName": "Companies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y8D8KsfgZCZmP2Vh",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "3c418efe-9e43-4c7a-8997-f658959d2d02",
"name": "添加潜在客户",
"type": "n8n-nodes-base.googleSheets",
"position": [
3600,
700
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('Split Out').item.json.id }}",
"Email": "={{ $('Split Out').item.json.email }}",
"Mail 1": "={{ $('Generate Emails Messages').item.json.message.content.initial_email }}",
"Mail 2": "={{ $('Generate Emails Messages').item.json.message.content.first_follow_up }}",
"Mail 3": "={{ $('Generate Emails Messages').item.json.message.content.second_follow_up }}",
"Tagline": "={{ $('Split Out').item.json.headline }}",
"Lastname": "={{ $('Split Out').item.json.last_name }}",
"LinkedIn": "={{ $('Split Out').item.json.url }}",
"Firstname": "={{ $('Split Out').item.json.first_name }}",
"Subject 1": "={{ $json.message.content.subject_1 }}",
"Subject 2": "={{ $json.message.content.subject_2 }}",
"Subject 3": "={{ $json.message.content.subject_3 }}",
"Company name": "={{ $('Loop Over Items').item.json.Name }}",
"Current Position": "={{ $('Split Out').item.json.current_position }}"
},
"schema": [
{
"id": "Firstname",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Firstname",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Lastname",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Lastname",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "LinkedIn",
"type": "string",
"display": true,
"required": false,
"displayName": "LinkedIn",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ID",
"type": "string",
"display": true,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Tagline",
"type": "string",
"display": true,
"required": false,
"displayName": "Tagline",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Company name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Company name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Current Position",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Current Position",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Mail 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Mail 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Mail 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Mail 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Mail 3",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Mail 3",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject 1",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Subject 1",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject 2",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Subject 2",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject 3",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Subject 3",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1352562819,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/10lxvwdeCf7vrAuWsNRGIsSTICEI3z-SUCDVHr8XzAYQ/edit#gid=1352562819",
"cachedResultName": "Leads"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y8D8KsfgZCZmP2Vh",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "2fe1ed3a-3a5d-4d2b-9b1d-aa85eae0fdec",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2700,
420
],
"parameters": {
"color": 6,
"width": 920,
"height": 460,
"content": "## 数据恢复"
},
"typeVersion": 1
},
{
"id": "bfce76ea-8555-4ed5-bb94-626e6f795b0b",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1720,
420
],
"parameters": {
"color": 4,
"width": 2320,
"height": 460,
"content": "## 查找并选择合适的员工"
},
"typeVersion": 1
},
{
"id": "968f2963-bf80-4c95-86ac-ea94466df840",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-840,
880
],
"parameters": {
"color": 3,
"width": 420,
"height": 260,
"content": "## 退出"
},
"typeVersion": 1
},
{
"id": "7b30a149-a8f9-4653-b744-3d9ed7e8361d",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1820,
880
],
"parameters": {
"color": 3,
"width": 420,
"height": 260,
"content": "## 退出"
},
"typeVersion": 1
},
{
"id": "cd8e73b5-680c-4c7f-a295-0b88f179a1e0",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
660,
420
],
"parameters": {
"color": 5,
"width": 1480,
"height": 460,
"content": "## 邮件丰富和验证"
},
"typeVersion": 1
},
{
"id": "1d0653ef-9233-44a8-9640-ec7da44a6f2b",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2200,
420
],
"parameters": {
"color": 2,
"width": 1800,
"height": 460,
"content": "## 邮件生成和存储"
},
"typeVersion": 1
},
{
"id": "1a21c073-6987-4b36-bddd-89a402f5862d",
"name": "公司恢复",
"type": "n8n-nodes-base.googleSheets",
"position": [
-2200,
700
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit#gid=0",
"cachedResultName": "Companies"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1LfhqpyjimLjyQcmWY8mUr6YtNBcifiOVLIhAJGV9jiM/edit?usp=drivesdk",
"cachedResultName": "CRM"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Y8D8KsfgZCZmP2Vh",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "817efa14-91f4-4669-b1c0-4f3b5368c407",
"name": "过滤分数和状态",
"type": "n8n-nodes-base.filter",
"position": [
-1980,
700
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "146a686b-6a22-4a33-8e04-a4e7d0fc3eb9",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.Score }}",
"rightValue": 7
},
{
"id": "31a8bdd6-1f27-4dec-9fbf-f5895087d54b",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.State }}",
"rightValue": "Qualified"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "e5073f54-480a-42be-88a9-b434a2f3f57d",
"name": "设置变量",
"type": "n8n-nodes-base.set",
"position": [
-2420,
700
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "09d2e4ab-3555-4f6d-b176-fd61ac89c131",
"name": "account_id (Ghost Genius API)",
"type": "string",
"value": ""
},
{
"id": "993b61a7-7492-4b85-8bea-17ead8df6c93",
"name": "api_key MillionVerifier (millionverifier.com)",
"type": "string",
"value": ""
},
{
"id": "877ba906-c048-4120-8151-f5f30cad9221",
"name": "Your product",
"type": "string",
"value": "Sports & Entertainment partnership consulting services"
},
{
"id": "632373ca-6783-43cf-983c-50cc0b8690cf",
"name": "Interest",
"type": "string",
"value": "sports marketing partnerships, entertainment rights holders, brand visibility through sports"
},
{
"id": "e37f9bdc-cd30-49df-b161-3d9b3f30dd3a",
"name": "Target Audience",
"type": "string",
"value": "Brands seeking authentic sports partnerships to expand their marketing presence"
},
{
"id": "1d1fc889-339d-458c-b920-63d2910a7c74",
"name": "Target Employees",
"type": "string",
"value": "\"CTO\" OR \"CEO\" OR \"Marketing\""
},
{
"id": "7fbc3992-a0b9-4927-a247-aeebde32a930",
"name": "Irrelevant Use Case ",
"type": "string",
"value": "generic sponsorship packages without strategic alignment"
},
{
"id": "227467cb-0b68-4e0d-99bd-7433345b538d",
"name": "Email Language",
"type": "string",
"value": "English"
},
{
"id": "3076d3c6-1f9e-4595-8ad9-eb514511111e",
"name": "Sender Role (your role)",
"type": "string",
"value": "Manager of Global Partnerships"
},
{
"id": "43377c31-840e-4757-9e48-c16f15ceb9f8",
"name": "Product Benefits",
"type": "string",
"value": "data-driven partnership strategy, unparalleled access to sports rights holders, authentic brand-sport connections"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "956dc6ac-f441-46b5-bfcc-cc6098706d20",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"width": 480,
"height": 340,
"content": "### 100家公司的成本"
},
"typeVersion": 1
},
{
"id": "6fdfa1c7-39ea-4a75-bfe6-84f474c43de6",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
580,
0
],
"parameters": {
"width": 480,
"height": 340,
"content": "### 须知事项"
},
"typeVersion": 1
},
{
"id": "540fd9d0-db8f-4736-b6f3-babea4199710",
"name": "生成电子邮件主题",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
3240,
700
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {
"temperature": 0.2
},
"messages": {
"values": [
{
"role": "system",
"content": "=You are a specialist in cold email and particularly in writing email subject lines with high open rates.\n\nIMPORTANT: You are creating subject lines that will be used by someone else, not communicating directly with prospects.\n\nYou're known for your original and unconventional writing style. Your subject lines pique prospects' curiosity and don't appear commercial.\n\nHere is your mission:\nYou will receive an email sequence addressed to a prospect. The sequence consists of one opening email followed by two follow-ups in case of no response. Your mission is to write the subject line for each email.\n\nHere are the rules to follow:\n- The subject line must be very short and personalized to the prospect in relation to the email content.\n- The tone must be informal and absolutely catch the prospect's attention and pique their curiosity.\n- Never use smileys or emojis.\n- It should be clear that it's related to {{ $('Set Variables').item.json['Your product'] }}.\n- Use the prospect's first name.\n- You must write in {{ $('Set Variables').item.json['Email Language'] }}.\n\nYou must return a JSON with this structure:\nsubject_1:\nsubject_2:\nsubject_3:"
},
{
"content": "=Here is the email sequence:\n\nOpening email: {{ $json.message.content.initial_email }}\n\nFollow-up email 1: {{ $json.message.content.first_follow_up }}\n\nFollow-up email 2: {{ $json.message.content.second_follow_up }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "SSQ6BcbSKW6I0uSn",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "0deef7b4-3ea9-436d-b6d0-056ce1fb8294",
"name": "开始",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2620,
700
],
"parameters": {},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "79699808-e344-4f60-a000-45e7a03ac2b4",
"connections": {
"Start": {
"main": [
[
{
"node": "Set Variables",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Get Profile Post",
"type": "main",
"index": 0
}
]
]
},
"Split Out ": {
"main": [
[
{
"node": "Generate Emails",
"type": "main",
"index": 0
}
]
]
},
"Add lead(s)": {
"main": [
[
{
"node": "Lead(s) found",
"type": "main",
"index": 0
}
]
]
},
"Lead(s) found": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Select Top 3 ": {
"main": [
[
{
"node": "Split Out ",
"type": "main",
"index": 0
}
]
]
},
"Set Variables": {
"main": [
[
{
"node": "Companies Recovery",
"type": "main",
"index": 0
}
]
]
},
"Verify Emails": {
"main": [
[
{
"node": "Combine Results",
"type": "main",
"index": 0
}
]
]
},
"Extract Domain": {
"main": [
[
{
"node": "Find Employees",
"type": "main",
"index": 0
}
]
]
},
"Find Employees": {
"main": [
[
{
"node": "Check profiles Found",
"type": "main",
"index": 0
}
]
]
},
"Split Profiles": {
"main": [
[
{
"node": "Get Profile Details",
"type": "main",
"index": 0
}
]
]
},
"Combine Results": {
"main": [
[
{
"node": "Filter Valid Emails",
"type": "main",
"index": 0
}
]
]
},
"Generate Emails": {
"main": [
[
{
"node": "Split Out Mails",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Extract Domain",
"type": "main",
"index": 0
}
]
]
},
"No mail founded": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Split Out Mails": {
"main": [
[
{
"node": "Verify Emails",
"type": "main",
"index": 0
}
]
]
},
"Combine Profiles": {
"main": [
[
{
"node": "Select Top 3 ",
"type": "main",
"index": 0
}
]
]
},
"Get Profile Post": {
"main": [
[
{
"node": "Create Personalization",
"type": "main",
"index": 0
}
]
]
},
"Check Email Valid": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
],
[
{
"node": "No mail founded",
"type": "main",
"index": 0
}
]
]
},
"Companies Recovery": {
"main": [
[
{
"node": "Filter Score and State",
"type": "main",
"index": 0
}
]
]
},
"Filter Valid Emails": {
"main": [
[
{
"node": "Check Email Valid",
"type": "main",
"index": 0
}
]
]
},
"Get Profile Details": {
"main": [
[
{
"node": "Keep relevant information",
"type": "main",
"index": 0
}
]
]
},
"Check profiles Found": {
"main": [
[
{
"node": "Split Profiles",
"type": "main",
"index": 0
}
],
[
{
"node": "Not enough employees",
"type": "main",
"index": 0
}
]
]
},
"Not enough employees": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Create Personalization": {
"main": [
[
{
"node": "Generate Emails Messages",
"type": "main",
"index": 0
}
]
]
},
"Filter Score and State": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Generate Emails Messages": {
"main": [
[
{
"node": "Generate Emails Subjects",
"type": "main",
"index": 0
}
]
]
},
"Generate Emails Subjects": {
"main": [
[
{
"node": "Add lead(s)",
"type": "main",
"index": 0
}
]
]
},
"Keep relevant information": {
"main": [
[
{
"node": "Combine Profiles",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 销售, 人工智能, 营销
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
搜索 LinkedIn 公司,通过 AI 评分并添加到 Google Sheet CRM
搜索 LinkedIn 公司,通过 AI 评分并添加到 Google Sheet CRM
If
Set
Wait
+7
18 节点Matthieu
销售
AI个性化多产品邮件营销
基于SMTP轮换的AI个性化多产品邮件营销(GPT-4o/o3-mini)
If
Code
Wait
+16
41 节点Badr
销售
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售
域名外联:自动化潜在客户提取和定向触达
域名外联:自动化潜在客户提取和定向触达
If
Code
Wait
+11
31 节点Badr
销售
(Duc)深度研究市场模板
集成PerplexityAI研究和OpenAI内容的多层级WordPress博客生成器
If
Set
Xml
+28
132 节点Daniel Ng
人工智能
基于AI的潜在客户生成系统(邮件个性化和LinkedIn)
基于AI的潜在客户生成系统:包含邮件个性化和LinkedIn功能
If
Code
Limit
+11
51 节点Matthieu
潜在客户开发