{
  "name": "Video to Twitter Thread + LinkedIn + Blog",
  "nodes": [
    {
      "parameters": {},
      "id": "e1f2a3b4-0001-0001-0001-000000000001",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "1", "name": "videoUrl", "value": "YOUR_VIDEO_URL_HERE", "type": "string" }
          ]
        }
      },
      "id": "e1f2a3b4-0002-0002-0002-000000000002",
      "name": "Set Video URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [460, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://app.wayinai.com/api/v1/transcribe",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": { "parameters": [{ "name": "Authorization", "value": "Bearer YOUR_WAYINVIDEO_API_KEY" }] },
        "sendBody": true,
        "bodyParameters": { "parameters": [{ "name": "url", "value": "={{ $json.videoUrl }}" }] }
      },
      "id": "e1f2a3b4-0003-0003-0003-000000000003",
      "name": "Transcribe Video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [680, 300]
    },
    {
      "parameters": {
        "amount": 30,
        "unit": "seconds"
      },
      "id": "e1f2a3b4-0004-0004-0004-000000000004",
      "name": "Wait for Transcription",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [900, 300]
    },
    {
      "parameters": {
        "resource": "chat",
        "operation": "create",
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a content repurposing expert. Given a video transcript, create three pieces of content simultaneously:\n\n1. TWITTER_THREAD: A 10-tweet thread. Start with a hook tweet, then 8 insight tweets, end with a CTA. Format: Tweet 1/10, Tweet 2/10, etc.\n\n2. LINKEDIN_POST: A 200-300 word LinkedIn post. Hook first line, then value, then CTA. No hollow corporate language.\n\n3. BLOG_POST: A 600-800 word SEO-optimised blog post with a clear H1, 3-4 subheadings, and a conclusion.\n\nSeparate each section with ---SECTION--- delimiter."
            },
            {
              "role": "user",
              "content": "=Transcript:\n{{ $json.transcript || $json.text || 'Transcript not available' }}"
            }
          ]
        }
      },
      "id": "e1f2a3b4-0005-0005-0005-000000000005",
      "name": "Generate All Content",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "position": [1120, 300],
      "credentials": { "openAiApi": { "id": "YOUR_OPENAI_CREDENTIAL_ID", "name": "OpenAI API" } }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "id": "1", "name": "twitterThread", "value": "={{ $json.message.content.split('---SECTION---')[0].trim() }}", "type": "string" },
            { "id": "2", "name": "linkedinPost", "value": "={{ $json.message.content.split('---SECTION---')[1]?.trim() }}", "type": "string" },
            { "id": "3", "name": "blogPost", "value": "={{ $json.message.content.split('---SECTION---')[2]?.trim() }}", "type": "string" }
          ]
        }
      },
      "id": "e1f2a3b4-0006-0006-0006-000000000006",
      "name": "Split Content",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [1340, 300]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "value": "YOUR_GOOGLE_SHEET_ID" },
        "sheetName": "Content",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Date": "={{ new Date().toISOString().split('T')[0] }}",
            "Video URL": "={{ $('Set Video URL').item.json.videoUrl }}",
            "Twitter Thread": "={{ $json.twitterThread }}",
            "LinkedIn Post": "={{ $json.linkedinPost }}",
            "Blog Post": "={{ $json.blogPost }}"
          }
        }
      },
      "id": "e1f2a3b4-0007-0007-0007-000000000007",
      "name": "Save to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [1560, 300],
      "credentials": { "googleSheetsOAuth2Api": { "id": "YOUR_GSHEETS_CREDENTIAL_ID", "name": "Google Sheets OAuth2" } }
    }
  ],
  "connections": {
    "Manual Trigger": { "main": [[{ "node": "Set Video URL", "type": "main", "index": 0 }]] },
    "Set Video URL": { "main": [[{ "node": "Transcribe Video", "type": "main", "index": 0 }]] },
    "Transcribe Video": { "main": [[{ "node": "Wait for Transcription", "type": "main", "index": 0 }]] },
    "Wait for Transcription": { "main": [[{ "node": "Generate All Content", "type": "main", "index": 0 }]] },
    "Generate All Content": { "main": [[{ "node": "Split Content", "type": "main", "index": 0 }]] },
    "Split Content": { "main": [[{ "node": "Save to Google Sheets", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "versionId": "e1f2a3b4-aaaa-bbbb-cccc-000000000005",
  "meta": { "templateCredsSetupCompleted": false },
  "id": "workflow-video-to-content",
  "tags": [{ "name": "Content" }, { "name": "AI" }, { "name": "LinkedIn" }]
}
