{
  "name": "03 · Content Marketing / YouTube → Multi-Format Repurposer",
  "active": false,
  "nodes": [
    {
      "id": "2c18dc5f-6d6e-42b6-b18b-75dd25a24b1a",
      "name": "📘 Guide",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        -120
      ],
      "parameters": {
        "content": "## 03 · Content Marketing · YouTube → Multi-Format Repurposer\n\n### What this does\nTakes transcript, generates LinkedIn carousel text, X thread, Shorts script, and blog summary.\n\n### Setup checklist\n1. Transcript source\n2. Optional thumbnail prompt HTTP\n3. Route outputs to social publisher\n\n### How to test locally\nPOST `content-yt-repurpose` with `{ \"title\":\"...\", \"transcript\":\"...\" }`\n\n### Tips\n- Keep credentials in n8n Credentials (never hardcode secrets).\n- Use **Test URL** on the Webhook while developing.\n- Activate only after credentials + destinations are configured.\n",
        "width": 560,
        "height": 560,
        "color": 4
      }
    },
    {
      "id": "7cc9ea1a-268b-417e-ab17-0b03b0e9ddba",
      "name": "⚙️ Config",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        480
      ],
      "parameters": {
        "content": "## Config map\n\n- **Webhook path:** `content-yt-repurpose`\n- **Replace** all `https://httpbin.org/...` calls with real integrations.\n- **Credentials:** create in n8n → Credentials, then select on HTTP nodes.\n- **Activate** workflow only after a successful Test execution.\n\n### Local files\nShared host folder is mounted at `/files` inside n8n.",
        "width": 560,
        "height": 320,
        "color": 2
      }
    },
    {
      "id": "7158deac-e117-48b2-88fe-c2bb9f0a8e7f",
      "name": "Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        200
      ],
      "webhookId": "dd9ca4ab-0ee8-4054-9b07-cbfe83828fbe",
      "parameters": {
        "httpMethod": "POST",
        "path": "content-yt-repurpose",
        "responseMode": "responseNode",
        "options": {}
      }
    },
    {
      "id": "3bcd4c72-4d19-4659-9b21-5c50f05a5bf6",
      "name": "Build Prompt Context",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        280,
        200
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "system",
              "value": "You are an expert operator for: YouTube → Multi-Format Repurposer",
              "type": "string"
            },
            {
              "id": "2",
              "name": "userInput",
              "value": "={{ $json.body || $json }}",
              "type": "object"
            },
            {
              "id": "3",
              "name": "model",
              "value": "gpt-4.1-mini",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "9adbfbfa-e5f9-4e91-ae4e-fdb40ea98bd8",
      "name": "AI Transform (swap for LLM node)",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        560,
        200
      ],
      "parameters": {
        "mode": "runOnceForAllItems",
        "language": "javaScript",
        "jsCode": "const ctx = $input.first().json;\nconst input = ctx.userInput || {};\n// Placeholder \"model\" output — replace this Code node with OpenAI/Anthropic node.\nconst draft = {\n  summary: `Generated by YouTube → Multi-Format Repurposer`,\n  bullets: Object.keys(input).slice(0, 8).map(k => `${k}: ${JSON.stringify(input[k]).slice(0,120)}`),\n  score: Math.round(60 + Math.random()*40),\n  recommendations: ['Review tone', 'Add CTA', 'Fact-check claims'],\n};\nreturn [{ json: { ...ctx, ai: draft, ready: draft.score >= 70 } }];"
      }
    },
    {
      "id": "59297861-708b-4da4-ad1d-cbee368fd609",
      "name": "Quality Gate",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        840,
        200
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "c61dfda4-fcca-4391-a932-0e85debaee9f",
              "leftValue": "={{ $json.ready }}",
              "rightValue": true,
              "operator": {
                "type": "boolean",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      }
    },
    {
      "id": "d3306d06-7184-4a47-b628-68d35cd6ecfd",
      "name": "Persist / Publish",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        80
      ],
      "parameters": {
        "method": "POST",
        "url": "https://httpbin.org/post",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify($json) }}"
      }
    },
    {
      "id": "fdaced28-86f6-4a82-8b9a-cfd75a952fa0",
      "name": "Needs Human Review",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1120,
        320
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "review",
              "value": true,
              "type": "boolean"
            },
            {
              "id": "2",
              "name": "reason",
              "value": "AI quality score below threshold",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "2eff2309-9f73-4f9b-a5a3-0d5a16ccd8f5",
      "name": "Webhook Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1400,
        200
      ],
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {}
      }
    }
  ],
  "connections": {
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Build Prompt Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prompt Context": {
      "main": [
        [
          {
            "node": "AI Transform (swap for LLM node)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Transform (swap for LLM node)": {
      "main": [
        [
          {
            "node": "Quality Gate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quality Gate": {
      "main": [
        [
          {
            "node": "Persist / Publish",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Needs Human Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persist / Publish": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Needs Human Review": {
      "main": [
        [
          {
            "node": "Webhook Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "tags": [],
  "meta": {
    "templateCredsSetupCompleted": true,
    "description": "Takes transcript, generates LinkedIn carousel text, X thread, Shorts script, and blog summary."
  },
  "pinData": {}
}