{
  "name": "AI Content Machine - Free 006 Editorial Human Review Gate",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0],
      "id": "d1700600-0000-4000-8000-000000000001",
      "name": "When clicking 'Execute workflow'"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "d1700600-0000-4000-8000-000000000002", "name": "content_id", "value": "article-001", "type": "string" },
            { "id": "d1700600-0000-4000-8000-000000000003", "name": "review_decision", "value": "approved", "type": "string" },
            { "id": "d1700600-0000-4000-8000-000000000004", "name": "reviewer", "value": "Adjair Gouveia", "type": "string" },
            { "id": "d1700600-0000-4000-8000-000000000005", "name": "review_notes", "value": "Structure, factual markers and call to action reviewed.", "type": "string" }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [260, 0],
      "id": "d1700600-0000-4000-8000-000000000006",
      "name": "Sample Review Decision"
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json;\nconst required = ['content_id', 'review_decision', 'reviewer'];\nconst missing = required.filter((key) => !String(input[key] ?? '').trim());\nif (missing.length) throw new Error(`Human review is incomplete. Missing required fields: ${missing.join(', ')}`);\nconst decision = String(input.review_decision).trim().toLowerCase();\nif (decision !== 'approved') throw new Error(`Human review blocked the workflow. Decision: ${decision || 'missing'}`);\nreturn [{ json: { ...input, review_decision: decision, status: 'approved_for_packaging', review_status: 'approved', next_stage: 'markdown_packaging', copyright: '© 2026 Adjair Gouveia', workflow_stage: 'human_review' } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [520, 0],
      "id": "d1700600-0000-4000-8000-000000000007",
      "name": "Enforce Human Review Gate"
    }
  ],
  "connections": {
    "When clicking 'Execute workflow'": { "main": [[{ "node": "Sample Review Decision", "type": "main", "index": 0 }]] },
    "Sample Review Decision": { "main": [[{ "node": "Enforce Human Review Gate", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "active": false,
  "settings": { "executionOrder": "v1" },
  "tags": []
}
