{
  "name": "Content Repurposing Pipeline",
  "nodes": [
    {
      "parameters": {},
      "id": "h1i2j3k4-0001-0001-0001-000000000001",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "1", "name": "contentUrl", "value": "YOUR_LINKEDIN_POST_OR_BLOG_URL", "type": "string" },
            { "id": "2", "name": "targetFormat", "value": "tweet_thread", "type": "string" }
          ]
        }
      },
      "id": "h1i2j3k4-0002-0002-0002-000000000002",
      "name": "Set Source Content",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [460, 300]
    },
    {
      "parameters": {
        "url": "={{ $json.contentUrl }}",
        "options": {}
      },
      "id": "h1i2j3k4-0003-0003-0003-000000000003",
      "name": "Scrape Content",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [680, 300]
    },
    {
      "parameters": {
        "resource": "chat",
        "operation": "create",
        "model": "gpt-4o",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a content strategist who repurposes content across platforms. Strip all the HTML from the content, extract the core ideas, and rewrite in the requested format. Keep the voice authentic and direct. No hollow phrases."
            },
            {
              "role": "user",
              "content": "=Rewrite this content as a {{ $('Set Source Content').item.json.targetFormat }}.\n\nFormats:\n- tweet_thread: 8-10 tweets, hook first, insights, CTA last\n- linkedin_post: 200-250 words, hook, value, CTA\n- email: subject line + 150 word plain email\n- blog_post: 500-700 words, H1, 3 sections, conclusion\n\nContent:\n{{ $json.data?.slice(0, 3000) || 'Content not available' }}\n\nSource URL: {{ $('Set Source Content').item.json.contentUrl }}"
            }
          ]
        }
      },
      "id": "h1i2j3k4-0004-0004-0004-000000000004",
      "name": "Repurpose Content",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [900, 300],
      "credentials": { "openAiApi": { "id": "YOUR_OPENAI_CREDENTIAL_ID", "name": "OpenAI API" } }
    },
    {
      "parameters": {
        "operation": "createPage",
        "databaseId": "YOUR_NOTION_DATABASE_ID",
        "title": "=Repurposed: {{ $('Set Source Content').item.json.targetFormat }} — {{ new Date().toISOString().split('T')[0] }}",
        "propertiesUi": {
          "propertyValues": [
            { "key": "Format", "type": "select", "selectValue": "={{ $('Set Source Content').item.json.targetFormat }}" },
            { "key": "Source URL", "type": "url", "urlValue": "={{ $('Set Source Content').item.json.contentUrl }}" },
            { "key": "Status", "type": "select", "selectValue": "Draft" }
          ]
        },
        "blockUi": {
          "blockValues": [
            { "type": "paragraph", "textContent": "={{ $json.message.content }}" }
          ]
        }
      },
      "id": "h1i2j3k4-0005-0005-0005-000000000005",
      "name": "Save to Notion",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2,
      "position": [1120, 300],
      "credentials": { "notionApi": { "id": "YOUR_NOTION_CREDENTIAL_ID", "name": "Notion API" } }
    }
  ],
  "connections": {
    "Manual Trigger": { "main": [[{ "node": "Set Source Content", "type": "main", "index": 0 }]] },
    "Set Source Content": { "main": [[{ "node": "Scrape Content", "type": "main", "index": 0 }]] },
    "Scrape Content": { "main": [[{ "node": "Repurpose Content", "type": "main", "index": 0 }]] },
    "Repurpose Content": { "main": [[{ "node": "Save to Notion", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "versionId": "h1i2j3k4-aaaa-bbbb-cccc-000000000008",
  "meta": { "templateCredsSetupCompleted": false },
  "id": "workflow-content-repurposing",
  "tags": [{ "name": "Content" }, { "name": "AI" }, { "name": "Notion" }]
}
