AI SEO可读性审核:检查网站对LLM的友好性

中级

这是一个AI、Marketing领域的自动化工作流,包含 8 个节点。主要使用 Code、HttpRequest、ChainLlm、ChatTrigger、LmChatOpenAi 等节点,结合人工智能技术实现智能自动化。 AI SEO可读性审核:检查网站对大型语言模型的友好性

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "qthXGkJCm1YAAQpW",
  "meta": {
    "instanceId": "c586b172acc6a68496c50087fe4c45ad1d861562820afb3dfa9dc2c12688d8c2",
    "templateCredsSetupCompleted": true
  },
  "name": "AI SEO 可读性审核:检查网站对 LLM 的友好性",
  "tags": [
    {
      "id": "JkpR8IEIpOrc2x6l",
      "name": "Leonard van Hemert",
      "createdAt": "2025-05-17T14:14:16.649Z",
      "updatedAt": "2025-05-17T14:14:16.649Z"
    }
  ],
  "nodes": [
    {
      "id": "ea4c49eb-5a9d-4de9-acc7-3eef90b11f29",
      "name": "当收到聊天消息时",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -340,
        -140
      ],
      "webhookId": "f41e2ff4-b329-4c64-9147-963726a1eb76",
      "parameters": {
        "public": true,
        "options": {
          "title": "🚀 AI SEO Readability Checker",
          "subtitle": "Test how AI-friendly your website is for search engines like ChatGPT & Perplexity – built by [Leonard van Hemert](https://nl.linkedin.com/in/leonard-van-hemert)",
          "responseMode": "lastNode",
          "inputPlaceholder": "https://example.com"
        },
        "initialMessages": "Hi! 👋  \nSend your website link and I’ll check how AI-friendly it is for tools like ChatGPT and Perplexity. Let’s go! 🚀"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0ede3abb-3cad-4e9a-bc8c-79d8eac06fe6",
      "name": "从网站获取 HTML",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        100,
        -140
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "timeout": 10000
        },
        "jsonHeaders": "{\n  \"User-Agent\": \"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)\",\n  \"Accept-Language\": \"nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7\"\n}",
        "sendHeaders": true,
        "specifyHeaders": "json"
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "alwaysOutputData": true
    },
    {
      "id": "96d8c97a-8d7b-41fb-a109-d56e34d7dff1",
      "name": "清理网站 URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -120,
        -140
      ],
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      url: (() => {\n        let input = $json.chatInput.trim().toLowerCase();\n        if (!input.startsWith('http')) input = 'https://' + input;\n        return input;\n      })()\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "2b8a702e-b141-4f71-9e8f-2caa69cfad80",
      "name": "提取 HTML 特性",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        -140
      ],
      "parameters": {
        "jsCode": "const html = $json.data || '';\n\n// Remove scripts, styles, and extract visible text\nconst cleanedText = html\n  .replace(/<script[\\s\\S]*?<\\/script>/gi, '')\n  .replace(/<style[\\s\\S]*?<\\/style>/gi, '')\n  .replace(/<[^>]*>/g, '') // strip all HTML tags\n  .replace(/\\s+/g, ' ')\n  .trim();\n\n// Preview: first 400 chars of visible content\nconst previewText = cleanedText.slice(0, 400);\n\n// Lowercased text for language-agnostic JS block detection\nconst lowerText = cleanedText.toLowerCase();\n\n// Common JS-related blocking messages (EN + NL + DE)\nconst jsBlockIndicators = [\n  'enable javascript',\n  'javascript is required',\n  'please enable javascript',\n  'javascript moet ingeschakeld zijn',\n  'schakel javascript in',\n  'javascript erforderlich'\n];\n\n// Scan for any of the indicators\nconst jsWarningDetected = jsBlockIndicators.some(phrase => lowerText.includes(phrase));\n\nreturn [\n  {\n    json: {\n      visibleTextLength: cleanedText.length,\n      previewText,\n      hasH1: /<h1[\\s>]/i.test(html),\n      hasH2: /<h2[\\s>]/i.test(html),\n      hasH3: /<h3[\\s>]/i.test(html),\n      hasMetaDescription: /<meta[^>]+name=[\"']description[\"']/i.test(html),\n      hasOpenGraph: /<meta[^>]+property=[\"']og:/i.test(html),\n      hasStructuredData: /<script[^>]*type=[\"']application\\/ld\\+json[\"']/i.test(html),\n      hasNoscript: /<noscript[\\s>]/i.test(html),\n      jsWarning: jsWarningDetected,\n      robotsTxt: $('Sanitize Website URL').first().json.url.replace(/\\/$/, '') + '/robots.txt'\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "58591741-7896-4f0f-a5d6-a16efccdf4a3",
      "name": "AI SEO 分析",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        540,
        -140
      ],
      "parameters": {
        "text": "=You are an expert in AI SEO analysis and AI search engine accessibility.\n\nYou are evaluating a website’s readability for LLM-based tools like ChatGPT, Perplexity, and Google AI Overviews. The website's raw HTML was fetched *without JavaScript execution*, simulating how LLMs typically see pages.\n\n---\n\n### 🧾 Technical Scan Summary\n\n**Visible content (no JS):**\n- Text length: {{ $json.visibleTextLength }} characters\n- Preview: \"{{ $json.previewText }}\"\n\n**Detected features:**\n- Structured Data (JSON-LD): {{ $json.hasStructuredData }}\n- Meta Description: {{ $json.hasMetaDescription }}\n- Open Graph Metadata: {{ $json.hasOpenGraph }}\n- Headings: H1: {{ $json.hasH1 }}, H2: {{ $json.hasH2 }}, H3: {{ $json.hasH3 }}\n- `<noscript>` fallback present: {{ $json.hasNoscript }}\n- JavaScript-blocking warning found: {{ $json.jsWarning }}\n\n---\n\n### 🎯 Your task:\nEvaluate the AI-readability of this website and return:\n\n1. An **AI Readability Score (0–10)**\n2. A **brief summary** of the current state (2–4 sentences)\n3. Up to **5 actionable recommendations** to improve visibility and accessibility for AI search engines\n\n💡 If the text length is below 300 or the `JavaScript-blocking warning found` is true, clearly state that the site may not be accessible to LLMs due to JavaScript dependency.\n\n⚠️ **Important:**\nYou must also **tell the user** to check their `robots.txt` file manually, and provide this exact clickable link:  \n👉 [{{ $json.robotsTxt }}]({{ $json.robotsTxt }})  \nExplain they must ensure bots like `GPTBot`, `ChatGPT-User`, and `Google-Extended` are **not blocked**.\n\nDo not perform this check yourself — just inform the user to do it.\n\n---\n\n🎁 Format your response like this:\n\n**Score:** x/10  \n**Summary:** ...  \n**Recommendations:**\n- ...\n- Check your robots.txt file at [{{ $json.robotsTxt }}]({{ $json.robotsTxt }}) to ensure AI bots are allowed.",
        "promptType": "define"
      },
      "typeVersion": 1.6
    },
    {
      "id": "080e40e2-bfb3-42df-8f92-ac1379135aad",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        20
      ],
      "parameters": {
        "color": 4,
        "width": 740,
        "height": 700,
        "content": "# 🚀 AI SEO 可读性审核工作流"
      },
      "typeVersion": 1
    },
    {
      "id": "a737c2cb-1d6c-4e69-9d92-c7177c42049a",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        260
      ],
      "parameters": {
        "width": 540,
        "height": 460,
        "content": "# **🚀 由 Leonard van Hemert 开发**"
      },
      "typeVersion": 1
    },
    {
      "id": "7228e3be-1ef7-4f5a-bcb0-2a9299d53cfe",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        628,
        80
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {
          "temperature": 0.3
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "1OV4I35YEqCf9qI5",
          "name": "OpenAI account"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1",
    "executionTimeout": 300
  },
  "versionId": "9e18a350-a243-4368-b3d3-746a55bceb24",
  "connections": {
    "AI SEO Analysis": {
      "main": [
        []
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI SEO Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sanitize Website URL": {
      "main": [
        [
          {
            "node": "Get HTML from Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract HTML Features": {
      "main": [
        [
          {
            "node": "AI SEO Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get HTML from Website": {
      "main": [
        [
          {
            "node": "Extract HTML Features",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Sanitize Website URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个中级难度的工作流,适用于AI、Marketing等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

需要付费吗?

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

工作流信息
难度等级
中级
节点数量8
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 上查看 →

分享此工作流