{
  "name": "AI Content Machine - Free 004 Brief Readiness Validator",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "id": "d1700400-0000-4000-8000-000000000001",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "d1700400-0000-4000-8000-000000000002", "name": "brief_title", "value": "How to validate an n8n content workflow", "type": "string" },
            { "id": "d1700400-0000-4000-8000-000000000003", "name": "target_audience", "value": "Small content operations teams", "type": "string" },
            { "id": "d1700400-0000-4000-8000-000000000004", "name": "primary_keyword", "value": "n8n content workflow", "type": "string" },
            { "id": "d1700400-0000-4000-8000-000000000005", "name": "objective", "value": "Teach readers to validate inputs before AI generation", "type": "string" },
            { "id": "d1700400-0000-4000-8000-000000000006", "name": "outline", "value": "Why validation matters\nRequired fields\nPositive and negative tests", "type": "string" }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [260, 0],
      "id": "d1700400-0000-4000-8000-000000000007",
      "name": "Sample Brief"
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json;\nconst required = ['brief_title', 'target_audience', 'primary_keyword', 'objective', 'outline'];\nconst missing = required.filter((key) => !String(input[key] ?? '').trim());\nif (missing.length) throw new Error(`Brief is not ready. Missing required fields: ${missing.join(', ')}`);\nconst outlineSections = String(input.outline).split('\\n').map((item) => item.trim()).filter(Boolean);\nif (outlineSections.length < 3) throw new Error('Brief is not ready. Outline requires at least 3 sections');\nreturn [{ json: { ...input, outline_sections: outlineSections, validation_score: 100, status: 'brief_ready', workflow_stage: 'brief_validation' } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [520, 0],
      "id": "d1700400-0000-4000-8000-000000000008",
      "name": "Validate Brief Readiness"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": { "main": [[{ "node": "Sample Brief", "type": "main", "index": 0 }]] },
    "Sample Brief": { "main": [[{ "node": "Validate Brief Readiness", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "active": false,
  "settings": { "executionOrder": "v1" },
  "tags": []
}
