8
n8n 中文网amn8n.com

基于AI的潜在客户资格评定与个性化触达(使用Relevance AI)

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 34 个节点。主要使用 Set, Code, Gmail, Merge, Slack 等节点。 基于AI的潜在客户资格评定与个性化触达:使用Relevance AI

前置要求
  • Google 账号和 Gmail API 凭证
  • Slack Bot Token 或 Webhook URL
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "702596a9719c2ee1ff81772a5069e7af986ac325ce905b7dfad8a8c8c8c9c76c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ad8ab20b-217c-4ff5-8e32-1290e1b8a135",
      "name": "表单",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2080,
        -48
      ],
      "webhookId": "57900f3c-69b0-4321-94f9-23d87a278dce",
      "parameters": {
        "options": {
          "appendAttribution": false
        },
        "formTitle": "Contact Us",
        "formFields": {
          "values": [
            {
              "fieldLabel": "First Name",
              "placeholder": "John",
              "requiredField": true
            },
            {
              "fieldLabel": "Last Name",
              "placeholder": "Doe",
              "requiredField": true
            },
            {
              "fieldType": "email",
              "fieldLabel": "Email Address",
              "placeholder": "johndoe@gmail.com",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Phone Number",
              "placeholder": "+1 1153954790"
            },
            {
              "fieldLabel": "Company Website",
              "placeholder": "www.example.com",
              "requiredField": true
            },
            {
              "fieldLabel": "Job title",
              "placeholder": "Your job title on the company"
            }
          ]
        },
        "formDescription": "Get in touch within 24h"
      },
      "typeVersion": 2.2
    },
    {
      "id": "752d2c94-57eb-4837-b787-c6a44b5c2945",
      "name": "路由器",
      "type": "n8n-nodes-base.switch",
      "position": [
        0,
        224
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "hot",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "9dd93ce5-06d2-44ea-8340-024452300e29",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "leftValue": "={{ $json.label }}",
                    "rightValue": "hot"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "warm",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "e70564a2-6988-475e-bf4d-7bb9f4005ded",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.label }}",
                    "rightValue": "warm"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "cold",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "4a8862f1-0ba7-4c7a-bf5a-e95f07424ded",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.label }}",
                    "rightValue": "cold"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "none"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "d437ef5a-647f-4da6-bcbf-5307f26991f8",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -1808,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "07a38b87-1129-42ed-abba-ac8a215ab8d6",
              "name": "full_name",
              "type": "string",
              "value": "={{ $json['First Name'] }} {{ $json['Last Name'] }}"
            },
            {
              "id": "f8660556-ec1d-4c4a-81da-e929cd67d4e7",
              "name": "email",
              "type": "string",
              "value": "={{ $json['Email Address'] }}"
            },
            {
              "id": "6c8b34ac-5b77-4708-8f9a-b3af66347a15",
              "name": "company_url",
              "type": "string",
              "value": "={{ $json['Company Website'] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a21eaa1b-a250-4fdd-be01-79e80835798c",
      "name": "评分个人(相关性)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1440,
        -112
      ],
      "parameters": {
        "url": "https://api-d7b62b.stack.tryrelevance.com/latest/studios/3ebb7eb0-de5d-4ac2-867b-a9adfd1b111b/trigger_webhook",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "full_name",
              "value": "={{ $('Edit Fields').item.json.full_name }}"
            },
            {
              "name": "email",
              "value": "={{ $('Edit Fields').item.json.email }}"
            },
            {
              "name": "lead_role",
              "value": "={{ $('Form').item.json['Job title'] }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "project",
              "value": "<your_relevance.ai_project_ID>"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "b8Ao8Jb2KoJezTx5",
          "name": "Relevance.ai [cocaina.Gmail]"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3ff80f8d-61f7-476c-8e8b-c5e169e6ec93",
      "name": "评分公司(相关性)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1440,
        80
      ],
      "parameters": {
        "url": "https://api-d7b62b.stack.tryrelevance.com/latest/studios/322ff712-944a-45a5-867e-90d29fa506ee/trigger_webhook",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "company_url",
              "value": "={{ $('Edit Fields').item.json.company_url }}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "project",
              "value": "<your_relevance.ai_project_ID>"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "b8Ao8Jb2KoJezTx5",
          "name": "Relevance.ai [cocaina.Gmail]"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f9320638-fca7-4e1e-8ee5-9e0849048b76",
      "name": "总结与评分",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -768,
        -48
      ],
      "parameters": {
        "text": "=## HERE'S THE DATA-\n\n### 1. Individual Lead Data:\n```\n{{ JSON.stringify($('score individual (Relevance)').item.json.output) }}\n```\n\n### 2. Company Data (Company the lead works for):\n```\n{{ JSON.stringify($('score company (Relevance)').item.json.output) }}\n```",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are an intelligent lead scoring Assistant that evaluates both individuals and their companies to provide comprehensive lead qualification insights Preciceely.\n\n# Role and Objective\n\nYour role is to analyze leads by evaluating both the individual person and their company, then combine these insights intelligently to provide a holistic lead score and qualification status.\n---\n\n## Input Format\n\n**You will receive:**\n 1. Individual Lead Data (A single human/lead)\n 2. Company Data (Company the lead works for)\n 3. Email ID of the lead\n\n\n## Instructions\n\n**First,** analyze both the individual and company separately using the provided data\n\n**When combining information:**\n* Remove duplicate information (e.g., if company size appears in both reports)\n* Prioritize more detailed/accurate source when information conflicts\n* Merge unique insights from both sources\n* Consider both individual and company scores when calculating final score\n\n**Apply your own analytical logic to:**\n* Identify relationships between individual and company data points\n* Spot potential opportunities or red flags\n* Calculate a weighted final score\n\n\n## Scoring Logic\n\n**Combine individual and company scores using this weighted approach:**\n* Individual Score: 40% weight\n* Company Score: 60% weight\n* Use your own Logic/Calculation to score. **Don't just copy-paste the company score**\n\n### Additional scoring adjustments:\n* +10 points if individual is senior leadership at a matching company\n* -5 points if significant misalignment between individual role and company needs\n* -10 points for any critical red flags from either source\n\n\n## Final Score Classifications:\n\n* 80-100: Hot Lead\n* 60-79: Warm Lead\n* 0-59: Cold Lead\n---\n\n# Output Format\n**Return ONLY a JSON object with:**\n{\n  \"lead_score\": <0-100, calculated as per instructions>,\n  \"status\": \"<Qualified/Disqualified>\",\n  \"label\": \"<hot/warm/cold>\",\n  \"contact_details\": {\n    \"name\": \"<Lead's Full Name>\",\n    \"email\": \"<Lead's Email Address>\",\n    \"job_title\": \"<Lead's Job Title>\",\n    \"seniority_level\": \"<e.g., Executive, Senior, Mid-level, Junior or else>\"\n  },\n  \"contact_social_profiles\": {\n    \"linkedin\": \"<Individual's LinkedIn URL>\",\n    \"twitter\": \"<Individual's X/Twitter URL>\"\n  },\n  \"company_details\": {\n    \"name\": \"<Company Name>\",\n    \"industry\": \"<Company Industry>\",\n    \"size\": \"<Company Size e.g., 51-200>\",\n    \"website\": \"<Company Website URL>\",\n    \"tech_stack\": [],\n    \"growth_signals\": []\n  },\n  \"company_social_profiles\": {\n    \"linkedin\": \"<Company's LinkedIn URL>\",\n    \"twitter\": \"<Company's X/Twitter URL>\"\n  },\n  \"summary\": \"Brief, non-redundant summary combining key individual and company insights, focusing on relevance for outreach.\",\n  \"red_flags\": <any red flag if mentioned OR null>,\n  \"confidence_score\": <0-100, based on data completeness and consistency>\n}\n---\n\n\n# Example\n\n## Input: \n### 1. Individual Lead Data: Output from the \"Summarize and Score Lead (Individual)\" tool.\n{\n  \"score\": 87,\n  \"status\": \"Qualified\",\n  \"label\": \"hot\",\n  \"name\": \"John Doe\",\n  \"email_id\": \"johndoe@gmail.com\",\n  \"title\": \"Head of Product\",\n  \"company_name\": \"Launchly\",\n  \"industry\": \"E-commerce Tech\",\n  \"company_size\": \"51–200\",\n  \"summary\": \"John is a senior product leader at a fast-growing SaaS company, showing strong career progression and relevant skills.\",\n  \"key-insights\": \"Likely to be a key decision maker. Prioritize outreach.\",\n  \"skills\": [\"Product Management\", \"SaaS\", \"Team Leadership\"],\n  \"stability\": \"High\",\n  \"profiles\": {\"LinkedIn\": \"https://linkedin.com/in/johndoe\", \"X\": \"https://x.com/johndoe\"},\n  \"red_flag\": null\n}\n\n### 2. Company Data: Output from the \"Summarize and score company\" tool.\n{\n  \"lead_score\": 78,\n  \"status\": \"Qualified\",\n  \"label\": \"hot\",\n  \"company_name\": \"Launchly\",\n  \"industry\": \"E-commerce Tech\",\n  \"company_size\": \"51–200\",\n  \"summary\": \"Launchly is a mid-sized e-commerce technology startup, demonstrating strong online presence and a modern tech stack. They appear to be in a growth phase.\",\n  \"key_insights\": \"Active hiring indicates potential for scaling operations, making them receptive to tools that streamline growth. Their modern tech stack suggests they are open to integrating advanced solutions.\",\n  \"tech_stack\": [ \"Hubspot\", \"Klaviyo\", \"Stripe\" ],\n  \"growth_signals\": [ \"Hiring\", \"Active blog\" ],\n  \"website\": \"https://launchly.io\",\n  \"social_profiles\": {\"linkedin\": \"https://linkedin.com/company/launchly\", \"X\": \"https://twitter.com/launchly\"},\n  \"red_flag\": null\n}\n\n## Output:\n{\n  \"lead_score\": 88,\n  \"status\": \"Qualified\",\n  \"label\": \"hot\",\n  \"contact_details\": {\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@gmail.com\",\n    \"job_title\": \"Head of Product\",\n    \"seniority_level\": \"Executive\"\n  },\n  \"contact_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/in/johndoe\",\n    \"twitter\": \"https://x.com/johndoe\"\n  },\n  \"company_details\": {\n    \"name\": \"Acme Corp\",\n    \"industry\": \"SaaS\",\n    \"size\": \"201-500\",\n    \"website\": \"https://acmecorp.com\",\n    \"tech_stack\": [\"React\", \"Node.js\", \"AWS\"],\n    \"growth_signals\": [\"Hiring\", \"Recent funding round\"]\n  },\n  \"company_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/company/launchly\",\n    \"twitter\": \"https://twitter.com/launchly\",\n    \"youtube\": \"https://youtube.com/launchlyco\"\n  },\n  \"summary\": \"John Doe is a senior product leader at Launchly, a growing SaaS company. Both individual and company show strong qualification signals, indicating high potential for a successful engagement. Launchly's active hiring and modern tech stack align well with John's leadership role.\",\n  \"red_flags\": null,\n  \"confidence_score\": 95\n}\n---\n\n## Important Considerations:\n\n* Avoid duplicating information in the final output\n* Only return the specified JSON structure and nothing else\n* Include social profiles only if they exist in the input data\n* Calculate scores independently, don't copy-paste the company score\n* Keep summaries concise and focused on key decision factors\n* Always indicate data quality issues in the confidence score"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "6c34b905-d6e2-4d20-ab44-e986ae5ef39b",
      "name": "结构化输出",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        -48
      ],
      "parameters": {
        "jsCode": "const llmOutput = $json.text;\nlet cleanJsonString = llmOutput; // Start with the full output\n\n// 1. Try to extract content from a full markdown JSON block (```json...```)\nconst fullMarkdownMatch = llmOutput.match(/```json\\s*([\\s\\S]*?)\\s*```/);\nif (fullMarkdownMatch && fullMarkdownMatch[1]) {\n    cleanJsonString = fullMarkdownMatch[1];\n} else {\n    // 2. If no full markdown block, check for only trailing ``` (your current problem)\n    //    Remove any trailing ``` and surrounding whitespace\n    const trailingBackticksMatch = llmOutput.match(/^(.*?)\\s*`{3,}\\s*$/s); // `s` flag allows . to match newlines\n    if (trailingBackticksMatch && trailingBackticksMatch[1]) {\n        cleanJsonString = trailingBackticksMatch[1];\n    } else {\n        // 3. Fallback: No markdown, assume the entire output *should* be JSON.\n        //    (cleanJsonString already holds llmOutput, so no change needed here)\n        //    We could also try to trim whitespace just in case.\n        cleanJsonString = llmOutput.trim();\n    }\n}\n\n\n// Now attempt to parse the cleaned string\ntry {\n    const parsedJson = JSON.parse(cleanJsonString);\n    return [{ json: parsedJson }];\n} catch (e) {\n    console.error(\"JSON Parsing Error in Code Node:\", e.message);\n    console.error(\"String attempted to parse:\", cleanJsonString);\n    throw new Error(\n        \"Failed to parse JSON from LLM output: \" + e.message +\n        \"\\nString attempted to parse:\\n\" + cleanJsonString +\n        \"\\nRaw LLM Output was:\\n\" + llmOutput\n    );\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "c942bec9-3c91-4cbe-8f39-80ae52004a98",
      "name": "Deepseek",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -736,
        160
      ],
      "parameters": {
        "model": "tngtech/deepseek-r1t-chimera:free",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "oPGlise3ZkYmOynS",
          "name": "OpenRouter [Api.Gmail]"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a81313ef-d2ec-4bc0-9fbb-90c81cf8c696",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -576,
        160
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "o1FK0fi6w4RpYPp2",
          "name": "Gemini(PaLM) [api.Gmail]"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d0ee2940-3abe-4063-9056-01ca137120db",
      "name": "Deepseek R1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        448,
        848
      ],
      "parameters": {
        "model": "deepseek/deepseek-r1:free",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "oPGlise3ZkYmOynS",
          "name": "OpenRouter [Api.Gmail]"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f9311c82-1c5a-4fe6-9160-f245e24b16bd",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        608,
        848
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"To\": {\n      \"type\": \"string\",\n      \"description\": \"Email address of the lead\"\n    },\n    \"subject\": {\n      \"type\": \"string\",\n      \"description\": \"Customized email subject\"\n    },\n    \"body\": {\n      \"type\": \"string\",\n      \"description\": \"Full email text with proper formatting\"\n    }\n  },\n  \"required\": [\n    \"To\",\n    \"subject\",\n    \"body\"\n  ],\n  \"additionalProperties\": false\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "815b4d81-4e0a-434f-93c8-71b2e614c3a0",
      "name": "邮件个性化(热线索)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        192
      ],
      "parameters": {
        "text": "=Here's the Lead Data-\n```\n{{ $('Summarize_N_score').item.json.text }}\n```",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are an AI Email Personalization Expert that crafts highly targeted, context-aware, Brief emails for hot leads only based on comprehensive lead scoring data. Your role is to convert lead intelligence into compelling outreach.\n---\n\n## Input Data You'll Receive\n\n1. Complete Lead Profile: Comprehensive data from the scoring system, including-\nContact details\nCompany information\nLead scoring results (80-100 only)\nSummary of lead\nTech-stack of the company\n\n2. Optional: Specific product/service to promote (if available)\n---\n\n\n## Knowledge Base\n\nName: Diptamoy Barman\nOccupation: AI Automation Expert (working solo)\nTarget Audience: B2Bs, Content creators, entrepreneurs, social media influencers\nKey Services/Specializations: Lead qualification systems, nurture systems, content repurposing system, chatbots, voice assistants, and other small automations.\nCommunication Style: Results-driven\nTypical Call to Action: Focused on initiating a direct conversation (e.g., \"Would you be open to a quick chat?\", \"Let's connect to discuss this further\").\n---\n\n\n## Email Composition Guidelines\n\n1. Tone & Style\n\nSeniority Matching:\n* Executives: More formal and strategic.\n* Others: Conversational and approachable.\n\nIndustry Mirroring:\n* Tech: Technical and precise.\n* Creative Fields: Friendly and engaging.\n\nName Usage: Use the lead's name naturally, a maximum of two times in the email body.\n\n\n2. Structure\n\nTo: Email of the lead\n\nSubject: [Insightful 3-7 word hook based on lead's role/company]\n\nHi [First Name],\n\n[Personalized opener - reference specific achievement/connection point]\n\n[Value proposition tailored to lead's needs based on their company/role]\n\n[Natural call-to-action]\n\nBest regards,\n[Your First Name]\n\n\n\n3. Personalization Rules\nHOT Leads (80-100 score): Focus on immediate opportunities and direct relevance.\n\n\n4. Content Requirements\nSpecific Detail: MUST reference at least one specific detail from any of the following **VERY BRIEFLY**:\n* How we came to him/her (eg,- they filled a form, showed interest to our product/service)\n* Lead's career history\n* Company growth signals\n* Tech stack/industry trends\n\nStatistic/Insight: Include one relevant statistic or insight if available and pertinent.\n\nPurposeful Content: Never use placeholder text; every sentence must be purposeful and contribute to the email's objective.\n\n\n5. Prohibited\n* Generic phrases (e.g., \"I came across your profile\").\n* Overly salesy or aggressive language.\n* Assumptions not explicitly backed by provided lead data.\n* Too long mails.\n---\n\n\n## Output Format (JSON)\n{\n  \"subject\": \"Customized email subject\",\n  \"body\": \"Full email text with proper formatting\"\n}\n---\n\n## Example\n\n### Example Input-\n{\n  \"lead_score\": 88,\n  \"status\": \"Qualified\",\n  \"label\": \"hot\",\n  \"contact_details\": {\n    \"name\": \"John Doe\",\n    \"email\": \"johndoe@gmail.com\",\n    \"job_title\": \"Head of Product\",\n    \"seniority_level\": \"Executive\"\n  },\n  \"contact_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/in/johndoe\",\n    \"twitter\": \"https://x.com/johndoe\"\n  },\n  \"company_details\": {\n    \"name\": \"Acme Corp\",\n    \"industry\": \"SaaS\",\n    \"size\": \"201-500\",\n    \"website\": \"https://acmecorp.com\",\n    \"tech_stack\": [\"React\", \"Node.js\", \"AWS\"],\n    \"growth_signals\": [\"Hiring\", \"Recent funding round\"]\n  },\n  \"company_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/company/launchly\",\n    \"twitter\": \"https://twitter.com/launchly\",\n    \"youtube\": \"https://youtube.com/launchlyco\"\n  },\n  \"summary\": \"John Doe is a senior product leader at Launchly, a growing SaaS company. Both individual and company show strong qualification signals, indicating high potential for a successful engagement. Launchly's active hiring and modern tech stack align well with John's leadership role.\",\n  \"red_flags\": null,\n  \"confidence_score\": 95\n}\n\nExample Output- \n{\n  \"To\": \"johndoe@gmail.com\",\n  \"subject\": \"Streamlining Product Growth at Acme Corp\",\n  \"body\": \"Hi John,\\n\\nYour role as Head of Product at Acme Corp, especially with your company's recent funding and active hiring, caught my attention. It’s clear you're at a pivotal point for scaling operations.\\n\\nMany SaaS companies like yours, leveraging a modern tech stack like React, Node.js, and AWS, often face challenges in optimizing their lead qualification and nurture systems as they grow. We specialize in building AI-powered automations that can significantly streamline these processes, freeing up your product team to focus on core innovation.\\n\\nWould you be open to a brief chat next week to explore how we could support Acme Corp's continued growth?\\n\\nBest regards,\\nDiptamoy\"\n}\n---\n\n## Important Considerations\n* Make sure the outreach email is brief but to-the-point\n* Make sure the mail is not generic but personalized.\n* Your response MUST ONLY contain the raw JSON object. Do not include  ```json or ```` ` at the beginning or end, or any other conversational text.\"\n* Ensure the fields 'To', 'subject', and 'body' contain the specific, generated content for the email."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "676659e6-e1c9-4c46-a64b-1e4001c06da5",
      "name": "邮件个性化(温线索)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        416
      ],
      "parameters": {
        "text": "=Here's the Lead Data-\n```\n{{ $('Summarize_N_score').item.json.text }}\n```",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are an AI Email Personalization Expert crafting value-first, nurturing emails for WARM leads based on comprehensive scoring data. Your role is to build trust and demonstrate relevance without premature sales pressure.\n---\n\n## Input Data You'll Receive\n\n1. Complete Lead Profile: Comprehensive data from the scoring system, including-\nContact details\nCompany information\nLead scoring results (60-79 only)\nSummary of lead\nTech-stack of the company (optional)\n\n2. Optional: Specific product/service to promote (if available)\n---\n\n## Knowledge Base\n\nName: Diptamoy Barman\nOccupation: AI Automation Expert (working solo)\nTarget Audience: B2Bs, Content creators, entrepreneurs, social media influencers\nKey Services/Specializations: Lead qualification systems, nurture systems, content repurposing system, chatbots, voice assistants, and other small automations.\nCommunication Style: Results-driven\nTypical Call to Action: Focused on initiating a direct conversation (e.g., \"Would you be open to a quick chat?\", \"Let's connect to discuss this further\").\n---\n\n## Email Composition Guidelines\n\n1. **Tone & Style**  \n   - *Consultative*: Focus on problem-solving rather than solutions  \n   - *Educative*: Position as helpful advisor, not seller  \n   - *Name Usage*: Same rules (max 2 mentions)  \n\n2. **Structure**  \nSubject: [Value-focused 4-8 word hook]\n\nHi [First Name],\n\n[Establish credibility through observed achievement/pattern]\n\n[Share industry insight relevant to their context]\n\n[Offer micro-value (no commitment required)]\n\n[Soft call-to-action]\n\nBest regards,\n[Your First Name]\n\n\n3. **Personalization Rules for WARM Leads**  \n   - Focus on *pain point validation* not solution pitching  \n   - Build credibility through *industry insights*  \n   - Offer *asymmetric value* (high value for low commitment)  \n\n4. **Content Requirements**  \n   - MUST include:  \n     1. Specific observation from company/lead data  \n     2. One industry statistic or benchmark  \n     3. Free resource offer (guide/template/audit)  \n   - Avoid: Direct product mentions or \"demo\" requests  \n\n5. **Prohibited**  \n  * Generic phrases (e.g., \"I came across your profile\").\n  * Overly salesy or aggressive language.\n  * Assumptions not explicitly backed by provided lead data.\n  * Too long mails.  \n  * no \"free consultation\" offers  \n---\n\n## Output Format (JSON)  \n{\n  \"To\": \"Email address of the lead\",\n  \"subject\": \"Customized email subject\",\n  \"body\": \"Full email text with proper formatting\"\n}  \n---\n\n## Example  \n\n### Input (WARM lead snippet)  \n{\n  \"lead_score\": 72,\n  \"status\": \"Qualified\",\n  \"label\": \"warm\",\n  \"contact_details\": {\n    \"name\": \"Sarah Chen\",\n    \"email\": \"sarah@growthhive.io\",\n    \"job_title\": \"Marketing Director\",\n    \"seniority_level\": \"Senior\"\n  },\n  \"contact_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/in/sarahchen-growth\",\n    \"twitter\": \"https://x.com/sarah_hive\"\n  },\n  \"company_details\": {\n    \"name\": \"GrowthHive\",\n    \"industry\": \"Marketing Tech\",\n    \"size\": \"51-200\",\n    \"website\": \"https://growthhive.io\",\n    \"tech_stack\": [\"HubSpot\", \"Canva\", \"Google Analytics\"],\n    \"growth_signals\": [\"Expanding to SEA\", \"New podcast launch\", \"Recent agency acquisition\"]\n  },\n  \"company_social_profiles\": {\n    \"linkedin\": \"https://linkedin.com/company/growthhive\",\n    \"twitter\": \"https://twitter.com/growthhive\",\n    \"youtube\": \"https://youtube.com/growthhive\"\n  },\n  \"summary\": \"Sarah Chen leads marketing at GrowthHive, a scaling MarTech firm expanding to Southeast Asia. Shows moderate automation maturity with basic tech stack. Recent acquisition indicates growth phase but limited AI adoption.\",\n  \"red_flags\": \"Basic tech stack may limit scaling capabilities\",\n  \"confidence_score\": 85\n}\n\n### Output\n{\n  \"To\": \"sarah@growthhive.io\",\n  \"subject\": \"Scaling Content Across SEA Markets\",\n  \"body\": \"Hi Sarah,\\n\\nNoticing GrowthHive's expansion into Southeast Asia and your new podcast - impressive growth trajectory! Marketing teams scaling in this region see 40% higher engagement when localizing content (McKinsey 2024).\\n\\nI've created a lightweight checklist for avoiding common localization pitfalls - want me to share it? No strings attached.\\n\\nWhen you have 2 minutes this week, I'd appreciate your perspective on regional content trends.\\n\\nBest regards,\\nDiptamoy\"\n}\n---\n\n\n## Key Warm Lead Adjustments:\n\n* Opener: Observes without judgment (\"impressive growth\" vs HOT's \"pivotal point\")\n* Value: Offers insight (statistic) + micro-resource (checklist)\n* CTA: Asks for perspective (low pressure) vs meeting request\n* Positioning: Focuses on shared learning rather than solution-selling\n* Tension: Highlights their challenge without prescribing fix"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "7fb47b10-c36b-4b02-bcdd-e368629ae27c",
      "name": "邮件个性化(冷线索)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        448,
        640
      ],
      "parameters": {
        "text": "=Here's the Lead Data-\n```\n{{ $('Summarize_N_score').item.json.text }}\n```",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "=You are an AI Email Personalization Expert crafting awareness-building emails for COLD leads based on lead scoring data. Your role is to establish credibility without sales pressure.\n---\n\n## Input Data You'll Receive\n\n1. Complete Lead Profile:\n   - Contact details\n   - Company information\n   - Lead scoring results (0-59 only)\n   - Summary of lead\n   - Tech-stack of the company (Optional)\n   - Growth signals (Optional)\n   - Red flags (handle carefully)\n\n2. Optional: Specific product/service to promote (if available)\n---\n\n## Knowledge Base\n\nName: Diptamoy Barman\nOccupation: AI Automation Expert (working solo)\nTarget Audience: B2Bs, Content creators, entrepreneurs\nKey Services: Lead qualification, nurture systems, content repurposing\nCold Lead Approach: Pure education with zero conversion pressure\nResource Strategy: High-value no-strings content\n---\n\n## Email Composition Guidelines\n\n1. **Tone & Style**\n   - *Neutral Observer*: Position as industry commentator\n   - *Jargon-Free*: Simplify technical concepts\n   - *Name Usage*: Only in greeting (once)\n   - *Length*: 70-90 words maximum\n\n2. **Structure**  \nSubject: [Non-salesy industry insight]\n\nHi [First Name],\n\n[Industry-wide observation]\n\n[Statistic/trend relevant to their sector]\n\n[No-strings resource offer]\n\n[Positive closing without ask]\n\nBest regards,\n[Your First  Name]\n\n\n3. **Personalization Rules**\n   - Only reference neutral attributes: industry, role type\n   - Never mention: red flags, tech limitations, growth gaps\n   - Position resources as \"publicly available\"\n\n4. **Content Requirements**\n   - MUST include:\n     1. Industry statistic with source/year\n     2. One universally applicable resource\n     3. Positive industry affirmation\n   - Prohibited:\n     - Any call-to-action\n     - References to their specific data\n     - Problem/solution framing\n\n5. **Resource Strategy**\n   - Offer \"gift\" resources requiring zero commitment\n   - Examples: Anonymous case studies, trend reports\n   - Position: \"Recently shared with similar leaders\"\n---\n\n\n## Output Format (JSON)\n{\n  \"To\": \"Email address of the lead\",\n  \"subject\": \"Email subject (4-7 words)\",\n  \"body\": \"Full email text\"\n}\n---\n\n## Example Input\n```\n{\n  \"lead_score\": 42,\n  \"contact_details\": {\n    \"name\": \"Robert Kim\",\n    \"email\": \"robert@heritagebank.com\",\n    \"job_title\": \"VP Operations\",\n    \"seniority_level\": \"Executive\"\n  },\n  \"company_details\": {\n    \"name\": \"Heritage Bank\",\n    \"industry\": \"Traditional Banking\",\n    \"size\": \"5001+\",\n    \"tech_stack\": [\"Mainframe\", \"Excel\"],\n    \"red_flag\": \"No digital transformation in 5+ years\"\n  },\n  \"summary\": \"Robert leads operations at traditional bank with minimal tech innovation. Shows resistance to automation solutions.\"\n}```\n\n## Example Output\n{\n  \"To\": \"robert@heritagebank.com\",\n  \"subject\": \"How Banking Ops Leaders Save 9 Weekly Hours\",\n  \"body\": \"Hi Robert,\\n\\nBanking operations teams are exploring new efficiency tools this year. A recent Financial Times study found 62% save 9+ weekly hours through lightweight automation pilots.\\n\\nI've published anonymous case studies of similar institutions testing non-invasive tools - available here with no signup: [Link]\\n\\nWishing you continued success navigating the evolving financial landscape.\\n\\nBest regards,\\nDiptamoy\"\n}\n---\n\n\n## Key Cold Lead Tactics:\n\n* Subject: Focuses on industry benefit (eg,- \"Banking Ops Leaders\")\n* Opening: Neutral sector observation (eg,- \"teams are exploring\")\n* Statistic: Credible source with specific metric\n* Access: \"No signup\" lowers barrier\n* Closing: Positive affirmation without engagement ask\n\n* Avoids:\n * Mentioning their legacy tech stack\n * Referencing digital transformation gap\n * Any direct call-to-action"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "ca1fc9b7-d669-4dfe-b350-83a70e529d04",
      "name": "创建草稿",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        192
      ],
      "webhookId": "54a55222-ac30-4768-bfcb-5abd3d86ea55",
      "parameters": {
        "message": "={{ $json.output.body }}",
        "options": {
          "sendTo": "={{ $json.output.To }}"
        },
        "subject": "={{ $json.output.subject }}",
        "resource": "draft"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "buEuUG9XAWEPvvmy",
          "name": "Gmail [Api]"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "cd908406-2c72-41cc-a7a3-45281a55fc8d",
      "name": "更新 CRM",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        384,
        -704
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.Lead_email }}",
            "Label": "={{ $json.label }}",
            "Summary": "={{ $json.Summary }}",
            "Industry": "={{ $json.Company_Industry }}",
            "Job title": "={{ $json[\"Lead_job-title\"] }}",
            "Lead Name": "={{ $json.Lead_Name }}",
            "Red flags": "={{ $json.Red_flags }}",
            "Lead score": "={{ $json.lead_score }}",
            "Tech stack": "={{ JSON.stringify($json.Tech_stack) }}",
            "Company URL": "={{ $json.Company_Website }}",
            "Company Name": "={{ $json.Company_name }}",
            "Company Size": "={{ $json.Company_size }}",
            "Lead Socials": "={{ $json.contact_social_profiles }}",
            "Growth signals": "={{ JSON.stringify($json.Growth_signals) }}",
            "Company Socials": "={{ $json.company_socials }}",
            "Lead confidence score": "={{ $json.confidence_score }}"
          },
          "schema": [
            {
              "id": "Lead Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Lead Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lead score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Lead score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Label",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Label",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Job title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Job title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lead Socials",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Lead Socials",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Socials",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Company Socials",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Summary",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Red flags",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Red flags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Size",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tech stack",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Tech stack",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Growth signals",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Growth signals",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Lead confidence score",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Lead confidence score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Outreach mail",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Outreach mail",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Lead Name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1riKQHaVN8OE9TW8HApdIQmAxWM3GZFQbi5Ta5mR27Ao/edit#gid=0",
          "cachedResultName": "Practice"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1riKQHaVN8OE9TW8HApdIQmAxWM3GZFQbi5Ta5mR27Ao",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1riKQHaVN8OE9TW8HApdIQmAxWM3GZFQbi5Ta5mR27Ao/edit?usp=drivesdk",
          "cachedResultName": "CRM"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "qFbzt8UEkM4EqITD",
          "name": "Google Sheets [Api.Gmail]"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "a152149e-7db5-4578-8849-86ebe5fc6561",
      "name": "通知团队",
      "type": "n8n-nodes-base.slack",
      "position": [
        912,
        -352
      ],
      "webhookId": "7151c78b-2c7f-4ed3-8dfc-05b6ba6c0b2a",
      "parameters": {
        "text": "=*HOT Lead Alert*\n\nName: {{ $json.Lead_Name }}\nemail: {{ $json.Lead_email }}\nLead score: {{ $json.lead_score }}\nCompany website: {{ $json.Company_Website }}\n\nSend/ edit the draft mail here: https://mail.google.com/mail/u/0/#drafts?compose={{ $json.message.id }}\nCheck lead details here: <your_google_sheets_ID>",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C095G55KJ3X",
          "cachedResultName": "new-lead-notification"
        },
        "otherOptions": {
          "unfurl_links": false,
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "id": "PHT6BhzuJ9HLl9Uc",
          "name": "Slack [Api.Gmail]"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0876072a-5c07-4609-977f-cae5bc08a66a",
      "name": "设置数据",
      "type": "n8n-nodes-base.set",
      "position": [
        16,
        -624
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "06b133dc-f975-4815-958d-43cc14231253",
              "name": "label",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.label }}"
            },
            {
              "id": "a4e39775-328d-4aa6-8741-6f7f49995e1d",
              "name": "Lead_Name",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.contact_details.name }}"
            },
            {
              "id": "1a2c9926-0e04-4fbc-810f-12cadcef5376",
              "name": "lead_score",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.lead_score }}"
            },
            {
              "id": "086e0d1b-6722-4b34-9df8-88bd7c194511",
              "name": "Lead_email",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.contact_details.email }}"
            },
            {
              "id": "59ff85a2-feba-4067-bd71-e19ee4eebb09",
              "name": "Lead_job-title",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.contact_details.job_title }} ({{ $('Structured Output').item.json.contact_details.seniority_level }})"
            },
            {
              "id": "469017bb-421c-47dc-b159-16ebe985a71c",
              "name": "contact_social_profiles",
              "type": "string",
              "value": "={{ JSON.stringify($('Structured Output').item.json.contact_social_profiles) }}"
            },
            {
              "id": "fd922c88-e42e-48a2-afb2-99de8e08ecfe",
              "name": "Company_name",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.company_details.name }}"
            },
            {
              "id": "6efd732c-b958-4ea5-829b-521cf5a73cc3",
              "name": "Company_Industry",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.company_details.industry }}"
            },
            {
              "id": "3d195c14-368d-426e-9f75-a38c5d36cee8",
              "name": "Company_Website",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.company_details.website }}"
            },
            {
              "id": "0e9d5f93-bbc7-4e87-bb10-603a181a4fa9",
              "name": "company_socials",
              "type": "string",
              "value": "={{ JSON.stringify($('Structured Output').item.json.company_social_profiles) }}"
            },
            {
              "id": "10ea6cda-3901-4d61-abd6-a609fdcf0df3",
              "name": "Summary",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.summary }}"
            },
            {
              "id": "5c1d9427-5b7b-4de3-92fb-bf9173b69a7f",
              "name": "Company_size",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.company_details.size }}"
            },
            {
              "id": "4693699f-c8a7-407a-b6f8-6b932a3b7660",
              "name": "Tech_stack",
              "type": "array",
              "value": "={{ $('Structured Output').item.json.company_details.tech_stack }}"
            },
            {
              "id": "5ec81b8e-7a2e-40a5-a5e1-867168bf4f6e",
              "name": "Growth_signals",
              "type": "array",
              "value": "={{ $('Structured Output').item.json.company_details.growth_signals }}"
            },
            {
              "id": "b62b7d52-688b-48aa-8632-73fb061ae690",
              "name": "Red_flags",
              "type": "string",
              "value": "={{ $('Structured Output').item.json.red_flags }}"
            },
            {
              "id": "c77fb15e-6b79-4e88-bae8-84c365be64f7",
              "name": "confidence_score",
              "type": "number",
              "value": "={{ $('Structured Output').item.json.confidence_score }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1a036c4b-9003-467d-9ab3-58e1f30b85ae",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2112,
        -256
      ],
      "parameters": {
        "width": 464,
        "height": 368,
        "content": "## 🟧 线索收集\\n表单 → 从您的网站/联系页面捕获访客详细信息(姓名、邮箱、公司、职位)。\\n\\n编辑字段 → 规范化输入(合并姓名、提取公司网址)。"
      },
      "typeVersion": 1
    },
    {
      "id": "4f63151d-fd6d-4455-9e0f-e70d5c64fa93",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -544
      ],
      "parameters": {
        "width": 528,
        "height": 784,
        "content": "## 🔵 线索丰富\\n评分个人(相关性)→ 调用 Relevance AI 评估线索的个人匹配度(角色、专业能力、影响力)。\\n\\n评分公司(相关性)→ 调用 Relevance AI 评估公司的市场匹配度、规模、增长信号等。\\n\\n合并 → 将两个评分合并为一个有效载荷进行整体评估。"
      },
      "typeVersion": 1
    },
    {
      "id": "6835df06-c477-4694-8c4b-1510dfa624f0",
      "name": "合并数据",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1152,
        -48
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "04f36d10-2f86-4df1-b326-dd241e5e6f44",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        -240
      ],
      "parameters": {
        "width": 512,
        "height": 528,
        "content": "## 🟩 线索评分与洞察\\n总结与评分 → AI 分析合并数据(40%个人 + 60%公司)以对照理想客户画像,生成最终线索评分、资格状态和结构化 JSON 输出。\\n\\n结构化输出 → 清理并解析 LLM 输出,确保为后续步骤提供一致的 JSON。"
      },
      "typeVersion": 1
    },
    {
      "id": "6404a8a5-b72d-4c3b-b55c-52cf62d4f395",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -864
      ],
      "parameters": {
        "width": 576,
        "height": 400,
        "content": "## 🟨 数据处理\\n设置数据 → 提取关键字段(线索姓名、邮箱、标签、摘要、风险标志等)用于 CRM 和路由。\\n\\n更新 CRM(Google Sheets)→ 在您的 CRM 表格中记录或更新线索详情以进行跟踪。"
      },
      "typeVersion": 1
    },
    {
      "id": "0caa564b-f69a-4d41-8c2f-23930f56b2a6",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        0
      ],
      "parameters": {
        "width": 304,
        "height": 400,
        "content": "## 🔀 按线索质量路由\\n路由器 → 根据评分阈值将线索分为热/温/冷:\\n\\n热线索:≥80\\n\\n温线索:60–79\\n\\n冷线索:<60"
      },
      "typeVersion": 1
    },
    {
      "id": "d0df6c65-fb78-4d0d-8bbe-54d83d877873",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -64
      ],
      "parameters": {
        "width": 800,
        "height": 1056,
        "content": "## ✉️ 附加功能:个性化外联\\n邮件个性化(热线索)→ 生成高影响力、以转化为导向的外联邮件。\\n\\n邮件个性化(温线索)→ 创建建立信任、咨询式的邮件。\\n\\n邮件个性化(冷线索)→ 发送中性、以提升认知度为主的邮件(无销售推动)。\\n\\n创建草稿(Gmail)→ 为热线索起草外联邮件(让团队在发送前审核)。\\n\\n发送邮件 → 直接向温/冷线索发送邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "6f3ae231-c8c4-4070-af56-8d18984a0d64",
      "name": "发送邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        528
      ],
      "webhookId": "54a55222-ac30-4768-bfcb-5abd3d86ea55",
      "parameters": {
        "sendTo": "={{ $json.output.To }}",
        "message": "={{ $json.output.body }}",
        "options": {},
        "subject": "={{ $json.output.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "buEuUG9XAWEPvvmy",
          "name": "Gmail [Api]"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eb084bdf-d233-4d07-9dab-fb06dc7dceca",
      "name": "### 需要帮助?",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -416
      ],
      "parameters": {
        "width": 432,
        "height": 224,
        "content": "## 热线索通知"
      },
      "typeVersion": 1
    },
    {
      "id": "18c43755-6fb7-4d80-b907-c966d9f4740d",
      "name": "合并数据+邮件",
      "type": "n8n-nodes-base.merge",
      "position": [
        672,
        -352
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "df2d6715-9ec7-4fc9-8f2b-86f73e965282",
      "name": "GET 模型",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3232,
        -832
      ],
      "parameters": {
        "color": 6,
        "width": 1040,
        "height": 1856,
        "content": "## ⚙️ 设置与配置指南\\n本指南帮助您(或任何克隆此工作流的人)快速完成设置。\\n---\\n\\n### 🔑 1. API 与凭证设置\\n- **Relevance AI**\\n  - 在 [Relevance AI](https://relevanceai.com) 注册。\\n  - 为线索和公司评分创建一个**项目**和**工作室**。\\n  - 生成 **API 密钥** → 粘贴到以下节点的 HTTP 请求头中:\\n    - `评分个人(相关性)` 节点\\n    - `评分公司(相关性)` 节点\\n- **Google Sheets**(用于 CRM 记录)\\n  - 在 n8n 中连接您的 Google 账户。\\n  - 确保您的表格有所需列,或让 n8n 创建它们。\\n  - [克隆此表格模板用作 CRM](https://docs.google.com/spreadsheets/d/1riKQHaVN8OE9TW8HApdIQmAxWM3GZFQbi5Ta5mR27Ao/edit?usp=sharing)\\n- **Gmail**\\n  - 通过 OAuth 在 n8n 中连接您的 Gmail。\\n  - 允许 `草稿` 和 `发送邮件` 权限。\\n- **Slack(可选)**\\n  - 创建一个 Slack 应用和机器人令牌。\\n  - 在 n8n Slack 凭证中添加它。\\n  - 将示例频道 ID 替换为您自己的。\\n---\\n\\n### 📈 2. Relevance AI 模板\\n- [个人线索评分](https://app.relevanceai.com/notebook/f1db6c/0d4f22cd-d888-4b97-a7d6-c9a44ae87137/d27e0c3f-3d61-4d16-b298-83cbbd031e44)\\n\\n- [公司评分](https://app.relevanceai.com/notebook/f1db6c/0d4f22cd-d888-4b97-a7d6-c9a44ae87137/c4de5d95-6ad4-48da-a3b4-1eb0c88f7fcb)\\n\\n在您自己的 Relevance AI 实例中克隆这些模板\\n---\\n\\n### 👥 3. 线索收集选项\\n您可以使用**任何与 n8n 集成的表单平台**:\\n\\n- **n8n 表单触发器** *(本示例中使用)*\\n- **Typeform**、**Tally**、**Paperform**、**Jotform** 等\\n- **HubSpot 表单** 或其他 CRM 原生表单\\n- **自定义网站表单** 通过 webhook\\n\\n💡 提示:收集更多字段(如 LinkedIn 个人资料、公司规模、行业)可提高评分准确性。\\n---\\n\\n### 🗄️ 4. CRM 目的地\\n您可以将合格线索存储在任何地方:\\n\\n- **Google Sheets** *(此工作流已包含)*\\n- **HubSpot CRM**\\n- **Pipedrive**\\n- **Zoho**\\n- **Salesforce**\\n- **Airtable** 或 **Notion**\\n- 任何 SQL/NoSQL 数据库\\n\\n👉 只需将 **“更新 CRM”** 节点替换为您首选的 CRM 连接器。\\n---\\n\\n### 🔀 5. 自定义线索评分\\n- 在您的 Relevance AI 模板中调整**个人和公司评分之间的权重**(默认:40% 个人 / 60% 公司)。\\n- 更改**路由器阈值**:\\n  - 热线索 → 80–100\\n  - 温线索 → 60–79\\n  - 冷线索 → 低于 60\\n- 添加自定义规则(例如,优先处理某些行业,排除竞争对手)。\\n---\\n\\n### 💌 6. 邮件发送\\n- 热线索 → 创建**草稿**邮件,在发送前手动审核。\\n- 温和冷线索 → 自动发送。\\n- 您可以将 Gmail 替换为:\\n  - **Outlook**\\n  - **HubSpot 邮件**\\n  - **SendGrid**、**Mailgun**\\n  - n8n 支持的任何邮件提供商\\n---\\n\\n### 🚀 7. 扩展与增强\\n- 使用 **Clearbit**、**Apollo** 或 **ZoomInfo** 等服务丰富线索信息。\\n- 直接同步到您的 **CRM 管道**(HubSpot、Salesforce 等)。\\n- 根据回复或不活跃情况添加**跟进序列**。\\n- 为敏感或高价值线索包含**人工审批步骤**。\\n---\\n\\n💡 **注意:** 保持 API 密钥机密。请勿在截图或公共仓库中分享它们。使用 OAuth 凭证而非将 API 硬编码到节点中。"
      },
      "typeVersion": 1
    },
    {
      "id": "b237e96c-3d48-44c0-b467-d1453e82a01d",
      "name": "## 试试看!",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3152,
        -1056
      ],
      "parameters": {
        "color": 5,
        "width": 880,
        "height": 192,
        "content": "## 此工作流使用 Relevance AI + n8n 自动化线索资格认证。它同时对个人和公司进行评分,按质量路由,并触发定制化的外联——同时记录到 CRM 并通知团队。"
      },
      "typeVersion": 1
    },
    {
      "id": "96566740-b1d2-474f-a2c2-335a04584534",
      "name": "## 1. 创建新的自定义 OpenAI 凭据",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2032,
        -832
      ],
      "parameters": {
        "color": 7,
        "width": 1056,
        "content": "## 我在 **表单** 和 **RelevanceAI** 节点中固定了一些数据。您可以查看这些数据以了解数据的外观。"
      },
      "typeVersion": 1
    },
    {
      "id": "cb5367fb-6522-4c5e-8295-771ebb4a40b0",
      "name": "便签10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        272
      ],
      "parameters": {
        "color": 4,
        "width": 352,
        "height": 112,
        "content": "## 快速提示:"
      },
      "typeVersion": 1
    },
    {
      "id": "0fcb90e4-4bee-4961-b424-787d624c3cbf",
      "name": "便签 11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -496
      ],
      "parameters": {
        "color": 3,
        "height": 288,
        "content": "## 配置我!"
      },
      "typeVersion": 1
    },
    {
      "id": "7160316a-d39c-4261-8df5-dbd87fcc925d",
      "name": "便签 12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -304
      ],
      "parameters": {
        "color": 3,
        "height": 544,
        "content": "## 配置我们!"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {
    "Form": [
      {
        "formMode": "test",
        "Job title": "founder and ceo",
        "Last Name": "Ottley",
        "First Name": "Liam",
        "submittedAt": "2025-07-06T12:16:53.976+02:00",
        "Phone Number": 0,
        "Email Address": "liamottley@gmail.com",
        "Company Website": "morningside.ai"
      }
    ],
    "score company (Relevance)": [
      {
        "output": {
          "label": "warm",
          "status": "Qualified",
          "summary": "Morningside AI is a fast-growing AI consulting firm with a strong online presence and a modern tech stack, positioning itself as a full-cycle AI partner. Despite impressive stated achievements, a significant red flag exists with unpopulated metrics on their website.",
          "website": "https://morningside.ai/",
          "industry": "AI Consulting/Tech-enabled Services",
          "red_flag": "Website displays '0+' for key achievement metrics (AI Opportunities identified, Bespoke AI solutions developed), significantly undermining credibility and professionalism.",
          "lead_score": 65,
          "tech_stack": [
            "Vercel",
            "Amazon",
            "Namecheap DNS",
            "CloudFront",
            "Google Analytics 4",
            "Google Tag Manager",
            "Facebook Pixel",
            "Webflow",
            "Next.js",
            "Cloudflare",
            "AWS Lambda",
            "reCAPTCHA Enterprise"
          ],
          "company_name": "Morningside AI",
          "company_size": "11-50",
          "key_insights": "The '0+' metrics on their website are a critical oversight that undermines credibility and should be highlighted in any outreach. Their focus on 'AI-first' transformation and internal team empowerment suggests a strategic approach to AI adoption, making them a good fit for solutions that support long-term AI integration. Their broad network of AI Automation Agencies could also present partnership opportunities.",
          "growth_signals": [
            "Consulted 40,000+ AI Automation Agencies",
            "Identified 435+ AI use cases",
            "Developed 50+ tailored AI solutions",
            "Cultivated network of 17M+ professionals"
          ],
          "social_profiles": {
            "YouTube": "https://www.youtube.com/@MorningsideAI",
            "Facebook": "https://www.facebook.com/MorningsideAI",
            "LinkedIn": "https://www.linkedin.com/company/morningside-ai/"
          }
        }
      }
    ],
    "score individual (Relevance)": [
      {
        "output": {
          "name": "Liam Ottley",
          "size": "11-50 (inferred for AAA Accelerator)",
          "label": "hot",
          "score": 90,
          "title": "Founder",
          "skills": [
            "AI Expertise",
            "Entrepreneurship",
            "Digital Marketing",
            "Content Creation",
            "Community Building",
            "Leadership",
            "Strategic Thinking"
          ],
          "status": "Qualified",
          "company": "AAA Accelerator & Morningside AI",
          "summary": "Liam Ottley is a highly accomplished and influential entrepreneur in the AI space, leading two successful ventures and building a significant online presence. His expertise spans AI development, education, and digital marketing, making him a strong candidate for strategic partnerships or high-level engagement.",
          "email_id": "liamottley@gmail.com",
          "industry": "Tech-enabled services (AI Education/Development)",
          "profiles": {
            "YouTube": "https://www.youtube.com/@LiamOttley",
            "LinkedIn": "https://www.linkedin.com/in/liamottley/"
          },
          "red_flag": "Minor data inconsistencies (company size range vs. employee count, minor date discrepancy for AAA Accelerator tenure).",
          "stability": "High (serial entrepreneur with current long-term ventures)",
          "key-insights": "Liam is a founder of two AI-focused companies and a prominent AI content creator with a large audience. He demonstrates strong entrepreneurial drive, deep AI expertise, and a proven ability to build and scale businesses and communities. He is a key decision-maker and thought leader in the AI education and development sectors."
        }
      }
    ]
  },
  "connections": {
    "Form": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize_N_score",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Router": {
      "main": [
        [
          {
            "node": "Email Personalizer (HOT)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Personalizer (WARM)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Email Personalizer (COLD)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deepseek": {
      "ai_languageModel": [
        []
      ]
    },
    "Set data": {
      "main": [
        [
          {
            "node": "Update CRM",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge data+mail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge data": {
      "main": [
        [
          {
            "node": "Summarize_N_score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update CRM": {
      "main": [
        []
      ]
    },
    "Deepseek R1": {
      "ai_languageModel": [
        [
          {
            "node": "Email Personalizer (WARM)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Email Personalizer (COLD)",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Email Personalizer (HOT)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "score individual (Relevance)",
            "type": "main",
            "index": 0
          },
          {
            "node": "score company (Relevance)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a draft": {
      "main": [
        [
          {
            "node": "Merge data+mail",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge data+mail": {
      "main": [
        [
          {
            "node": "Notify team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "main": [
        [
          {
            "node": "Set data",
            "type": "main",
            "index": 0
          },
          {
            "node": "Router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize_N_score": {
      "main": [
        [
          {
            "node": "Structured Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (HOT)": {
      "main": [
        [
          {
            "node": "Create a draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Email Personalizer (HOT)",
            "type": "ai_outputParser",
            "index": 0
          },
          {
            "node": "Email Personalizer (COLD)",
            "type": "ai_outputParser",
            "index": 0
          },
          {
            "node": "Email Personalizer (WARM)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (COLD)": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Personalizer (WARM)": {
      "main": [
        [
          {
            "node": "Send email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "score company (Relevance)": {
      "main": [
        [
          {
            "node": "Merge data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "score individual (Relevance)": {
      "main": [
        [
          {
            "node": "Merge data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 多模态 AI

需要付费吗?

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

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

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

作者
Diptamoy Barman

Diptamoy Barman

@diptamoy-barman

Heya 👋 I’m Diptamoy, an AI enthusiast who loves sharing & teaching n8n automation to build real workflows that scale and solve real problems. Have questions? Drop them in the comments — I'm always open to help!

外部链接
在 n8n.io 查看

分享此工作流