{
  "name": "Nodbot - SEO brief factory with fact-check queue",
  "nodes": [
    {
      "parameters": {
        "path": "content-factory-seo-briefs",
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "id": "6a66fe48-26e0-444f-8791-3d7d7a30b23f",
      "name": "Webhook brief request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        260
      ]
    },
    {
      "parameters": {
        "jsCode": "const src = $json.body ?? $json;\nconst topic = String(src.topic ?? '').trim();\nconst keyword = String(src.primary_keyword ?? '').trim().toLowerCase();\nconst intent = String(src.intent ?? '').trim();\n\nif (!topic || topic.length < 12) {\n  throw new Error('Topic is too short for SEO brief');\n}\n\nconst required = ['payload', 'workflow json', 'production', 'code node'];\nconst mustInclude = (src.must_include ?? []).map(v => String(v).toLowerCase());\nconst missing = required.filter(item => !mustInclude.join(' ').includes(item));\n\nconst slug = topic\n  .toLowerCase()\n  .replace(/[^a-zа-яё0-9]+/gi, '-')\n  .replace(/^-|-$/g, '')\n  .slice(0, 80);\n\nreturn [{\n  json: {\n    content_status: missing.length ? 'needs_editor_review' : 'ready_for_brief',\n    slug,\n    title_angle: `${topic}: конкретная проблема и production-решение`,\n    search_intent: intent || 'problem-solution tutorial',\n    primary_keyword: keyword,\n    required_blocks: ['Problem/Solution', 'TOC', 'workflow JSON', 'test payload', 'risks', 'CTA'],\n    missing_requirements: missing,\n    llm_summary: `SEO-бриф для статьи: ${topic}. Интент: ${intent || keyword}`,\n    created_at: new Date().toISOString()\n  }\n}];"
      },
      "id": "4dfa3716-e43d-4aeb-8bad-f83d6b37fa24",
      "name": "Validate brief inputs",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        260
      ]
    },
    {
      "parameters": {},
      "id": "559aa75d-d9b4-44ac-9be2-15f63678b6bd",
      "name": "Collect official sources",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        560,
        260
      ]
    },
    {
      "parameters": {
        "jsCode": "const src = $json.body ?? $json;\nconst topic = String(src.topic ?? '').trim();\nconst keyword = String(src.primary_keyword ?? '').trim().toLowerCase();\nconst intent = String(src.intent ?? '').trim();\n\nif (!topic || topic.length < 12) {\n  throw new Error('Topic is too short for SEO brief');\n}\n\nconst required = ['payload', 'workflow json', 'production', 'code node'];\nconst mustInclude = (src.must_include ?? []).map(v => String(v).toLowerCase());\nconst missing = required.filter(item => !mustInclude.join(' ').includes(item));\n\nconst slug = topic\n  .toLowerCase()\n  .replace(/[^a-zа-яё0-9]+/gi, '-')\n  .replace(/^-|-$/g, '')\n  .slice(0, 80);\n\nreturn [{\n  json: {\n    content_status: missing.length ? 'needs_editor_review' : 'ready_for_brief',\n    slug,\n    title_angle: `${topic}: конкретная проблема и production-решение`,\n    search_intent: intent || 'problem-solution tutorial',\n    primary_keyword: keyword,\n    required_blocks: ['Problem/Solution', 'TOC', 'workflow JSON', 'test payload', 'risks', 'CTA'],\n    missing_requirements: missing,\n    llm_summary: `SEO-бриф для статьи: ${topic}. Интент: ${intent || keyword}`,\n    created_at: new Date().toISOString()\n  }\n}];"
      },
      "id": "5fcbd631-f590-4939-81e2-8ee4e4be9566",
      "name": "Build editor task",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        840,
        260
      ]
    },
    {
      "parameters": {},
      "id": "73dcc0b4-269f-4ecb-b70a-fcb3a1d5bacf",
      "name": "Queue for publication",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1120,
        260
      ]
    }
  ],
  "connections": {
    "Webhook brief request": {
      "main": [
        [
          {
            "node": "Validate brief inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate brief inputs": {
      "main": [
        [
          {
            "node": "Collect official sources",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect official sources": {
      "main": [
        [
          {
            "node": "Build editor task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build editor task": {
      "main": [
        [
          {
            "node": "Queue for publication",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [
    "nodbot",
    "production",
    "template"
  ],
  "triggerCount": 1,
  "updatedAt": "2026-05-30T00:00:00.000Z",
  "versionId": "d03ec6b0-0b2f-4c7e-8740-d60921450585",
  "meta": {
    "templateCredsSetupCompleted": false
  }
}