{
  "name": "Multiscene Cinematic Video Factory",
  "nodes": [
    {
      "parameters": {
        "content": "## Video Prompt Generator",
        "height": 340,
        "width": 720,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -500,
        -1060
      ],
      "id": "654cfa83-e404-4d17-9138-8d3be511d5f2",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Scene Generator",
        "height": 380,
        "width": 1980,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        20,
        -700
      ],
      "id": "b989be6e-c4a3-4a43-a833-06fdc5fd0a42",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Merge Scenes + Voice",
        "height": 420,
        "width": 1340,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2040,
        -1020
      ],
      "id": "c9793f1a-36d8-4863-a5d7-f15fa0b47df9",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Add Music",
        "height": 340,
        "width": 1300,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        3400,
        -1020
      ],
      "id": "c74f6c52-28f7-441a-82f2-178e894f5130",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Finalize",
        "height": 180,
        "width": 960,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4720,
        -1020
      ],
      "id": "0f480cf1-d6eb-4548-9f2a-1be69cbd231b",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Publish",
        "height": 200,
        "width": 1040,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4760,
        -800
      ],
      "id": "53e61baf-d74a-4487-938d-3e7e1aa30f6f",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "## Notify",
        "height": 180,
        "width": 460,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        4900,
        -580
      ],
      "id": "cae4a5e2-e043-4a64-8342-2777a7b648ac",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1.2,
      "position": [
        -460,
        -900
      ],
      "id": "bc72147a-35c0-46ad-9bb5-a7a0f77fc995",
      "name": "Telegram Trigger",
      "webhookId": "c30a35f7-cb53-4dbd-aee7-676df9b589f5",
      "credentials": {
        "telegramApi": {
          "id": "gITA5cruosqkSk5K",
          "name": "Telegram account 28"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json.message.text;\n\n// Remove \"Generate video\" from the start (case-insensitive)\nconst cleaned = input.replace(/^generate video/i, '').trim();\n\n// Split at the first comma\nconst [videoPrompt, captionIdea] = cleaned.split(/,(.+)/).map(s => s.trim());\n\nreturn [\n  {\n    json: {\n      videoPrompt,\n      captionIdea\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -340,
        -900
      ],
      "id": "0fb148f9-22ec-41a9-bcce-466455c69f10",
      "name": "Split"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Video Prompt: {{ $json.videoPrompt }}\n\nVoice Over Topic: {{ $json.captionIdea }}",
        "options": {
          "systemMessage": "=You are a prompt-writing assistant for the text to video ai generator Seedance AI and voice over scriptwriter.\n\n# Your Task:\nYour job is to take a short input from the user and create:\n1. THREE SEQUENTIAL 9-second video scenes that tell a complete story\n2. A voice over script for each scene based on the user's voice over topic\n\nThe user will provide:\n- Video prompt (what to visualize)\n- Voice over topic (what the narration should discuss)\n\nGenerate output in this exact format:\nSCENE 1: [scene description]\nVOICE 1: [9-second voice over script]\n\nSCENE 2: [scene description]\nVOICE 2: [9-second voice over script]\n\nSCENE 3: [scene description]\nVOICE 3: [9-second voice over script]\n\n# Story Structure:\n- Scene 1: Show the PAINFUL PROBLEM - Make it dramatic, frustrating, relatable\n- Scene 2: Reveal the UNIQUE INSIGHT/IDEA - The \"aha\" moment or counterintuitive solution\n- Scene 3: Show the SOLUTION IN ACTION - Demonstrate the transformation/result\n\n# CRITICAL Seedance Capabilities:\n- Seedance CAN show physical struggle: \"attempting difficult pose, falling over\"\n- Seedance CAN show limitations: \"trying to touch toes but hands only reach knees\"\n- Seedance CAN show emotions through actions: \"looking frustrated\" works\n- AVOID complex compositions: split screens may look weird\n- EVERY scene must fully describe the person (include \"European-looking\" in each scene)\n\n# Effective Seedance Prompts:\nGOOD (what works):\n- \"European-looking woman attempting difficult yoga pose on beach, falling over, looking frustrated\"\n- \"Person trying to touch toes but hands only reach knees, stiff movement\"\n- \"Person walking out of building at 3PM, relaxed pace, sunshine\"\n- Physical actions with clear visual results\n\nOKAY (works but may be imperfect):\n- Environmental chaos (luggage flying around)\n- Split screen comparisons (may look artificial)\n\nBAD (avoid these):\n- Complex multi-person scenes\n- Precise object arrangements\n- Specific facial expressions without context\n\n# Voice Over Requirements:\n- Each voice over must be exactly 9-seconds when spoken (approximately 25-27 words)\n- Voice must relate to the user's specified topic\n- Voice should match the emotional arc: Problem (pain) → Insight (excitement) → Solution (satisfaction)\n\n# Example:\nUser video prompt: \"productivity transformation\"\nUser voice topic: \"how to save 3 hours daily\"\n\n# Example:\nUser video prompt: \"woman doing yoga at beach\"\nUser voice topic: \"quick tip about improving flexibility on vacation\"\n\nSCENE 1: European-looking woman in yoga outfit on beach attempting to touch her toes but hands only reach knees, visibly struggling with stiff movements. Other beachgoers doing yoga easily in background. Harsh midday sun.\nVOICE 1: Vacation day three and you're stiffer than when you arrived. While others flow through poses, you can barely touch your knees.\n\nSCENE 2: European-looking woman in yoga outfit on beach at sunrise doing gentle circular hip movements and arm swings, NOT stretching. Walking in place, rotating shoulders, swinging arms side to side. Golden morning light.\nVOICE 2: Here's the secret: never stretch cold muscles. Instead, spend two minutes doing gentle movements first - arm circles, hip rotations, easy walking.\n\nSCENE 3: European-looking woman in yoga outfit on beach now effortlessly touching toes with palms flat on sand, holding deep forward bend. Same sunrise setting but now actively stretching with perfect form. Smooth, flexible movements.\nVOICE 3: After warming up with movement, your muscles release naturally. What was impossible cold, becomes effortless when you prep your body first.\n\n\n\n# Rules:\n- Output ONLY the scenes and voice overs, no explanations\n- Scene 1: Show the problem visually\n- Scene 2: Show the METHOD being done (not just talking about it)\n- Scene 3: Show the RESULT achieved\n- ALWAYS specify \"European-looking\" in EVERY scene\n- Keep descriptions concrete and visual\n- Use physical actions Seedance can show (falling, struggling, reaching, etc.)\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        -220,
        -900
      ],
      "id": "232af5a6-0208-49b1-9050-99bb756c3262",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -200,
        -1020
      ],
      "id": "a2be9dee-b69f-4226-942f-30a4b791823c",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "6LnEKBlR3JCiWGdk",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "contextWindowLength": 50
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -60,
        -1020
      ],
      "id": "522f2bdf-1f60-400c-ab04-99da2fab956e",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "jsCode": "// Get the AI Agent's output\nconst aiOutput = $input.first().json.output;\n\n// Initialize variables\nlet scenes = {};\n\n// Split the output into lines\nconst lines = aiOutput.split('\\n');\n\n// Variables to track current scene and voice\nlet currentScene = '';\nlet currentVoice = '';\nlet sceneNumber = 0;\n\n// Process each line\nfor (const line of lines) {\n  const trimmedLine = line.trim();\n  \n  // Check if line starts with SCENE\n  if (trimmedLine.startsWith('SCENE')) {\n    sceneNumber++;\n    // Extract everything after the colon\n    const match = trimmedLine.match(/SCENE \\d+:\\s*(.+)/);\n    if (match) {\n      scenes[`scene${sceneNumber}`] = match[1].trim();\n    }\n  }\n  \n  // Check if line starts with VOICE\n  else if (trimmedLine.startsWith('VOICE')) {\n    // Extract everything after the colon\n    const match = trimmedLine.match(/VOICE \\d+:\\s*(.+)/);\n    if (match) {\n      scenes[`voice${sceneNumber}`] = match[1].trim();\n    }\n  }\n}\n\n// Return the split scenes and voices\nreturn [\n  {\n    json: {\n      scene1: scenes.scene1 || '',\n      voice1: scenes.voice1 || '',\n      scene2: scenes.scene2 || '',\n      voice2: scenes.voice2 || '',\n      scene3: scenes.scene3 || '',\n      voice3: scenes.voice3 || '',\n      // Also include the original output for debugging\n      originalOutput: aiOutput\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        60,
        -900
      ],
      "id": "36966adf-8335-4187-b436-0e81208e9aa9",
      "name": "Get Scenes"
    },
    {
      "parameters": {
        "jsCode": "function generateRandomCode(length = 20) {\n  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n  let result = '';\n  for (let i = 0; i < length; i++) {\n    result += chars[Math.floor(Math.random() * chars.length)];\n  }\n  return result;\n}\n\nreturn [\n  {\n    json: {\n      code: generateRandomCode()\n    }\n  }\n];\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        280,
        -660
      ],
      "id": "712b3de0-a518-4b89-9255-175c2be185a8",
      "name": "Video ID"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/models/bytedance/seedance-1-pro/predictions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"input\": {\n    \"fps\": 24,\n    \"prompt\": \"{{ $('Get Scenes').item.json.scene1 }}\",\n    \"duration\": 10,\n    \"resolution\": \"480p\",\n    \"aspect_ratio\": \"9:16\",\n    \"camera_fixed\": false\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        420,
        -660
      ],
      "id": "06e8148a-0104-4ec4-b101-dfd2b68aa2af",
      "name": "Generate Scene 1"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        580,
        -660
      ],
      "id": "ddc9b2fa-c44b-4625-98d9-a72bf3112e1e",
      "name": "Get Scene 1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/models/bytedance/seedance-1-pro/predictions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"input\": {\n    \"fps\": 24,\n    \"prompt\": \"{{ $('Get Scenes').item.json.scene3 }}\",\n    \"duration\": 10,\n    \"resolution\": \"480p\",\n    \"aspect_ratio\": \"9:16\",\n    \"camera_fixed\": false\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1340,
        -700
      ],
      "id": "57a5c85c-b4e7-445c-9367-ca7e1bd14297",
      "name": "Generate Scene 3"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/models/bytedance/seedance-1-pro/predictions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"input\": {\n    \"fps\": 24,\n    \"prompt\": \"{{ $('Get Scenes').item.json.scene2 }}\",\n    \"duration\": 10,\n    \"resolution\": \"480p\",\n    \"aspect_ratio\": \"9:16\",\n    \"camera_fixed\": false\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        860,
        -680
      ],
      "id": "85cc2464-d6d1-464e-97ff-38cb69e802e0",
      "name": "Generate Scene 2"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1060,
        -660
      ],
      "id": "a78457b0-0f11-4c21-a9ec-a42e7dfad8d9",
      "name": "Get Scene 2"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1540,
        -700
      ],
      "id": "02a5360b-3cad-4b82-ba21-b1726b3d6aa8",
      "name": "Get Scene 3"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.replicate.com/v1/predictions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"version\": \"lucataco/video-merge:65c81d0d0689d8608af8c2f59728135925419f4b5e62065c37fc350130fed67a\",\n  \"input\": {\n    \"fps\": 0,\n    \"width\": 0,\n    \"height\": 0,\n    \"keep_audio\": true,\n    \"video_files\": [\n      \"{{ $('Get Scene 1').item.json.output }}\",\n\n\"{{ $('Get Scene 2').item.json.output }}\",\n\n      \"{{ $json.output }}\"\n    ]\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2080,
        -880
      ],
      "id": "62324f34-76ac-41ef-8396-0e9d4ce541cb",
      "name": "Merge Scenes"
    },
    {
      "parameters": {
        "amount": 20
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2600,
        -840
      ],
      "id": "fb540229-25b2-4f9a-8b58-c6872023b012",
      "name": "Wait",
      "webhookId": "7e94ca2c-0216-4f61-9bad-08327a33d770"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2280,
        -880
      ],
      "id": "ef9dac5a-d120-4bc8-8dc4-87425b38e8c2",
      "name": "Get Merged Video"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.elevenlabs.io/v1/text-to-speech/YOUR_VOICE_ID",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "xi-api-key",
              "value": "INSERT_YOUR_API_KEY"
            },
            {
              "name": "Accept",
              "value": "audio/mpeg"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"text\": \"{{ $('Get Scenes').item.json.voice1 }}{{ $('Get Scenes').item.json.voice2 }}{{ $('Get Scenes').item.json.voice3 }}\",\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"voice_settings\": {\n    \"stability\": 0.5,\n    \"similarity_boost\": 0.8\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2600,
        -1000
      ],
      "id": "9db0e2c0-3fb5-4c3a-a731-df9f592cb3f7",
      "name": "Create Voice"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.cloudinary.com/v1_1/CLOUDINARY_ID/auto/upload",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBasicAuth",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "file",
              "inputDataFieldName": "data"
            },
            {
              "name": "upload_preset",
              "value": "INSERT_UPLOAD_PRESET"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2720,
        -1000
      ],
      "id": "0cca0e0a-2b91-4186-a468-e66070828790",
      "name": "Upload Voice",
      "credentials": {
        "httpBasicAuth": {
          "id": "QWugY9xDo4UKFLVp",
          "name": "Unnamed credential 8"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.json2video.com/v2/movies",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"resolution\": \"custom\",\n  \"width\": 720,\n  \"height\": 1280,\n  \"scenes\": [\n    {\n      \"elements\": [\n        {\n          \"type\": \"video\",\n          \"src\": \"{{ $('Get Merged Video').item.json.output }}\",\n          \"resize\": \"cover\"\n        },\n        {\n          \"type\": \"audio\",\n          \"src\": \"{{ $json.url }}\"\n        }\n      ]\n    }\n  ]\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2840,
        -1000
      ],
      "id": "754db34a-31cc-45ad-945d-dbd441e01348",
      "name": "Video + Voice",
      "credentials": {
        "httpCustomAuth": {
          "id": "V5IqG12cv0WZWtcb",
          "name": "Custom Auth account 12"
        }
      }
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        2960,
        -1000
      ],
      "id": "4aa92626-70c5-4ed2-958d-2cd0b40f46d2",
      "name": "Wait1",
      "webhookId": "7975991d-c0fb-4b97-9b72-8cc7b2e7463c"
    },
    {
      "parameters": {
        "url": "=https://api.json2video.com/v2/movies?id={{ $json.project }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3080,
        -1000
      ],
      "id": "c05131ca-240f-4e2a-824b-80054307a343",
      "name": "Get Video",
      "credentials": {
        "httpCustomAuth": {
          "id": "V5IqG12cv0WZWtcb",
          "name": "Custom Auth account 12"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "GPT-4O"
        },
        "messages": {
          "values": [
            {
              "content": "=Generate a music prmpt for this topic:\n{{ $('Split').item.json.videoPrompt }}\n\nFollow the structure and legnth of these example music prompt: \n\nchill music with construction vibes sound behind, dominant in acoustic guitar and piano\n"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        3580,
        -1000
      ],
      "id": "cf8f4529-10e2-48d0-b5d4-cadccb0fb55e",
      "name": "Music Prompt",
      "credentials": {
        "openAiApi": {
          "id": "80b8DOj8REc2MMqi",
          "name": "OpenAi account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://api.replicate.com/v1/predictions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"version\": \"96af46316252ddea4c6614e31861876183b59dce84bad765f38424e87919dd85\",\n  \"input\": {\n    \"prompt\": \"{{ $json.message.content }}\",\n    \"duration\": 30\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3860,
        -1000
      ],
      "id": "56d14b26-507d-4679-93a7-b99fc8e6d8b6",
      "name": "Generate Music"
    },
    {
      "parameters": {
        "amount": 40
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        4260,
        -900
      ],
      "id": "5efb2a58-ffd5-435e-b503-63efc4b7ed92",
      "name": "Wait2",
      "webhookId": "126dfbbd-f9fb-4fe4-a5df-ec1c088f739a"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer INSERT_YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4020,
        -1000
      ],
      "id": "62a64056-9f21-44b7-a055-116f6156b683",
      "name": "Get Music"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "GPT-4O"
        },
        "messages": {
          "values": [
            {
              "content": "=You are an expert copywriter for short-form social videos.\n\nYour task is to write compelling title hooks:\n\nCompelling hook:\n\n**one short, insanely curiosity invoking open loop type text line** for a vertical video. These will be used as text overlays (top and bottom) in the video. Should have exactly 40 Characters.\n\nThis is the hook topic:\n{{ $('AI Agent').item.json.output }}\n\nStep 1: Analyse the topic above and extract the most unique angle or benefit.\n\nStep 2: Model this example as exact as possible including \"...\" end:\n\nI broke up with ChatGPT, this AI “gets me” much better...\n\nFinally cracked the dating code, it’s simpler than you think...\n\n--the hook must be compelling not a description of a scene but the teaser of a specific benefit, discovery, solution, etc-.\n\n--hoke must follow the example structure as close as possible, no use of \":\"\n\n✂️ Rules to deliver the output:\n\n- No quotes, no brackets, no emojis\n- Avoid hashtags, titles, or introductions\n"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        4380,
        -1000
      ],
      "id": "5f7e9203-51c2-4fc0-9a75-c4d7190280b6",
      "name": "Hook Maker",
      "credentials": {
        "openAiApi": {
          "id": "80b8DOj8REc2MMqi",
          "name": "OpenAi account 9"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.json2video.com/v2/movies",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n \"id\": \"qbaasr7s\",\n \"resolution\": \"custom\",\n \"quality\": \"high\",\n \"scenes\": [\n   {\n     \"id\": \"qyjh9lwj\",\n     \"comment\": \"Scene 1\",\n     \"elements\": []\n   }\n ],\n \"elements\": [\n   {\n     \"id\": \"q6dznzcv\",\n     \"type\": \"video\",\n     \"src\": \"{{ $('Get Video').item.json.movie.url }}\"\n   },\n   {\n     \"id\": \"top-text\",\n     \"type\": \"text\",\n     \"text\": \"{{ $json.message.content }}\",\n     \"start\": 0,\n     \"duration\": 4,\n     \"settings\": {\n  \"font-family\": \"Arial\",\n  \"font-size\": \"40px\",\n  \"color\": \"#000000\",\n  \"background-color\": \"#FFFFFF\",\n  \"horizontal-position\": \"center\",\n  \"vertical-position\": \"top\",\n  \"margin-top\": \"50px\",\n  \"word-break\": \"break-word\",\n  \"overflow-wrap\": \"break-word\",\n  \"font-weight\": \"bold\",\n  \"text-align\": \"center\",\n  \"width\": \"80%\",\n  \"padding\": \"0\",\n  \"line-height\": \"1\",\n  \"margin\": \"50px 0 0 0\",\n  \"box-shadow\": \"none\",\n  \"text-shadow\": \"none\",\n  \"shadow\": \"none\"\n}\n   },\n   {\n     \"id\": \"q41n9kxp\",\n     \"type\": \"subtitles\",\n     \"settings\": {\n       \"style\": \"classic-progressive\",\n       \"position\": \"bottom\",\n       \"font-family\": \"Oswald\",\n       \"font-size\": 100,\n       \"word-color\": \"#ffd700\",\n       \"shadow-color\": \"#260B1B\",\n       \"line-color\": \"#F1E7F4\",\n       \"shadow-offset\": 0,\n       \"box-color\": \"#260B1B\",\n       \"outline-color\": \"#000000\",\n       \"outline-width\": 8\n     },\n     \"language\": \"en\"\n   },\n   {\n     \"id\": \"music-track\",\n     \"type\": \"audio\",\n     \"src\": \"{{ $('Get Music').item.json.output }}\",\n     \"volume\": 0.1,\n     \"duration\": -2\n   }\n ],\n \"width\": 720,\n \"height\": 1280\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4860,
        -1000
      ],
      "id": "55745659-2045-4434-a971-07eddcfc3639",
      "name": "Generate Final Video",
      "credentials": {
        "httpCustomAuth": {
          "id": "V5IqG12cv0WZWtcb",
          "name": "Custom Auth account 12"
        }
      }
    },
    {
      "parameters": {
        "amount": 35
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        4980,
        -1000
      ],
      "id": "14a680b2-2cae-4235-bda9-dc107451640a",
      "name": "Wait3",
      "webhookId": "96992e37-9eda-440a-a989-60fab1b7bba4"
    },
    {
      "parameters": {
        "url": "=https://api.json2video.com/v2/movies?id={{ $json.project }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpCustomAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5100,
        -1000
      ],
      "id": "3ed8b363-cadd-46ef-ac9d-a07142b523fd",
      "name": "Get Video1",
      "credentials": {
        "httpCustomAuth": {
          "id": "V5IqG12cv0WZWtcb",
          "name": "Custom Auth account 12"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "GPT-4O"
        },
        "messages": {
          "values": [
            {
              "content": "=Write a short social media caption based on this: \n{{ $('AI Agent').item.json.output }}\n\nMake it actionable, but not sound generic or motivational. Maybe some highly specific tips, or a problem along with a solution. and add 2 relevant hashtags. And only one sentence per line and empty line between each sentence. Then encourage to comment with a keyword if they want to get the real solution.\n\nIMPORTANT RULES:\n- Do NOT use any quotation marks (\" or ') at all\n- Do NOT put quotes around sentences\n- For the comment call-to-action, write it like: Comment KEYWORD below (no quotes)\n- Write naturally without any quotation marks\n- Use only standard straight apostrophes (') not curly ones (')\n"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        5220,
        -1000
      ],
      "id": "c22094c0-8ea9-443e-b82f-ff8499509eac",
      "name": "Caption Maker",
      "credentials": {
        "openAiApi": {
          "id": "80b8DOj8REc2MMqi",
          "name": "OpenAi account 9"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4",
          "mode": "list",
          "cachedResultName": "Demo 27.6. - Shorts that Sell Automation - Bulk Scheduler  - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Videos",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4/edit#gid=740956331"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Video ID": "={{ $('Video ID').item.json.code }}",
            "Video Prompts": "={{ $('AI Agent').item.json.output }}",
            "Hook": "={{ $('Hook Maker').item.json.message.content }}",
            "Caption": "={{ $json.message.content }}",
            "Video URL": "={{ $('Get Video1').item.json.movie.url }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Video ID",
              "displayName": "Video ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Video Prompts",
              "displayName": "Video Prompts",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Hook",
              "displayName": "Hook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Caption",
              "displayName": "Caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Video URL",
              "displayName": "Video URL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Publish Date",
              "displayName": "Publish Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        5500,
        -1000
      ],
      "id": "44c47822-6354-4dcf-94e0-ccc3270bca36",
      "name": "Save Info",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GT7miIrD2lupsroH",
          "name": "Google Sheets account 34"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4",
          "mode": "list",
          "cachedResultName": "Demo 27.6. - Shorts that Sell Automation - Bulk Scheduler  - autonoma.agency",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": 740956331,
          "mode": "list",
          "cachedResultName": "Videos",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1nkZiq5nNnGAeW1M7CMcETzPtTvqb5MTdELDUgBchsR4/edit#gid=740956331"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Video ID": "={{ $('Video ID').item.json.code }}",
            "Publish Date": "={{ $now }}",
            "Status": "Published"
          },
          "matchingColumns": [
            "Video ID"
          ],
          "schema": [
            {
              "id": "Video ID",
              "displayName": "Video ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Video Prompts",
              "displayName": "Video Prompts",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Hook",
              "displayName": "Hook",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Caption",
              "displayName": "Caption",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Video URL",
              "displayName": "Video URL",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Publish Date",
              "displayName": "Publish Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        5620,
        -760
      ],
      "id": "64d3c42b-931c-4e65-8698-709ce2ad7a9d",
      "name": "Save Date",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GT7miIrD2lupsroH",
          "name": "Google Sheets account 34"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "text": "=Here's your published video:   \n\n----------------    \n\nCaption Text: {{ $('Save Info').item.json.Caption }}  ----------------    \n\nVideo Link: {{ $('Save Info').item.json['Video URL'] }}  \n\n----------------  ",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        5040,
        -540
      ],
      "id": "30ec4c96-5c1f-4ff7-b91f-06e67cec1369",
      "name": "Telegram",
      "webhookId": "a955232c-5705-43bd-83d1-484fdca9fa62",
      "credentials": {
        "telegramApi": {
          "id": "gITA5cruosqkSk5K",
          "name": "Telegram account 28"
        }
      }
    },
    {
      "parameters": {
        "operation": "sendVideo",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "file": "={{ $('Save Info').item.json['Video URL'] }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        5180,
        -540
      ],
      "id": "250c03c2-85e8-453c-87d9-3bd16ab92848",
      "name": "Telegram1",
      "webhookId": "02287786-f8c7-4467-ba1e-9422ee730424",
      "credentials": {
        "telegramApi": {
          "id": "gITA5cruosqkSk5K",
          "name": "Telegram account 28"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "65d16a85-00f2-49b7-9578-6e8dcac01f1c",
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        700,
        -660
      ],
      "id": "0582f824-c7fb-4524-a6f1-41f7b7f4bdcd",
      "name": "If"
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        860,
        -520
      ],
      "id": "9e4b2a5b-926d-4754-8b0d-06bd536a14fc",
      "name": "Wait4",
      "webhookId": "e166c99e-5b03-42d1-8101-6093eeea3e92"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "65d16a85-00f2-49b7-9578-6e8dcac01f1c",
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1180,
        -660
      ],
      "id": "001e7ccd-a978-4f7f-ad3d-8e11b1965891",
      "name": "If1"
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1320,
        -520
      ],
      "id": "dfde6f9d-db57-44ce-9268-5404241d50b5",
      "name": "Wait5",
      "webhookId": "aed1c462-2f2d-4142-a80e-2a4af0dc9593"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "65d16a85-00f2-49b7-9578-6e8dcac01f1c",
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1660,
        -700
      ],
      "id": "eb1ad2e2-62b1-4908-aeba-06456aa9bcf3",
      "name": "If2"
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1820,
        -520
      ],
      "id": "c0a4d28f-0ffa-4f06-a449-571b6268fd0a",
      "name": "Wait6",
      "webhookId": "c66a68d5-820a-4183-b287-db4d4a1d3a7e"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "65d16a85-00f2-49b7-9578-6e8dcac01f1c",
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        4140,
        -1000
      ],
      "id": "06973b09-762d-4afd-ba4f-6ee9562293ee",
      "name": "If3"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "65d16a85-00f2-49b7-9578-6e8dcac01f1c",
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2440,
        -940
      ],
      "id": "ea7fdbd8-23b9-437c-a7a5-34190e2a27d9",
      "name": "If4"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/media",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $json['Video URL'] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        4900,
        -760
      ],
      "id": "a7185586-edd9-453c-9e65-6fe530591bec",
      "name": "Upload Video"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"YOUR_ACCOUNT_ID\",\n    \"content\": {\n      \"text\": {{ $('Caption Maker').item.json.message.content.toJsonString() }},\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ],\n      \"platform\": \"instagram\"\n    },\n    \"target\": {\n      \"targetType\": \"instagram\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"disabledComments\": false,\n      \"disabledDuet\": false,\n      \"disabledStitch\": false,\n      \"isBrandedContent\": false,\n      \"isYourBrand\": true,\n      \"isAiGenerated\": false\n    }\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5020,
        -760
      ],
      "id": "e63647d6-460f-4b43-92ad-a8197caaedcb",
      "name": "Instagram"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"YOUR_ACCOUNT_ID\",\n    \"content\": {\n      \"text\": {{ $('Save Info').item.json.Caption.toJsonString() }},\n      \"mediaUrls\": [\n        \"{{ $('Upload Video').item.json.url }}\"\n      ],\n      \"platform\": \"tiktok\"\n    },\n    \"target\": {\n      \"targetType\": \"tiktok\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"disabledComments\": false,\n      \"disabledDuet\": false,\n      \"disabledStitch\": false,\n      \"isBrandedContent\": false,\n      \"isYourBrand\": true,\n      \"isAiGenerated\": false\n    }\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5140,
        -760
      ],
      "id": "652a325e-9504-461d-9485-c14e3088f0be",
      "name": "TikTok"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"YOUR_ACCOUNT_ID\",\n    \"content\": {\n      \"text\": {{ $('Save Info').item.json.Caption.toJsonString() }},\n      \"mediaUrls\": [\n        \"{{ $('Upload Video').item.json.url }}\"\n      ],\n      \"platform\": \"youtube\"\n    },\n    \"target\": {\n      \"targetType\": \"youtube\",\n      \"title\": {{ $('Hook Maker').item.json.message.content.toJsonString() }},\n      \"privacyStatus\": \"public\",\n      \"shouldNotifySubscribers\": true,\n      \"isMadeForKids\": false\n    }\n  }\n}\n",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5260,
        -760
      ],
      "id": "7660f02e-686e-43e2-b817-d77802a93b6d",
      "name": "YouTube"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"INSERT_ACCOUNT_ID\",\n    \"content\": {\n      \"text\": \"{{ $('Save Info').item.json.Caption.toJsonString() }}\",\n      \"mediaUrls\": [\n        \"{{ $('Upload Video').item.json.url }}\"\n      ],\n      \"platform\": \"facebook\"\n    },\n    \"target\": {\n      \"targetType\": \"facebook\",\n      \"pageId\": \"INSERT_PAGE_ID\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"disabledComments\": false,\n      \"disabledDuet\": false,\n      \"disabledStitch\": false,\n      \"isBrandedContent\": false,\n      \"isYourBrand\": true,\n      \"isAiGenerated\": false\n    }\n  },\n  \"scheduledTime\": \"{{ $('Save Info').item.json['Schedule Time'] }}\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5500,
        -760
      ],
      "id": "4373ca08-26b5-4c75-b02a-cd4ceb4720d5",
      "name": "Facebook"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "INSERT_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"INSERT_ACCOUNT_ID\",\n    \"content\": {\n      \"text\": \"{{ $('Save Info').item.json.Caption.toJsonString() }}\",\n      \"mediaUrls\": [\n        \"{{ $('Upload Video').item.json.url }}\"\n      ],\n      \"platform\": \"linkedin\"\n    },\n    \"target\": {\n      \"targetType\": \"linkedin\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"disabledComments\": false,\n      \"disabledDuet\": false,\n      \"disabledStitch\": false,\n      \"isBrandedContent\": false,\n      \"isYourBrand\": true,\n      \"isAiGenerated\": false\n    }\n  },\n  \"scheduledTime\": \"{{ $('Save Info').item.json['Schedule Time'] }}\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        5380,
        -760
      ],
      "id": "9665884a-60c1-4277-b184-2cc230fc6c6c",
      "name": "LinkedIn"
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Split",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Get Scenes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scenes": {
      "main": [
        [
          {
            "node": "Video ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video ID": {
      "main": [
        [
          {
            "node": "Generate Scene 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Scene 1": {
      "main": [
        [
          {
            "node": "Get Scene 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scene 1": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Scene 3": {
      "main": [
        [
          {
            "node": "Get Scene 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Scene 2": {
      "main": [
        [
          {
            "node": "Get Scene 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scene 2": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scene 3": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Scenes": {
      "main": [
        [
          {
            "node": "Get Merged Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Merged Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Merged Video": {
      "main": [
        [
          {
            "node": "If4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Voice": {
      "main": [
        [
          {
            "node": "Upload Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Voice": {
      "main": [
        [
          {
            "node": "Video + Voice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video + Voice": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video": {
      "main": [
        [
          {
            "node": "Music Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Music Prompt": {
      "main": [
        [
          {
            "node": "Generate Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Music": {
      "main": [
        [
          {
            "node": "Get Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Get Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Music": {
      "main": [
        [
          {
            "node": "If3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Hook Maker": {
      "main": [
        [
          {
            "node": "Generate Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Final Video": {
      "main": [
        [
          {
            "node": "Wait3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait3": {
      "main": [
        [
          {
            "node": "Get Video1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video1": {
      "main": [
        [
          {
            "node": "Caption Maker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Caption Maker": {
      "main": [
        [
          {
            "node": "Save Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Info": {
      "main": [
        [
          {
            "node": "Upload Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Date": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram": {
      "main": [
        [
          {
            "node": "Telegram1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Generate Scene 2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait4": {
      "main": [
        [
          {
            "node": "Get Scene 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Generate Scene 3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait5": {
      "main": [
        [
          {
            "node": "Get Scene 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Merge Scenes",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait6": {
      "main": [
        [
          {
            "node": "Get Scene 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If3": {
      "main": [
        [
          {
            "node": "Hook Maker",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If4": {
      "main": [
        [
          {
            "node": "Create Voice",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video": {
      "main": [
        [
          {
            "node": "Instagram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram": {
      "main": [
        [
          {
            "node": "TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TikTok": {
      "main": [
        [
          {
            "node": "YouTube",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube": {
      "main": [
        [
          {
            "node": "LinkedIn",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn": {
      "main": [
        [
          {
            "node": "Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Facebook": {
      "main": [
        [
          {
            "node": "Save Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a1d9854f-b76a-45f1-b019-0b41c9112447",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "7ff6625f0127f3e9a7865e3493009de1c48f57dc5ed87def3ae3316be7f6b238"
  },
  "id": "oGZFAWZAl3VvDmiC",
  "tags": []
}