8
n8n 中文网amn8n.com

我的工作流程2

高级

这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 43 个节点。主要使用 If, Set, Code, Wait, Webhook 等节点。 使用Lighthouse和GPT-4的自动化网站审计与个性化外联

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "G44pYgYD1odi0RqW",
  "meta": {
    "instanceId": "4a9efc2152e53a86a131cbceb18ee074f3387b800dd008fa606135f90255da7a",
    "templateCredsSetupCompleted": true
  },
  "name": "我的工作流程 2",
  "tags": [],
  "nodes": [
    {
      "id": "3d4e3710-7b7c-434a-8fa5-d29f4dfaa165",
      "name": "等待1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1640,
        340
      ],
      "webhookId": "55c3dc88-2797-40a4-9370-d69adcd1eede",
      "parameters": {
        "amount": 25
      },
      "typeVersion": 1.1
    },
    {
      "id": "8236459e-12c0-480a-89de-8cce992d5f09",
      "name": "获取新行",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        140,
        620
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "ff17bbac-59e9-4c67-a3c5-4f71fb1ba004",
      "name": "第一行",
      "type": "n8n-nodes-base.code",
      "position": [
        140,
        200
      ],
      "parameters": {
        "jsCode": "return [items[0]];"
      },
      "typeVersion": 2
    },
    {
      "id": "002ae828-5db7-4e57-b879-62840449580d",
      "name": "如果电子邮件不为空",
      "type": "n8n-nodes-base.if",
      "position": [
        140,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "88f0524b-2dd2-4a50-8776-9d305498776e",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.Email }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ca905c6b-dc60-4876-9349-b190051b5cb2",
      "name": "更新表格(电子邮件不存在)",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        140,
        760
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f6f76a64-5f7d-4c6e-8220-f61eef86a8cd",
      "name": "如果电子邮件不是BokaDirect的支持邮箱",
      "type": "n8n-nodes-base.if",
      "position": [
        360,
        620
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "463f92c5-e786-4bdc-bc8c-21781e683325",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.Email }}",
              "rightValue": "foto@lkjkjkj.com"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "02fa89b6-a094-489b-b78e-c6d435074b94",
      "name": "BokaDirect个人资料URL请求",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        200
      ],
      "parameters": {
        "url": "={{ $json['BokaDirect Profile'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "f68ba01c-11fe-443a-92ab-a0ad3cf60195",
      "name": "个人资料页面或重定向",
      "type": "n8n-nodes-base.code",
      "position": [
        580,
        480
      ],
      "parameters": {
        "jsCode": "const html = $('BokaDirect Profile URL Request').first().json.data; // Replace with your actual input\n\n// Regex to check for <div class=\"w-full\"> with any content inside, non-greedy\nconst regex = /<div\\s+class=[\"']w-full[\"'][^>]*>[\\s\\S]*?<\\/div>/i;\n\nconst found = regex.test(html);\n\nreturn {\n  hasWFullDiv: found\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "5a717b6c-5b7e-4149-a3c6-cb7867168824",
      "name": "获取电子邮件",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        200
      ],
      "parameters": {
        "jsCode": "const html = $('BokaDirect Profile URL Request').first().json.data; // Replace with actual HTML input\n\n// Regex to find an email address (basic pattern)\nconst emailRegex = /[\\w.+-]+@[\\w-]+\\.[\\w.-]+/g;\n\nconst match = html.match(emailRegex);\n\nreturn {\n  emailFound: !!match,\n  email: match ? match[0] : null\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "09611789-b242-4050-8a43-af96798d9305",
      "name": "更新表格URL重定向",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        580,
        1040
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "8d620fb9-7481-49fd-905b-d0d97a086054",
      "name": "决策者姓名",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        580,
        360
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "assistant",
              "content": "You're a helpful, intelligent web scraping assistant."
            },
            {
              "content": "Tell me about DecisionMakerName using the StaffList and email scrape below. Use the following JSON format.\n\n{\"DecisionMakerName\":\"\"}\n\nNOTE: Donot add variable name as json for given output. Only give output in curly brackets {given format}. For DecisionMakerName, check the name and role in given data below in this format: name1, role1; name2, role2; ....\nIf 1 or more than 1 staff members, check who's the decision maker from their roles and return their name only. \n\nAlway prioritize this:\nCheck if given email has name from the given staff list, then consider that staff a decision maker."
            },
            {
              "content": "=StaffList:  {{ $json.staff_list }}\nEmail: {{ $('FirstRow').item.json.Email }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "vsnN8w3j8HK3ETFm",
          "name": "Shahrukh Open AI"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "3dc05efa-b498-415a-9ad2-aa0c85c60000",
      "name": "业务详情",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        480
      ],
      "parameters": {
        "jsCode": "// Get HTML content from previous node\nconst htmlContent = $('BokaDirect Profile URL Request').first().json.data;\n\n// Basic HTML entity decoder\nfunction decodeHtmlEntities(str) {\n  const entities = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\",\n    '&apos;': \"'\",\n    '&nbsp;': ' ',\n  };\n  return str.replace(/&[a-zA-Z0-9#]+;/g, (entity) => entities[entity] || entity);\n}\n\n// Base64 decoding function\nfunction decodeBase64(str) {\n  return decodeURIComponent(\n    Array.prototype.map.call(atob(str), c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)).join('')\n  );\n}\n\n// Regex patterns\nconst nameRegex = /<h1.*?>(.*?)<\\/h1>/i;\nconst descriptionRegex = /<div id=\"welcomeText\".*?>(.*?)<\\/div>/is;\nconst staffNameRegex = /<span class=\" block font-semibold\">\\s*(?:<div[^>]*>.*?<\\/div>\\s*)*([^<]+)\\s*<\\/span>/g;\nconst staffRoleRegex = /<span class=\"text-black-600 text-sm\">([^<]+)<\\/span>/g;\nconst urlRegex = /<li[^>]*class=\"[^\"]*border-black-100[^\"]*\"[^>]*>[\\s\\S]*?<a[^>]*href=\"([^\"]+)\"[^>]*>/i;\nconst phoneRegex = /<meta data-react-helmet=\"true\" name=\"business:contact_data:phone_number\" content=\"(.*?)\"\\s*\\/>/i;\nconst emailImageRegex = /<img[^>]+src=\"data:image\\/png;base64,([^\"]+)\"[^>]*>/i;\n\n// Extract business name\nconst nameMatch = htmlContent.match(nameRegex);\nconst businessName = nameMatch ? decodeHtmlEntities(nameMatch[1].trim()) : null;\n\n// Extract business description\nconst descriptionMatch = htmlContent.match(descriptionRegex);\nconst businessDescription = descriptionMatch ? decodeHtmlEntities(descriptionMatch[1].trim()) : null;\n\n// Extract staff names\nconst names = [];\nlet nameMatchLoop;\nwhile ((nameMatchLoop = staffNameRegex.exec(htmlContent)) !== null) {\n  names.push(decodeHtmlEntities(nameMatchLoop[1].trim()));\n}\n\n// Extract staff roles\nconst roles = [];\nlet roleMatchLoop;\nwhile ((roleMatchLoop = staffRoleRegex.exec(htmlContent)) !== null) {\n  roles.push(decodeHtmlEntities(roleMatchLoop[1].trim()));\n}\n\n// Combine staff names and roles\nconst staffList = names.map((name, i) => {\n  const role = roles[i] || 'Unknown';\n  return `${name}, ${role}`;\n}).join('; ');\n\n// Extract URL\nconst urlMatch = htmlContent.match(urlRegex);\nconst url = urlMatch ? decodeHtmlEntities(urlMatch[1].trim()) : null;\n\n// Extract phone number\nconst phoneMatch = htmlContent.match(phoneRegex);\nconst phone = phoneMatch ? phoneMatch[1].trim() : null;\n\n// Extract email image (Base64)\nconst emailImageMatch = htmlContent.match(emailImageRegex);\nlet email = null;\n\nif (emailImageMatch) {\n  // Decode Base64 string and extract the email content\n  const base64String = emailImageMatch[1].trim();\n  const decodedEmailContent = decodeBase64(base64String);\n\n  // Assuming decoded content might contain email-like text (this can be further refined as needed)\n  // You can try a simple regex for extracting an email\n  const emailRegex = /([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})/i;\n  const emailMatch = decodedEmailContent.match(emailRegex);\n\n  if (emailMatch) {\n    email = emailMatch[1];\n  } else {\n    email = \"Decoded content doesn't contain a valid email\";\n  }\n} else {\n  email = \"No Base64 image email found\";\n}\n\nconst pBlockRegex = /<p class=\"cursor-pointer\">([\\s\\S]*?)<\\/p>/;\nconst spanRegex = /<span>(.*?)<\\/span>/g;\n\nconst pMatch = htmlContent.match(pBlockRegex);\nlet address = '';\n\nif (pMatch) {\n  const spanContent = [...pMatch[1].matchAll(spanRegex)].map(m => m[1]);\n  address = spanContent.join(', ');\n}\n\n// Decode HTML entities (like &amp; to &)\nconst txt = decodeHtmlEntities(address)\n\n// Return structured result\nreturn [\n  {\n    json: {\n      business_name: businessName,\n      business_description: businessDescription,\n      staff_list: staffList,\n      url: url,\n      phone: phone,\n      email: email,\n      location: txt\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "5e7bf73d-25c9-44ba-bf4c-9efedf3188e6",
      "name": "如果是个人资料页面或不是",
      "type": "n8n-nodes-base.if",
      "position": [
        580,
        620
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "991cacdd-b64e-4e72-8d36-70d1aeee738b",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $('ProfilePage or Redirected').item.json.hasWFullDiv }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8fe37ef9-8050-44b3-ac66-d9ec473aa532",
      "name": "如果网站存在",
      "type": "n8n-nodes-base.if",
      "position": [
        580,
        760
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "22599d7c-3e5d-4e6b-980e-5c81edd3edec",
              "operator": {
                "type": "string",
                "operation": "notStartsWith"
              },
              "leftValue": "={{ $('Business Details').item.json.url }}",
              "rightValue": "/"
            },
            {
              "id": "0f8bc517-b7a4-41f6-9f81-46c99d327f16",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $('Business Details').item.json.url }}",
              "rightValue": "none"
            },
            {
              "id": "eaef4953-4c8b-4402-92c1-a7d07ae508c1",
              "operator": {
                "type": "string",
                "operation": "notContains"
              },
              "leftValue": "={{ $('Business Details').item.json.url }}",
              "rightValue": "instagram"
            },
            {
              "id": "8f2fbedf-23fb-4638-8e99-f3432fe2fe54",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $('Business Details').item.json.url }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "281d4589-99d0-4155-9ef7-29e4558fd230",
      "name": "专业邮箱或个人邮箱",
      "type": "n8n-nodes-base.code",
      "position": [
        720,
        620
      ],
      "parameters": {
        "jsCode": "// List of keywords that indicate personal/free email providers\nconst freeEmailKeywords = [\n  \"gmail\", \"yahoo\", \"hotmail\", \"outlook\", \"aol\",\n  \"icloud\", \"live\", \"protonmail\", \"msn\", \"mail\", \n  \"zoho\", \"yandex\", \"gmx\"\n];\n\nreturn items.map(item => {\n  const email = $('FirstRow').first().json.Email || \"\";\n  const domain = email.split(\"@\")[1]?.toLowerCase() || \"\";\n\n  const isPersonal = freeEmailKeywords.some(keyword => domain.includes(keyword));\n  const isProfessional = !isPersonal;\n\n  // Extract domain only if it's a professional email\n  const result = {\n    ...item.json,\n    isProfessional,\n    emailType: isProfessional ? \"professional\" : \"personal\"\n  };\n\n  if (isProfessional) {\n    result.domain = domain;\n  }\n\n  return { json: result };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "1862d6bc-74cd-4db7-a229-67b039f5ca24",
      "name": "专业与否",
      "type": "n8n-nodes-base.if",
      "position": [
        720,
        760
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "96bf5921-7ef0-41a8-ac42-37b50fbb1e57",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.emailType }}",
              "rightValue": "professional"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "964b2306-5b0d-4126-9dc9-43f5b6f78216",
      "name": "更新网站不存在",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        580,
        1200
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f9c7aaa4-7af1-4e3c-86cd-22ca4dbebb32",
      "name": "从专业邮箱设置URL",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        900
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "65d5a8d6-e8d8-4500-abff-bd5517f728ae",
              "name": "URL",
              "type": "string",
              "value": "=https://www.{{ $json.domain }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "62fb45a6-4198-40a9-b69b-f98350414199",
      "name": "设置URL",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        900
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e0dd80bd-1a37-4c11-b808-139b529eca41",
              "name": "URL",
              "type": "string",
              "value": "={{ $('Business Details').item.json.url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d5b88f94-b13a-474e-8e21-ba470d54cdcb",
      "name": "更新抓取的业务详情",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        720,
        1040
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "2e9901f8-233f-4954-a1d1-51aa9bd9a942",
      "name": "业务网站请求",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        960,
        620
      ],
      "parameters": {
        "url": "={{ $json.URL }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "fc02ee1d-3613-421b-874b-d48ba90dbea0",
      "name": "为网站错误编写消息",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1220,
        1000
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "The error type (e.g., 404 Not Found, 500 Server Error, SSL Error, timeout)\n\n\nBasic context (business name, location, what they do)\n\n\nYour task:\n Generate a personalized icebreaker for a cold outreach email, pitching web repair, redesign, and performance/SEO improvements. Make it feel researched and human-written. Always output as a JSON below:\n{\n  \"content\": \"Hey [Team companyShort or FirstName], I tried visiting your site but it looks like it's returning a [error_type] error right now. That kind of issue can quietly block new leads, affect your SEO, or just make the business feel offline to potential customers.\\n\\nFigured you’d want to know, since it’s likely costing traffic and trust. I’ve worked on 500+ web projects over the last 8 years—fixing things like this fast, and often turning them into a chance to improve performance, ranking, and UX.\\n\\nAlong with development, I also bring SEO and AI expertise to help businesses strengthen their online presence and drive more qualified traffic. If you're open to it, happy to jump on a quick call and walk through what I’d recommend for getting your site up and performing at its best.\\n\\nNo pressure—just reaching out since I already ran the check. Let me know if you want to see some sites I’ve helped turn around.\"\n}\n\nRules Recap (for this error-based version):\n-Clearly mention the error type (e.g., 404, timeout, SSL error)\n-Highlight the cost of downtime: missed leads, SEO loss, trust issues\n-Keep tone helpful, not critical\n-Include your track record (1000+ web projects, 8 years)\n-Mention your SEO and AI expertise\n-Offer web repair + performance/redesign improvements\n-Include a soft, benefit-driven CTA (e.g., “happy to jump on a quick call…”)\n\n\nBasic Business Details: \nName: {{ $('Business Details').item.json.business_name }}\nLocation: {{ $('Business Details').item.json.location }}\nBusiness Description: {{ $('Business Details').item.json.business_description }}\nDecision Maker Name: {{ $('DecisionMaker Name').item.json.message.content.DecisionMakerName }}\n\nError Details: \nError Name: {{ $('Business Website Request').item.json.error.name }}\nError Code: {{ $('Business Website Request').item.json.error.code}}\nError Status: {{ $('Business Website Request').item.json.error.status }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "vsnN8w3j8HK3ETFm",
          "name": "Shahrukh Open AI"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "df154851-f651-4a8b-ad3e-13076f777f01",
      "name": "Lighthouse统计请求",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        1180,
        240
      ],
      "parameters": {
        "url": "=https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url={{ $('Update Scraped Business Details').item.json.URL }}&strategy=mobile&category=performance&category=accessibility&category=seo&category=best-practices&key=**YourPassKey**",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "a724316b-4643-4071-a5bb-f7c676c6ffb0",
      "name": "翻译成瑞典语",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1520,
        600
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "assistant",
              "content": "You are a native Swedish copywriter. Your job is to translate English into fluent Swedish."
            },
            {
              "content": "=Here's text to translate:\n{{ $json.message.content.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "vsnN8w3j8HK3ETFm",
          "name": "Shahrukh Open AI"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "4591596e-4646-458e-b1b8-2651a2251dc0",
      "name": "更新统计中的错误",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        1180,
        540
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "1a6e8cf0-d939-4f46-8070-1bdb03957439",
      "name": "过滤统计",
      "type": "n8n-nodes-base.code",
      "position": [
        1180,
        400
      ],
      "parameters": {
        "jsCode": "const categories = $input.first().json.lighthouseResult?.categories || {};\n\nfunction extractScore(cat) {\n  return categories[cat]?.score !== undefined\n    ? Math.round(categories[cat].score * 100)\n    : \"none\";\n}\n\nreturn [{\n  performance: extractScore(\"performance\"),\n  accessibility: extractScore(\"accessibility\"),\n  bestPractices: extractScore(\"best-practices\"),\n  seo: extractScore(\"seo\"),\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "569192d1-825e-4532-9a3d-bd5a9585cf43",
      "name": "网站截图请求",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "position": [
        1380,
        240
      ],
      "parameters": {
        "url": "=https://image.thum.io/get/fullpage/{{ $('Update Scraped Business Details').item.json.URL }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "d7561abd-1681-424f-a728-6402cb6dfaf8",
      "name": "分析UI/UX设计、Lighthouse统计和业务详情",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1520,
        220
      ],
      "parameters": {
        "text": "=We scraped a business website and collected the following data:\n- A screenshot of the homepage  \n- A Lighthouse audit with scores for Performance (e.g. 34), Accessibility (e.g. 55), SEO (e.g. 61), and Best Practices  \n- Basic context (business name, location, what they do)  \n\nYour task:  \nGenerate a personalized email copy for a cold outreach email, pitching web redesign, performance optimization, and AI features depending on what you found. Always output the icebreaker value only from the following JSON. \n\n{\n \"icebreaker\": \"Hey [FirstName/companyShort], I came across [companyShort] and thought the way you***********Write your prompt****************************************************",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "vsnN8w3j8HK3ETFm",
          "name": "Shahrukh Open AI"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "b3d56936-7c43-41f1-8b0a-7098dd0a4593",
      "name": "更新表格",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        1560,
        980
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "31bfb667-c41f-4a62-80d6-6bd33f58bf55",
      "name": "用消息和状态更新表格",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueErrorOutput",
      "position": [
        1520,
        460
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "SF8NEIL6WSj1IVIg",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b2d12902-a0dc-4459-97a4-1cc61e6e83a2",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -80,
        620
      ],
      "webhookId": "0f267a89-60f6-46c5-a97e-39c4e1452579",
      "parameters": {
        "path": "0f267a89-60f6-46c5-a97e-39c4e1452579",
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "8455a92d-5052-4bc1-8161-4698b357afbc",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        140,
        340
      ],
      "webhookId": "a1be5555-4dc5-45da-b325-acef36739068",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "981579ab-37d4-483d-932e-42700c91f616",
      "name": "等待 2",
      "type": "n8n-nodes-base.wait",
      "position": [
        140,
        920
      ],
      "webhookId": "cf54f6db-ead7-4dcb-83c9-08226efea440",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f20403fe-f238-4243-8ccd-87f582384cd4",
      "name": "等待3",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        1200
      ],
      "webhookId": "e3174a31-fbc3-4c51-95b5-6bc4cbdddb09",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "0c8ed81c-3ca9-4201-989a-016adba159b9",
      "name": "等待4",
      "type": "n8n-nodes-base.wait",
      "position": [
        580,
        1340
      ],
      "webhookId": "573bfa47-7c05-4bb4-a97d-8435a2b6d662",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b11ea917-3cd2-4acb-8f44-be75efbcd15f",
      "name": "等待5",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        1340
      ],
      "webhookId": "4396638e-aba6-45e5-84e9-d3a03ebb1939",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "87d6352f-4eb0-4e87-b34a-b24e2317fe09",
      "name": "等待6",
      "type": "n8n-nodes-base.wait",
      "position": [
        1560,
        1140
      ],
      "webhookId": "6eb88867-d8b2-41d9-b995-48cad54e0dd4",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5685ace3-0176-4fcf-8e97-c1bb70aff7cd",
      "name": "等待7",
      "type": "n8n-nodes-base.wait",
      "position": [
        1320,
        540
      ],
      "webhookId": "179cac21-c996-4e0a-bdeb-531d95bf020b",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "520c0c73-0589-49f5-9c8c-25dae8ac7d52",
      "name": "等待8",
      "type": "n8n-nodes-base.wait",
      "position": [
        1360,
        400
      ],
      "webhookId": "67e35c1e-1785-465d-998d-8bb49ce3b260",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "d171e318-d5a7-480b-9cb2-4b95e9e08985",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        60
      ],
      "parameters": {
        "color": 2,
        "width": 260,
        "height": 1100,
        "content": "# 步骤1."
      },
      "typeVersion": 1
    },
    {
      "id": "214dfeb1-daaa-4ae1-b85a-3cedc0d6ca22",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        60
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 1520,
        "content": "# 步骤2."
      },
      "typeVersion": 1
    },
    {
      "id": "eb1be7fe-147d-44d6-913b-7508e8d8ab8b",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        60
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 680,
        "content": "# 步骤3."
      },
      "typeVersion": 1
    },
    {
      "id": "fb473b10-10b7-4d37-8d8f-41b250d7b46e",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        800
      ],
      "parameters": {
        "color": 3,
        "width": 660,
        "height": 540,
        "content": "# 步骤4."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1d38610c-a6da-410e-acf9-fd3d0712094b",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get New Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Screenshot of Website Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Update Sheet (email doesn't exist)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "Update Sheet URL redirected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "Update Website doesn't exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait5": {
      "main": [
        [
          {
            "node": "Update Scraped Business Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait6": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait7": {
      "main": [
        [
          {
            "node": "Update Error in Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait8": {
      "main": [
        [
          {
            "node": "Update Sheet with messages and Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set URL": {
      "main": [
        [
          {
            "node": "Update Scraped Business Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Get New Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FirstRow": {
      "main": [
        [
          {
            "node": "If Email is not Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Email": {
      "main": [
        [
          {
            "node": "If ProfilePage or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Stats": {
      "main": [
        [
          {
            "node": "Screenshot of Website Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get New Rows": {
      "main": [
        [
          {
            "node": "FirstRow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet": {
      "main": [
        [],
        [
          {
            "node": "Wait6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Business Details": {
      "main": [
        [
          {
            "node": "DecisionMaker Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If website exist": {
      "main": [
        [
          {
            "node": "Set URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Professional Email or Personal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DecisionMaker Name": {
      "main": [
        [
          {
            "node": "If website exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Professional or Not": {
      "main": [
        [
          {
            "node": "Set URL from Professional Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Website doesn't exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Email is not Empty": {
      "main": [
        [
          {
            "node": "If Email is not BokaDirect's support email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sheet (email doesn't exist)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If ProfilePage or not": {
      "main": [
        [
          {
            "node": "Business Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sheet URL redirected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Error in Stats": {
      "main": [
        [],
        [
          {
            "node": "Wait7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Translate into Swedish": {
      "main": [
        []
      ]
    },
    "Business Website Request": {
      "main": [
        [
          {
            "node": "Lighthouse Stats Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Write message for error in Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lighthouse Stats Request": {
      "main": [
        [
          {
            "node": "Filter Stats",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Error in Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ProfilePage or Redirected": {
      "main": [
        [
          {
            "node": "Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet URL redirected": {
      "main": [
        [],
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Website doesn't exist": {
      "main": [
        [],
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Screenshot of Website Request": {
      "main": [
        [
          {
            "node": "Analyse UI/UX design, Lighthouse stats & Business details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "BokaDirect Profile URL Request": {
      "main": [
        [
          {
            "node": "ProfilePage or Redirected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Professional Email or Personal": {
      "main": [
        [
          {
            "node": "Professional or Not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set URL from Professional Email": {
      "main": [
        [
          {
            "node": "Update Scraped Business Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Scraped Business Details": {
      "main": [
        [
          {
            "node": "Business Website Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet (email doesn't exist)": {
      "main": [
        [
          {
            "node": "Get New Rows",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write message for error in Website": {
      "main": [
        [
          {
            "node": "Update Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Sheet with messages and Status": {
      "main": [
        [],
        [
          {
            "node": "Wait8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Email is not BokaDirect's support email": {
      "main": [
        [
          {
            "node": "BokaDirect Profile URL Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update Sheet URL redirected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyse UI/UX design, Lighthouse stats & Business details": {
      "main": [
        [
          {
            "node": "Update Sheet with messages and Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 客户培育, 多模态 AI

需要付费吗?

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

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

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

作者
Shahrukh

Shahrukh

@shahrukhma

I build AI-driven lead generation and automation systems that help businesses scale without heavy ad spend or manual outreach. With expertise in sales automation, n8n workflows, and personalized cold email, I focus on creating predictable pipelines and reducing CAC. My goal: deliver measurable revenue growth through smart, scalable systems.

外部链接
在 n8n.io 查看

分享此工作流