{
  "id": "1ab5f363-7dd1-465e-a696-942a2e12b378",
  "name": "Website SEO Snapshot",
  "nodes": [
    {
      "parameters": {
        "content": "# Reviewed Harshith.com template\n\nFetches public HTML and reports title, description, canonical, robots, and H1 count. It is a small diagnostic, not a crawler.\n\nKeep the URL list limited to sites you own or are authorized to check. This export contains no credentials, deployment-specific IDs, webhook IDs, or pinned data.",
        "height": 310,
        "width": 430,
        "color": 7
      },
      "id": "seo-note-001",
      "name": "Read Me First",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-760, -300]
    },
    {
      "parameters": {},
      "id": "seo-trigger-001",
      "name": "Run Manually",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [-620, 60]
    },
    {
      "parameters": {
        "jsCode": "return [\n  { json: { url: 'https://www.harshith.com/' } },\n  { json: { url: 'https://www.harshith.com/consulting' } },\n];"
      },
      "id": "seo-pages-001",
      "name": "Choose Authorized Pages",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [-380, 60]
    },
    {
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true,
              "responseFormat": "text"
            }
          }
        }
      },
      "id": "seo-fetch-001",
      "name": "Fetch Public HTML",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [-120, 60]
    },
    {
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const payload = $json;\nconst html = String(payload.body || payload.data || '');\nconst sourceUrl = $('Choose Authorized Pages').item.json.url;\nconst read = (pattern) => html.match(pattern)?.[1]?.replace(/\\s+/g, ' ').trim() || '';\nconst h1Count = (html.match(/<h1(?:\\s|>)/gi) || []).length;\n\nreturn {\n  json: {\n    url: sourceUrl,\n    statusCode: payload.statusCode || null,\n    title: read(/<title[^>]*>([\\s\\S]*?)<\\/title>/i),\n    description: read(/<meta[^>]+name=[\"']description[\"'][^>]+content=[\"']([^\"']*)[\"']/i),\n    canonical: read(/<link[^>]+rel=[\"']canonical[\"'][^>]+href=[\"']([^\"']*)[\"']/i),\n    robots: read(/<meta[^>]+name=[\"']robots[\"'][^>]+content=[\"']([^\"']*)[\"']/i),\n    h1Count,\n    checkedAt: new Date().toISOString(),\n    needsReview: h1Count !== 1\n  }\n};"
      },
      "id": "seo-report-001",
      "name": "Build SEO Snapshot",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [160, 60]
    }
  ],
  "connections": {
    "Run Manually": {
      "main": [[{"node": "Choose Authorized Pages", "type": "main", "index": 0}]]
    },
    "Choose Authorized Pages": {
      "main": [[{"node": "Fetch Public HTML", "type": "main", "index": 0}]]
    },
    "Fetch Public HTML": {
      "main": [[{"node": "Build SEO Snapshot", "type": "main", "index": 0}]]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveDataErrorExecution": "none",
    "saveDataSuccessExecution": "none",
    "saveManualExecutions": false,
    "executionTimeout": 60
  },
  "tags": []
}
