8
n8n 中文网amn8n.com

基于AI的潜在客户生成系统(邮件个性化和LinkedIn)

高级

这是一个Lead Generation, Multimodal AI领域的自动化工作流,包含 51 个节点。主要使用 If, Code, Limit, Filter, SplitOut 等节点。 基于AI的潜在客户生成系统:包含邮件个性化和LinkedIn功能

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "95a1299fb2b16eb2219cb044f54e72c2d00dcd2c72efe717b3c308d200f29927"
  },
  "nodes": [
    {
      "id": "527f31ed-e87c-450e-8db9-befe4f560c29",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -2220,
        2160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b091d1d3-4a86-4464-88cb-9bba8247f631",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1800,
        2160
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "settings"
      },
      "typeVersion": 1
    },
    {
      "id": "591dd146-f7c5-4327-991f-553f95ff2507",
      "name": "公司恢复",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1360,
        2160
      ],
      "parameters": {
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically"
            }
          }
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=0",
          "cachedResultName": "Companies"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "4cee9f5e-762b-40e3-850d-4bea4e358aa2",
      "name": "过滤分数和状态",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1160,
        2160
      ],
      "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": "ab23d372-06ec-4351-8f9f-b9ed5779db86",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -640,
        2160
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "26d91167-6488-4a90-b7e1-fc46a22f58aa",
      "name": "查找员工",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -420,
        2160
      ],
      "parameters": {
        "url": "https://api.ghostgenius.fr/v2/private/sales-navigator",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "current_company",
              "value": "={{ $('Loop Over Items').item.json.ID }}"
            },
            {
              "name": "account_id",
              "value": "={{ $('Aggregate').item.json.settings[2]['Value (edit with your use case)'] }}"
            },
            {
              "name": "current_title",
              "value": "={{ $('Aggregate').item.json.settings[3]['Value (edit with your use case)'] }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Aggregate').item.json.settings[6]['Value (edit with your use case)'] }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "af94a547-1dd5-4d28-8375-0afe92f3994c",
      "name": "检查找到的档案",
      "type": "n8n-nodes-base.if",
      "position": [
        -200,
        2160
      ],
      "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": 1
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "f776e58c-ec9f-4317-bdc8-754d35b7e424",
      "name": "拆分档案",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        40,
        2160
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "a0935fd0-b693-49de-a90f-a1d2085d947d",
      "name": "获取电子邮件",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        480,
        2160
      ],
      "parameters": {
        "url": "https://api.ghostgenius.fr/v2/contact/email",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 1500
            }
          }
        },
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "company_url",
              "value": "={{ $('Loop Over Items').item.json.Website }}"
            },
            {
              "name": "first_name",
              "value": "={{ $json.first_name }}"
            },
            {
              "name": "last_name",
              "value": "={{ $json.last_name }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Aggregate').item.json.settings[6]['Value (edit with your use case)'] }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "495a8283-e3c0-4ea2-9acb-548125c2ce8f",
      "name": "获取档案详情",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        2160
      ],
      "parameters": {
        "url": "https://api.ghostgenius.fr/v2/profile",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 1500
            }
          }
        },
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json.url }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Aggregate').item.json.settings[6]['Value (edit with your use case)'] }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 2000
    },
    {
      "id": "e1490ca1-2909-458b-958d-209a93c80317",
      "name": "创建个性化",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1020,
        2160
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "o3-mini",
          "cachedResultName": "O3-MINI"
        },
        "options": {},
        "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: {{ $('Aggregate').item.json.settings[0]['Value (edit with your use case)'] }}\nTARGET AUDIENCE: {{ $('Aggregate').item.json.settings[1]['Value (edit with your use case)'] }}\n\nYOUR TASK:\n1. Analyze the prospect information provided\n2. Identify ONE specific personalization angle that connects the prospect's needs/challenges to our {{ $('Aggregate').item.json.settings[0]['Value (edit with your use case)'] }}\n3. Create a structured setup with personalization recommendations (NOT a complete email)\n\nPERSONALIZATION GUIDELINES:\n- Focus on how the {{ $('Aggregate').item.json.settings[0]['Value (edit with your use case)'] }} could benefit their operations\n- Identify relevant pain points from their profile that our {{ $('Aggregate').item.json.settings[0]['Value (edit with your use case)'] }} could solve\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: {{ $json.first_name }},\nHeadline: {{ $json.headline }},\nSummary: {{ $json.summary }},\nCurrent position: {{ $json.position }},\nPosition description: {{ $json.position_description }},\nCompany: {{ $('Loop Over Items').item.json.Name }},\nCompany description: {{ $('Loop Over Items').item.json.Summary }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "e1d18c75-9695-402d-aadd-ec9a7730b5e5",
      "name": "生成电子邮件消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1380,
        2160
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "o3-mini",
          "cachedResultName": "O3-MINI"
        },
        "options": {},
        "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- 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\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 our product ({{ $('Aggregate').item.json.settings[0]['Value (edit with your use case)'] }}) 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: {{ $('Keep relevant information').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
      },
      "typeVersion": 1.8
    },
    {
      "id": "e0b48005-689d-4787-8d82-d9c9a79f0141",
      "name": "生成电子邮件主题",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1740,
        2160
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "o3-mini",
          "cachedResultName": "O3-MINI"
        },
        "options": {},
        "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- Write in lower case and be personal\n- The subject line must be very short (5-7 words)\n- The tone must be informal and absolutely catch the prospect's attention and pique their curiosity.\n- Never use smileys or emojis.\n- Use the prospect's first name.\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
      },
      "typeVersion": 1.8
    },
    {
      "id": "a3cb6e48-6ca4-40f0-9b1a-0afae64f33e8",
      "name": "保留相关信息",
      "type": "n8n-nodes-base.code",
      "position": [
        700,
        2160
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const simplifiedItem = {\n  first_name: $('Get Profile details').item.json.first_name || null,\n  last_name: $('Get Profile details').item.json.last_name || null,\n  headline: $('Get Profile details').item.json.headline || null,\n  position: $('Get Profile details').item.json.experiences[0].position || null,\n  position_description: $('Get Profile details').item.json.experiences[0].description || null,\n  summary: $('Get Profile details').item.json.summary || null, \n  company_name: $('Loop Over Items').item.json.Name || null\n};\nreturn simplifiedItem;"
      },
      "typeVersion": 2
    },
    {
      "id": "3cb270ad-30aa-4d8d-a405-cf85c8f45d80",
      "name": "添加潜在客户",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2100,
        2160
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $('Get Email').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 }}",
            "Lastname": "={{ $('Get Profile details').item.json.last_name }}",
            "LinkedIn": "={{ $('Get Profile details').item.json.url }}",
            "Firstname": "={{ $('Get Profile details').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": "={{ $('Get Profile details').item.json.experiences[0].position }}"
          },
          "schema": [
            {
              "id": "Firstname",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Firstname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lastname",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Lastname",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Current Position",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Current Position",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mail 1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mail 1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mail 2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mail 2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Mail 3",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Mail 3",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject 1",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject 1",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject 2",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subject 2",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subject 3",
              "type": "string",
              "display": true,
              "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": 664133164,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=664133164",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f87cffea-66d2-4839-b99a-bf3cf327967c",
      "name": "找到潜在客户",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2300,
        2160
      ],
      "parameters": {
        "columns": {
          "value": {
            "State": "Enriched",
            "LinkedIn": "={{ $('Loop Over Items').item.json.LinkedIn }}"
          },
          "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": false,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": true,
              "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": "Explanation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Explanation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "State",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "State",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=0",
          "cachedResultName": "Companies"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "46d11554-545b-4eef-89df-462c1cf3f5af",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2300,
        1880
      ],
      "parameters": {
        "color": 6,
        "width": 1520,
        "height": 460,
        "content": "## 数据恢复"
      },
      "typeVersion": 1
    },
    {
      "id": "81f67e40-ccd2-405a-8498-46b7e2061076",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        1880
      ],
      "parameters": {
        "color": 4,
        "width": 1600,
        "height": 460,
        "content": "## 寻找决策者"
      },
      "typeVersion": 1
    },
    {
      "id": "6c4e2ff0-b274-4ced-837c-2793221820bd",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        1880
      ],
      "parameters": {
        "color": 5,
        "width": 1560,
        "height": 460,
        "content": "## 电子邮件生成和存储"
      },
      "typeVersion": 1
    },
    {
      "id": "8d0d97aa-ec10-44ba-a772-cf68d5f4c657",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        2340
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 260,
        "content": "## 退出"
      },
      "typeVersion": 1
    },
    {
      "id": "df380fac-a327-4ab0-91fa-8686389b4bfe",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        -960,
        2160
      ],
      "parameters": {
        "maxItems": 100
      },
      "typeVersion": 1
    },
    {
      "id": "4b52c6a4-a050-45d3-918b-f23df9f97bc7",
      "name": "处理每家公司",
      "type": "n8n-nodes-base.splitInBatches",
      "onError": "continueRegularOutput",
      "position": [
        20,
        1100
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3,
      "alwaysOutputData": false
    },
    {
      "id": "9f18ad76-89d8-452c-ad18-bd86c5559177",
      "name": "获取公司信息",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        240,
        1100
      ],
      "parameters": {
        "url": "https://api.ghostgenius.fr/v2/company",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json.url }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Aggregate1').item.json.settings[6]['Value (edit with your use case)'] }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "51553d5e-f61f-4c23-b390-c3f6a2d92b76",
      "name": "过滤有效公司",
      "type": "n8n-nodes-base.if",
      "onError": "continueRegularOutput",
      "position": [
        440,
        1100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "5ea943a6-8f6c-4cb0-b194-8c92d4b2aacc",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.website }}",
              "rightValue": "[null]"
            },
            {
              "id": "8235b9bb-3cd4-4ed4-a5dc-921127ff47c7",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.followers_count }}",
              "rightValue": 200
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c0fea429-5620-440f-bdc9-fc1d7ee32dbf",
      "name": "是新公司吗?",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        1100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "050c33be-c648-44d7-901c-51f6ff024e97",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $('Check If Company Exists').all().first().json }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bf81fc2b-3bfc-4e83-a9fc-c997db7eee01",
      "name": "搜索公司",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -500,
        1100
      ],
      "parameters": {
        "url": "https://api.ghostgenius.fr/v2/search/companies",
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "page",
                    "value": "={{ $pageCount + 1 }}"
                  }
                ]
              },
              "maxRequests": 1,
              "requestInterval": 2000,
              "limitPagesFetched": true,
              "completeExpression": "={{ $response.body.data.isEmpty() }}",
              "paginationCompleteWhen": "other"
            }
          }
        },
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "keywords",
              "value": "={{ $json.message.content.keywords }}"
            },
            {
              "name": "locations",
              "value": "={{ $('Aggregate1').item.json.settings[4]['Value (edit with your use case)'] }}"
            },
            {
              "name": "company_size",
              "value": "={{ $('Aggregate1').item.json.settings[5]['Value (edit with your use case)'] }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Aggregate1').item.json.settings[6]['Value (edit with your use case)'] }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5edc2d62-71a0-46d2-96ab-6cc70d6e37c0",
      "name": "提取公司数据",
      "type": "n8n-nodes-base.splitOut",
      "onError": "continueRegularOutput",
      "position": [
        -300,
        1100
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "26a2cfb1-a4e8-49cd-ac1b-9f9db5dc78b6",
      "name": "检查公司是否存在",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        660,
        1100
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $json.id }}",
              "lookupColumn": "ID"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=0",
          "cachedResultName": "Companies"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5,
      "alwaysOutputData": true
    },
    {
      "id": "0aa49615-1e7a-4c3a-85d8-9756fb67881e",
      "name": "AI公司评分",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1220,
        1100
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "o3-mini",
          "cachedResultName": "O3-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are an AI assistant that evaluates companies to determine if they might be interested in {{ $('Aggregate1').item.json.settings[0]['Value (edit with your use case)'] }}.\n\nEvaluate the company information provided on a scale of 0 to 10, where:\n- 0 = Not at all likely to be interested\n- 10 = Extremely likely to be interested\n\nBase your evaluation on these criteria:\n1. Industry fit: How well does the company's industry align with {{ $('Aggregate1').item.json.settings[0]['Value (edit with your use case)'] }}?\n2. Company profile: Is the company size, growth stage, and location appropriate for {{ $('Aggregate1').item.json.settings[0]['Value (edit with your use case)'] }}?\n3. Pain points: Based on their description, do they likely have challenges that {{ $('Aggregate1').item.json.settings[0]['Value (edit with your use case)'] }} solves?\n\nRespond ONLY with this JSON format:\n```json\n{\n  \"score\": [number between 0 and 10],\n  \"explanation\":\n}"
            },
            {
              "content": "=Here is the company to analyze:\nName: {{ $('Filter Valid Companies').item.json.name }}\n{{ $('Filter Valid Companies').item.json.tagline }}\n{{ $('Filter Valid Companies').item.json.description }}\nNumber of employees: {{ $('Filter Valid Companies').item.json.staff_count }}\nIndustry: {{ $('Filter Valid Companies').item.json.industries }}\nSpecialties: {{ $('Filter Valid Companies').item.json.specialities }}\nLocation: {{ $('Filter Valid Companies').item.json.locations?.toJsonString() }}\nFounded in: {{ $('Filter Valid Companies').item.json.founded_on }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "ed5f6a15-5284-4594-8aca-86327038bc8c",
      "name": "添加公司到CRM",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1580,
        1100
      ],
      "parameters": {
        "columns": {
          "value": {
            "ID": "={{ $('Get Company Info').item.json.id }}",
            "Name": "={{ $('Get Company Info').item.json.name }}",
            "Score": "={{ $('AI Company Scoring').item.json.message.content.score }}",
            "State": "Qualified",
            "Summary": "={{ $('Get Company Info').item.json.description }}",
            "Website": "={{ $('Get Company Info').item.json.website }}",
            "LinkedIn": "={{ $('Get Company Info').item.json.url }}",
            "Explanation": "={{ $('AI Company Scoring').item.json.message.content.explanation }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "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": "Summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Explanation",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Explanation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "State",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "State",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=0",
          "cachedResultName": "Companies"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "bd105774-d426-459d-8f50-ea0a4bcf95aa",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        820
      ],
      "parameters": {
        "color": 6,
        "width": 1580,
        "height": 460,
        "content": "## LinkedIn公司搜索"
      },
      "typeVersion": 1
    },
    {
      "id": "8e641e38-a6c4-4768-a640-346db5044b74",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        820
      ],
      "parameters": {
        "color": 5,
        "width": 680,
        "height": 460,
        "content": "## AI评分和存储"
      },
      "typeVersion": 1
    },
    {
      "id": "10bb1319-98b9-45fd-8f35-b127b6bc97a8",
      "name": "聚合1",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -1220,
        1100
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "settings"
      },
      "typeVersion": 1
    },
    {
      "id": "2d73b959-0088-455d-8af7-16e834e3f051",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        820
      ],
      "parameters": {
        "color": 4,
        "width": 1120,
        "height": 460,
        "content": "## 公司数据处理"
      },
      "typeVersion": 1
    },
    {
      "id": "f7d3e1fd-580f-4b21-8c62-8c614897f9e6",
      "name": "开始",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1620,
        1100
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "084a6aae-552e-42de-a363-987a1aedc55e",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1820,
        680
      ],
      "parameters": {
        "width": 3820,
        "height": 920,
        "content": "# 搜索LinkedIn公司,使用AI评分,并发送到您的CRM"
      },
      "typeVersion": 1
    },
    {
      "id": "5f1e2de8-10cd-421a-806b-b3895c9618a9",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2380,
        1740
      ],
      "parameters": {
        "width": 5000,
        "height": 920,
        "content": "# 寻找决策者,获取验证电子邮件,并使用AI生成3封冷邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "d14c5fe0-d645-4633-8b9f-90b41ec46386",
      "name": "便签9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        140
      ],
      "parameters": {
        "color": 2,
        "width": 720,
        "height": 420,
        "content": "## 介绍"
      },
      "typeVersion": 1
    },
    {
      "id": "c231d4b7-49ff-4bb7-95a0-be2061b1cc8e",
      "name": "便签 10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        140
      ],
      "parameters": {
        "color": 2,
        "width": 600,
        "height": 420,
        "content": "## 设置"
      },
      "typeVersion": 1
    },
    {
      "id": "6fe93d40-8512-4ace-9e30-402acbf93e49",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        440,
        140
      ],
      "parameters": {
        "color": 2,
        "width": 600,
        "height": 420,
        "content": "## 工具"
      },
      "typeVersion": 1
    },
    {
      "id": "1c0cc83e-d59e-486e-9131-09949c58930b",
      "name": "制作完美请求",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -860,
        1100
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "o3-mini",
          "cachedResultName": "O3-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an AI assistant that extracts clean, relevant keywords to search for companies on LinkedIn.\n\nThe user input is often noisy, vague, or includes unnecessary details. Your job is to return only **clear, concise keywords** that describe the **type of company** the user is looking for.\n\nOnly keep terms related to:\n- Industry or sector (e.g. fintech, legal tech, SaaS)\n- Company activity or profession (e.g. digital agency, HR software, logistics)\n\nIgnore anything related to:\n- Location (e.g. in Paris, Europe)\n- Company size (e.g. startups, large enterprise)\n- Intent or service needs (e.g. looking for CRM, needs automation)\n- Personal perspective (e.g. I’m looking for, I want to target)\n\nYour answer must contain:\n- A space-separated list of keywords (no punctuation, no full sentences, no extra text)\n- If there are no relevant keywords, respond with: `no keywords`"
            },
            {
              "content": "=Extract the relevant company keywords from this input:\n\n{{ $json.settings[1]['Value (edit with your use case)'] }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "ab27f2a8-0ac3-4450-96c8-be0a21dd18ce",
      "name": "获取要处理的广告",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1420,
        1100
      ],
      "parameters": {
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically"
            }
          }
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1782913168,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=1782913168",
          "cachedResultName": "Settings"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.5
    },
    {
      "id": "fe218ee4-c06b-48c0-b47f-db5321fbfe39",
      "name": "获取设置1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2020,
        2160
      ],
      "parameters": {
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "rangeDefinition": "detectAutomatically"
            }
          }
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1782913168,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=1782913168",
          "cachedResultName": "Settings"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.5
    },
    {
      "id": "c4ad0b09-a510-45f8-a851-3b01ea95ef8e",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        -1060,
        1100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1fb2a486-8581-4d1e-9a83-26992e4ff505",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.settings[6]['Value (edit with your use case)'] }}",
              "rightValue": ""
            },
            {
              "id": "35ea5c51-10f6-4fe1-b802-9cbd202d8381",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.settings[2]['Value (edit with your use case)'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bb99d5d0-0e6e-4346-9167-433775e80bb3",
      "name": "便签12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        1280
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 260,
        "content": "## 退出"
      },
      "typeVersion": 1
    },
    {
      "id": "da3811ad-fcd2-47db-afa9-fe1bfca1ce51",
      "name": "便签13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        2340
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 260,
        "content": "## 退出"
      },
      "typeVersion": 1
    },
    {
      "id": "e4ed5a84-f464-40d2-b1ff-eb3059270d77",
      "name": "条件判断1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1600,
        2160
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1fb2a486-8581-4d1e-9a83-26992e4ff505",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.settings[6]['Value (edit with your use case)'] }}",
              "rightValue": ""
            },
            {
              "id": "35ea5c51-10f6-4fe1-b802-9cbd202d8381",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.settings[2]['Value (edit with your use case)'] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "3921bf36-d8a9-4864-b1e7-4891f4aaeed2",
      "name": "",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -1340,
        2420
      ],
      "parameters": {
        "errorMessage": "Missing API Key or Account ID in the Google Sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "2dc2a7e0-380f-4182-babe-06de9445f78d",
      "name": "Missing API Key or Account ID",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -760,
        1360
      ],
      "parameters": {
        "errorMessage": "Missing API Key or Account ID in the Google Sheet"
      },
      "typeVersion": 1
    },
    {
      "id": "7285df69-42cf-4df5-8d5e-1efcddd9683a",
      "name": "便签14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 80,
        "content": "# [Free Assistance](https://cal.com/soufiane-ghostgenius/workflows-setup-x-ghost-genius-copy)"
      },
      "typeVersion": 1
    },
    {
      "id": "02a044ae-38a5-4141-a2d8-fdcd025c3ccc",
      "name": "No decision maker found",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        40,
        2420
      ],
      "parameters": {
        "columns": {
          "value": {
            "State": "No decision maker found",
            "LinkedIn": "={{ $('Loop Over Items').item.json.LinkedIn }}"
          },
          "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": false,
              "required": false,
              "displayName": "LinkedIn",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ID",
              "type": "string",
              "display": true,
              "removed": true,
              "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": "Explanation",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Explanation",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "State",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "State",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "LinkedIn"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit#gid=0",
          "cachedResultName": "Companies"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1j8AHiPiHEXVOkUhO2ms-lw1Ygu1eWIWW-8Qe1OoHpCo/edit?usp=drivesdk",
          "cachedResultName": "Lead Machine - Ghost Genius"
        }
      },
      "typeVersion": 4.5
    }
  ],
  "pinData": {},
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Make the perfect request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Missing API Key or Account ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Companies Recovery",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Missing API Key or Account ID1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start": {
      "main": [
        [
          {
            "node": "Get Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "main": [
        [
          {
            "node": "Keep relevant information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add lead(s)": {
      "main": [
        [
          {
            "node": "Lead(s) found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Settings": {
      "main": [
        [
          {
            "node": "Aggregate1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Settings1": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead(s) found": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "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
          }
        ]
      ]
    },
    "Is New Company?": {
      "main": [
        [
          {
            "node": "AI Company Scoring",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Find Employees",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Company Info": {
      "main": [
        [
          {
            "node": "Filter Valid Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Settings1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Companies": {
      "main": [
        [
          {
            "node": "Extract Company Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Company Scoring": {
      "main": [
        [
          {
            "node": "Add Company to CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Company to CRM": {
      "main": [
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Companies Recovery": {
      "main": [
        [
          {
            "node": "Filter Score and State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Profile details": {
      "main": [
        [
          {
            "node": "Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check profiles Found": {
      "main": [
        [
          {
            "node": "Split Profiles",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No decision maker found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Company Data": {
      "main": [
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Each Company": {
      "main": [
        [],
        [
          {
            "node": "Get Company Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Personalization": {
      "main": [
        [
          {
            "node": "Generate Emails Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Score and State": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Companies": {
      "main": [
        [
          {
            "node": "Check If Company Exists",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process Each Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Company Exists": {
      "main": [
        [
          {
            "node": "Is New Company?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No decision maker found": {
      "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
          }
        ]
      ]
    },
    "Make the perfect request": {
      "main": [
        [
          {
            "node": "Search Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep relevant information": {
      "main": [
        [
          {
            "node": "Create Personalization",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 潜在客户开发, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量51
分类2
节点类型14
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流