{
  "name": "MindFrame Psychology - Daily YouTube Shorts (FIXED)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 14 * * *"
            }
          ]
        }
      },
      "id": "node-trigger-001",
      "name": "Daily Trigger 2PM Dubai",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        240,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_GROQ_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"model\": \"mixtral-8x7b-32768\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a psychology content expert who creates trending YouTube Shorts topics. Focus on fascinating psychology facts that are currently trending on social media and relevant to US audiences.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Generate 5 trending psychology facts topics for YouTube Shorts today. Make them relevant to current trends, viral psychology concepts, or timely mental health topics. Return ONLY a valid JSON array with this exact format: [{\\\"topic\\\": \\\"specific topic here\\\", \\\"trend_score\\\": 8, \\\"why_trending\\\": \\\"reason here\\\"}]. No markdown, no extra text, just pure JSON.\"\n    }\n  ],\n  \"temperature\": 0.9\n}",
        "options": {}
      },
      "id": "node-ideas-002",
      "name": "Generate 5 Ideas (Groq)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        460,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst content = response.choices[0].message.content;\n\nlet cleanContent = content.trim();\nif (cleanContent.startsWith('```json')) {\n  cleanContent = cleanContent.replace(/```json\\n?/g, '').replace(/```\\n?/g, '');\n} else if (cleanContent.startsWith('```')) {\n  cleanContent = cleanContent.replace(/```\\n?/g, '');\n}\n\nlet ideas;\ntry {\n  ideas = JSON.parse(cleanContent);\n} catch (e) {\n  const jsonMatch = cleanContent.match(/\\[.*\\]/s);\n  if (jsonMatch) {\n    ideas = JSON.parse(jsonMatch[0]);\n  } else {\n    throw new Error('Could not parse ideas JSON');\n  }\n}\n\nconst bestIdea = ideas.sort((a, b) => b.trend_score - a.trend_score)[0];\n\nreturn {\n  json: {\n    chosenTopic: bestIdea.topic,\n    trendScore: bestIdea.trend_score,\n    whyTrending: bestIdea.why_trending,\n    allIdeas: ideas,\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "id": "node-parse-ideas-003",
      "name": "Pick Best Idea",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        680,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_GROQ_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"mixtral-8x7b-32768\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are an expert at creating curiosity-driven YouTube titles for psychology content. Create straightforward titles that spark curiosity without being clickbait. Maximum 60 characters.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Create 1 perfect YouTube Shorts title for this psychology topic: {{ $json.chosenTopic }}. Make it straightforward but curiosity-driven. Maximum 60 characters. Return ONLY the title text, nothing else. No quotes, no explanations.\"\n    }\n  ],\n  \"temperature\": 0.7\n}",
        "options": {}
      },
      "id": "node-title-004",
      "name": "Generate Title (Groq)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/chat/completions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_GROQ_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"mixtral-8x7b-32768\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a psychology educator for MindFrame Psychology creating educational YouTube Shorts scripts. Create engaging, fact-based content. Each scene needs SHORT 10-second narration (exactly 20-25 words).\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Create a 50-second YouTube Shorts script about: {{ $('Pick Best Idea').first().json.chosenTopic }}\\n\\nREQUIREMENTS:\\n- Exactly 5 scenes\\n- Each scene is exactly 10 seconds\\n- Each narration is exactly 20-25 words (count them!)\\n- Educational, professional tone\\n- Psychology facts based\\n- Target: US audience\\n\\nSTRUCTURE:\\nScene 1: Powerful hook question or statement\\nScene 2: First key psychology fact\\nScene 3: Second key psychology fact\\nScene 4: Third fact or real example\\nScene 5: Conclusion + Subscribe CTA\\n\\nFORMAT - Return ONLY valid JSON, no markdown:\\n{\\n  \\\"scenes\\\": [\\n    {\\n      \\\"scene_number\\\": 1,\\n      \\\"duration\\\": 10,\\n      \\\"narration\\\": \\\"exactly 20-25 words here\\\",\\n      \\\"visual_prompt\\\": \\\"minimalist psychology visualization: [describe abstract visual concept], clean design, professional, pastel colors, smooth motion, vertical 9:16\\\",\\n      \\\"scene_type\\\": \\\"hook\\\"\\n    }\\n  ]\\n}\"\n    }\n  ],\n  \"temperature\": 0.8\n}",
        "options": {}
      },
      "id": "node-script-005",
      "name": "Generate Script 5 Scenes (Groq)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst content = response.choices[0].message.content;\n\nlet cleanContent = content.trim();\nif (cleanContent.startsWith('```json')) {\n  cleanContent = cleanContent.replace(/```json\\n?/g, '').replace(/```\\n?/g, '');\n} else if (cleanContent.startsWith('```')) {\n  cleanContent = cleanContent.replace(/```\\n?/g, '');\n}\n\nlet scriptData;\ntry {\n  scriptData = JSON.parse(cleanContent);\n} catch (e) {\n  const jsonMatch = cleanContent.match(/\\{[\\s\\S]*\\}/);\n  if (jsonMatch) {\n    scriptData = JSON.parse(jsonMatch[0]);\n  } else {\n    throw new Error('Could not parse script JSON');\n  }\n}\n\nif (!scriptData.scenes || scriptData.scenes.length !== 5) {\n  throw new Error('Script must have exactly 5 scenes');\n}\n\nconst fullNarration = scriptData.scenes.map(s => s.narration).join('... ');\n\nconst titleResponse = $('Generate Title (Groq)').first().json;\nconst rawTitle = titleResponse.choices[0].message.content.trim();\nconst cleanTitle = rawTitle.replace(/^\"+|\"+$/g, '');\n\nreturn {\n  json: {\n    scenes: scriptData.scenes,\n    fullNarration: fullNarration,\n    sceneCount: scriptData.scenes.length,\n    title: cleanTitle,\n    estimatedDuration: 50,\n    topic: $('Pick Best Idea').first().json.chosenTopic\n  }\n};"
      },
      "id": "node-parse-script-006",
      "name": "Parse Script",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1340,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.elevenlabs.io/v1/text-to-speech/pNInz6obpgDQGcFmaJgB",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "xi-api-key",
              "value": "YOUR_ELEVENLABS_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"text\": \"{{ $json.fullNarration }}\",\n  \"model_id\": \"eleven_monolingual_v1\",\n  \"voice_settings\": {\n    \"stability\": 0.65,\n    \"similarity_boost\": 0.75,\n    \"style\": 0.5,\n    \"use_speaker_boost\": true\n  }\n}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "data"
            }
          }
        }
      },
      "id": "node-voice-007",
      "name": "Generate Voice ElevenLabs",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1560,
        400
      ]
    },
    {
      "parameters": {
        "operation": "create",
        "name": "=mindframe_audio_{{ $now.format('YYYYMMDD_HHmmss') }}.mp3",
        "binaryData": true,
        "binaryPropertyName": "data",
        "parents": {
          "__rl": true,
          "mode": "list",
          "value": "root"
        },
        "options": {}
      },
      "id": "node-save-audio-008",
      "name": "Save Audio to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        1780,
        400
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "assign-audio-url",
              "name": "audioFileId",
              "value": "={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "assign-audio-link",
              "name": "audioWebLink",
              "value": "={{ $json.webViewLink }}",
              "type": "string"
            },
            {
              "id": "assign-download-link",
              "name": "audioDownloadLink",
              "value": "=https://drive.google.com/uc?export=download&id={{ $json.id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "node-store-audio-url-009",
      "name": "Store Audio URL",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        2000,
        400
      ]
    },
    {
      "parameters": {
        "fieldToSplitOut": "scenes",
        "options": {}
      },
      "id": "node-split-010",
      "name": "Split Into 5 Scenes",
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        1560,
        600
      ]
    },
    {
      "parameters": {
        "amount": 5,
        "unit": "seconds"
      },
      "id": "node-delay-011",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1780,
        600
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api-inference.huggingface.co/models/meituan-longcat/LongCat-Video",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_HUGGINGFACE_TOKEN"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"inputs\": \"{{ $json.visual_prompt }}\",\n  \"parameters\": {\n    \"num_frames\": 80,\n    \"height\": 1024,\n    \"width\": 576,\n    \"num_inference_steps\": 50,\n    \"guidance_scale\": 7.5\n  }\n}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "video_data"
            }
          },
          "timeout": 300000
        }
      },
      "id": "node-video-012",
      "name": "Generate Video Clip LongCat",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2000,
        600
      ]
    },
    {
      "parameters": {
        "operation": "create",
        "name": "=scene_{{ $json.scene_number }}_{{ $now.format('YYYYMMDD_HHmmss') }}.mp4",
        "binaryData": true,
        "binaryPropertyName": "video_data",
        "parents": {
          "__rl": true,
          "mode": "list",
          "value": "root"
        },
        "options": {}
      },
      "id": "node-save-clip-013",
      "name": "Save Clip to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        2220,
        600
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "assign-clip-url",
              "name": "clipFileId",
              "value": "={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "assign-clip-download",
              "name": "clipDownloadLink",
              "value": "=https://drive.google.com/uc?export=download&id={{ $json.id }}",
              "type": "string"
            },
            {
              "id": "assign-scene-num",
              "name": "sceneNumber",
              "value": "={{ $('Split Into 5 Scenes').item.json.scene_number }}",
              "type": "number"
            },
            {
              "id": "assign-scene-duration",
              "name": "sceneDuration",
              "value": "={{ $('Split Into 5 Scenes').item.json.duration }}",
              "type": "number"
            }
          ]
        },
        "options": {}
      },
      "id": "node-store-clip-014",
      "name": "Store Clip Info",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        2440,
        600
      ]
    },
    {
      "parameters": {
        "mode": "combine",
        "combinationMode": "mergeByPosition",
        "options": {}
      },
      "id": "node-aggregate-015",
      "name": "Aggregate All 5 Clips",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        2660,
        600
      ]
    },
    {
      "parameters": {
        "mode": "combine",
        "combinationMode": "mergeByPosition",
        "options": {}
      },
      "id": "node-merge-027",
      "name": "Merge Audio + Video Data",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 2.1,
      "position": [
        2770,
        500
      ]
    },
    {
      "parameters": {
        "jsCode": "// Get audio URL from first input\nconst audioData = $input.first().json;\nconst audioUrl = audioData.audioDownloadLink;\n\n// Get all clips from all inputs\nconst allInputs = $input.all();\nconst clipsData = allInputs.filter(item => item.json.sceneNumber);\nconst sortedClips = clipsData.sort((a, b) => a.json.sceneNumber - b.json.sceneNumber);\n\n// Build clips array for Shotstack\nconst clips = sortedClips.map((item, index) => {\n  const startTime = index * 10;\n  return {\n    asset: {\n      type: \"video\",\n      src: item.json.clipDownloadLink\n    },\n    start: startTime,\n    length: 10,\n    fit: \"cover\",\n    scale: 1,\n    position: \"center\",\n    transition: {\n      in: \"fade\",\n      out: \"fade\"\n    }\n  };\n});\n\nreturn {\n  json: {\n    audioUrl: audioUrl,\n    clips: clips,\n    totalDuration: 50,\n    clipsCount: clips.length\n  }\n};"
      },
      "id": "node-prepare-shotstack-016",
      "name": "Prepare Shotstack Data",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2990,
        500
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.shotstack.io/v1/render",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "YOUR_SHOTSTACK_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"timeline\": {\n    \"soundtrack\": {\n      \"src\": \"{{ $json.audioUrl }}\",\n      \"effect\": \"fadeIn\",\n      \"volume\": 1\n    },\n    \"background\": \"#000000\",\n    \"tracks\": [\n      {\n        \"clips\": {{ JSON.stringify($json.clips) }}\n      }\n    ]\n  },\n  \"output\": {\n    \"format\": \"mp4\",\n    \"resolution\": \"sd\",\n    \"aspectRatio\": \"9:16\",\n    \"size\": {\n      \"width\": 1080,\n      \"height\": 1920\n    },\n    \"fps\": 30,\n    \"quality\": \"high\"\n  }\n}",
        "options": {}
      },
      "id": "node-shotstack-017",
      "name": "Combine Video Shotstack",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3210,
        500
      ]
    },
    {
      "parameters": {
        "amount": 10,
        "unit": "seconds"
      },
      "id": "node-wait-render-018",
      "name": "Wait 10s Initial",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        3430,
        500
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "=https://api.shotstack.io/v1/render/{{ $('Combine Video Shotstack').item.json.response.id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "YOUR_SHOTSTACK_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "id": "node-check-render-019",
      "name": "Check Render Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3650,
        500
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "condition-done",
              "leftValue": "={{ $json.response.status }}",
              "rightValue": "done",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "node-if-done-020",
      "name": "Is Render Done?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        3870,
        500
      ]
    },
    {
      "parameters": {
        "amount": 15,
        "unit": "seconds"
      },
      "id": "node-wait-retry-021",
      "name": "Wait 15s Retry",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        3650,
        700
      ]
    },
    {
      "parameters": {
        "url": "={{ $json.response.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "data"
            }
          }
        }
      },
      "id": "node-download-022",
      "name": "Download Final Video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4090,
        500
      ]
    },
    {
      "parameters": {
        "operation": "upload",
        "title": "={{ $('Parse Script').first().json.title }}",
        "categoryId": "22",
        "description": "={{ $('Parse Script').first().json.fullNarration.replace(/\\.\\.\\.\\s*/g, '\\n\\n') }}\\n\\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\ud83e\udde0 MindFrame Psychology\\n\ud83d\udcda Daily Psychology Facts\\n\ud83c\udfaf Educational Content\\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\\n#psychology #psychologyfacts #mindframe #shorts #youtubeshorts #education #mentalhealth #facts #trending #psychologyshorts #brainfacts #humanbehavior #mindset #selfimprovement",
        "binaryData": true,
        "binaryPropertyName": "data",
        "options": {
          "privacyStatus": "private",
          "tags": "psychology, psychology facts, mental health, mindframe, educational, shorts, trending psychology, psychology shorts, brain facts, human behavior"
        }
      },
      "id": "node-youtube-023",
      "name": "Upload to YouTube Private",
      "type": "n8n-nodes-base.youtube",
      "typeVersion": 1,
      "position": [
        4310,
        500
      ]
    },
    {
      "parameters": {
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "text": "=\u2705 *NEW MINDFRAME VIDEO UPLOADED!*\\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\\n\ud83d\udcfa *Channel:* MindFrame Psychology\\n\ud83c\udfac *Title:* {{ $('Parse Script').first().json.title }}\\n\ud83d\udd17 *URL:* https://youtube.com/shorts/{{ $json.id }}\\n\\n\ud83d\udcca *Video Details:*\\n\u2022 Topic: {{ $('Pick Best Idea').first().json.chosenTopic }}\\n\u2022 Trend Score: {{ $('Pick Best Idea').first().json.trendScore }}/10 \ud83d\udd25\\n\u2022 Scenes: 5 AI-generated clips\\n\u2022 Duration: 50 seconds\\n\u2022 Resolution: 1080p (9:16)\\n\u2022 Status: Private\\n\\n\ud83c\udfa5 *Production:*\\n\u2022 AI Video: LongCat-Video\\n\u2022 Voice: ElevenLabs Adam\\n\u2022 Script: Groq Mixtral\\n\\n\ud83d\udca1 *Why Trending:*\\n{{ $('Pick Best Idea').first().json.whyTrending }}\\n\\n\ud83d\udd50 *Published:* {{ $now.format('MMMM DD, YYYY - hh:mm A') }} GST",
        "additionalFields": {
          "parseMode": "Markdown"
        }
      },
      "id": "node-telegram-024",
      "name": "Send Telegram Notification",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        4530,
        500
      ]
    }
  ],
  "connections": {
    "Daily Trigger 2PM Dubai": {
      "main": [
        [
          {
            "node": "Generate 5 Ideas (Groq)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate 5 Ideas (Groq)": {
      "main": [
        [
          {
            "node": "Pick Best Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pick Best Idea": {
      "main": [
        [
          {
            "node": "Generate Title (Groq)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Title (Groq)": {
      "main": [
        [
          {
            "node": "Generate Script 5 Scenes (Groq)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Script 5 Scenes (Groq)": {
      "main": [
        [
          {
            "node": "Parse Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Script": {
      "main": [
        [
          {
            "node": "Generate Voice ElevenLabs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Into 5 Scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Voice ElevenLabs": {
      "main": [
        [
          {
            "node": "Save Audio to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Audio to Google Drive": {
      "main": [
        [
          {
            "node": "Store Audio URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Audio URL": {
      "main": [
        [
          {
            "node": "Merge Audio + Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Into 5 Scenes": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Generate Video Clip LongCat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Clip LongCat": {
      "main": [
        [
          {
            "node": "Save Clip to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Clip to Google Drive": {
      "main": [
        [
          {
            "node": "Store Clip Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Clip Info": {
      "main": [
        [
          {
            "node": "Aggregate All 5 Clips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All 5 Clips": {
      "main": [
        [
          {
            "node": "Merge Audio + Video Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Audio + Video Data": {
      "main": [
        [
          {
            "node": "Prepare Shotstack Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Shotstack Data": {
      "main": [
        [
          {
            "node": "Combine Video Shotstack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Video Shotstack": {
      "main": [
        [
          {
            "node": "Wait 10s Initial",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s Initial": {
      "main": [
        [
          {
            "node": "Check Render Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Render Status": {
      "main": [
        [
          {
            "node": "Is Render Done?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Render Done?": {
      "main": [
        [
          {
            "node": "Download Final Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 15s Retry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 15s Retry": {
      "main": [
        [
          {
            "node": "Check Render Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Final Video": {
      "main": [
        [
          {
            "node": "Upload to YouTube Private",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to YouTube Private": {
      "main": [
        [
          {
            "node": "Send Telegram Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2024-01-15T00:00:00.000Z",
  "versionId": "1"
}