AutomationFlowsAI & RAG › Turbo Videogen

Turbo Videogen

Turbo Videogen. Uses lmChatOpenRouter, agent, httpRequest, formTrigger. Event-driven trigger; 41 nodes.

Event trigger★★★★★ complexityAI-powered41 nodesOpenRouter ChatAgentHTTP RequestForm TriggerN8N Nodes CloudinaryGoogle GeminiChain LlmExecute Command
AI & RAG Trigger: Event Nodes: 41 Complexity: ★★★★★ AI nodes: yes Added:
Turbo Videogen — n8n workflow card showing OpenRouter Chat, Agent, HTTP Request integration

This workflow follows the Agent → Chainllm recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Turbo Videogen",
  "nodes": [
    {
      "parameters": {
        "model": "openai/gpt-5-mini",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        592,
        928
      ],
      "id": "e67d0f6e-46f7-4922-b5bf-e2448e2395de",
      "name": "GPT-5-mini",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Product: {{ $json.content.parts[0].text }}\n\nRequest: {{ $('On form submission').item.json.Instruction }}\n\n",
        "options": {
          "systemMessage": "=# System Prompt Template: Sora 2 Cinematic Fantasy Video Generation\n\n## Role\nYou are an **expert cinematic video director** optimizing for **Sora 2**.\nYour task is to **generate a prompt for a Sora 2 AI video model** based on:\n- The **Product** (The specific cake in the reference image)\n- The **Courier** (An Angel)\n- The **Customer** (The recipient)\n- The **Setting** (Where the delivery takes place)\n- A **Reference Image**\n\nYour goal is to create a **high-quality, magical realism video** depicting a **celestial angel delivering a cake to a surprised customer**. The scene should feel **cinematic, wondrous, and visually stunning**, while ensuring **visual consistency with the provided reference image of the cake**.\n\n---\n\n## Video Requirements\n\n### Subject & Action\n- **The Courier (Angel):** Must appear ethereal but tangible. They should have distinct wings (feathered, glowing, or stylized) and hold the cake with extreme care and reverence.\n- **The Customer:** A human character (varying in age/gender) who reacts with genuine surprise, delight, or awe.\n- **The Action:** The angel is in the process of **presenting or handing over the cake**. The interaction should be smooth and graceful.\n- **The Product (Cake):** The cake must remain the visual focal point. Its design, decorations, and texture must **match the reference image exactly**.\n\n### Visual Style & Framing\n- **Framing:** Third-person cinematic shot (Medium shot or Wide shot). **Do not use selfie angles.**\n- **Camera Movement:** Smooth, stabilizing glides (gimbal or dolly style) to emphasize the grace of the angel.\n- **Lighting:** A blend of **realistic environmental lighting** (e.g., a sunny porch, a dim restaurant) mixed with a subtle **divine glow** or rim-lighting on the angel.\n- **Consistency:** The **reference image** determines the **cake's exact topping, icing, and shape** \u2014 match it precisely.\n\n### Tone & Atmosphere\n- The mood should be **magical, heartwarming, and premium**.\n- Avoid comedic slapstick; the delivery should feel like a \"blessing\" or a special moment.\n- **Audio Implication:** The prompt should suggest a soundscape of fluttering wings and a magical chime, rather than dialogue.\n\n### Technical Specs\n- **Duration:** 10 seconds\n- **Shot Type:** Cinematic Mid-Shot\n- **Orientation:** Vertical (9:16) or Horizontal (16:9) [Depending on user preference, default to Cinematic]\n- **Reference Image:** Used strictly for the cake's appearance.\n\n---\n\n## Prompt Construction Instructions\nWhen generating the Sora 2 video prompt, make sure to:\n\n- Explicitly describe the **Angel's appearance** (attire, wing span, lighting).\n- Describe the **Customer's reaction** (facial expression, body language).\n- Set the **scene** (e.g., a rainy doorstep, a high-rise balcony, a cozy living room).\n- **Mandatory:** Reference the **cake's exact look** from the provided image (e.g., \"A fruit cake topped with marzipan angels\").\n- Ensure the movement describes the **hand-off** or the **arrival**.\n\n---\n\n## Example Output Prompt (for Sora 2 AI Video Model)\n\n> \"A stunning cinematic video showing a majestic **Angel** with large, soft-white feathered wings standing on a suburban doorstep. The Angel is gently holding **[The Cake from Reference Image: a round fruit cake featuring a ring of marzipan angels]** in both hands, presenting it forward. A **young woman** opens the door, her face lighting up with shock and pure joy as she sees the divine courier. The lighting is golden hour sunset, casting a warm glow on the cake's icing. The camera glides slowly inward to focus on the details of the cake and the connection between the angel and the human. The scene is magical, realistic, and highly detailed, 8k resolution.\""
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        608,
        736
      ],
      "id": "0f309275-e9fc-48a0-8bbd-e6b554516651",
      "name": "Sora Video Prompt"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.kie.ai/api/v1/jobs/createTask",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"sora-2-image-to-video\",\n  \"input\": {\n    \"prompt\": \"{{ $json.output.replace(/\\r?\\n|\\r/g, ' ')\n  .replace(/\"/g, '')\n  .replace(/[\u201c\u201d]/g, '') // removes curly double quotes\n}} }}\",\n    \"image_urls\": [\n      \"{{ $('Upload an asset from file data').item.json.url }}\"\n    ],\n    \"aspect_ratio\": \"portrait\",\n    \"n_frames\": \"10\",\n    \"remove_watermark\": true\n  }\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        896,
        736
      ],
      "id": "e9577bf3-1f07-4634-8390-c1540d01f417",
      "name": "Sora Video",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "amount": 40
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1056,
        736
      ],
      "id": "4eda2cc5-1a02-41f2-8e52-7bb4b8063747",
      "name": "Wait2"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "b4ea379e-3541-4d2b-9421-f0c962c8d5e8",
              "leftValue": "={{ $json.data.state }}",
              "rightValue": "success",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            },
            {
              "id": "86b5c5ef-383b-4d9f-b373-a34622592e40",
              "leftValue": "={{ $runIndex  }}",
              "rightValue": 40,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1376,
        736
      ],
      "id": "52a188c0-488b-4a04-a0f6-eaaa6d53f72f",
      "name": "If2"
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/jobs/recordInfo",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1200,
        736
      ],
      "id": "37a20fe9-734e-4fc4-bba1-8d00dbcc5dba",
      "name": "Get Sora Video",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "formTitle": "Video generation",
        "formDescription": "Send your image and short instruction for video",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Instruction",
              "placeholder": "Angel bringing this cake to a customer",
              "requiredField": true
            },
            {
              "fieldLabel": "Picture",
              "fieldType": "file",
              "multipleFiles": false,
              "requiredField": true
            },
            {
              "fieldLabel": "E-mail",
              "fieldType": "email",
              "placeholder": "info@mail.com",
              "requiredField": true
            },
            {
              "fieldLabel": "Language",
              "fieldType": "dropdown",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Spanish"
                  },
                  {
                    "option": "English"
                  },
                  {
                    "option": "Russian"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -16,
        720
      ],
      "id": "0691cc2e-0815-4a0a-98de-facfcbcf7ab8",
      "name": "On form submission"
    },
    {
      "parameters": {
        "operation": "uploadFile",
        "file": "Picture",
        "additionalFieldsFile": {}
      },
      "type": "n8n-nodes-cloudinary.cloudinary",
      "typeVersion": 1,
      "position": [
        160,
        720
      ],
      "id": "109ef7d3-5105-437b-9e2b-274f03c530b1",
      "name": "Upload an asset from file data",
      "credentials": {
        "cloudinaryApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "analyze",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.5-flash",
          "mode": "list",
          "cachedResultName": "models/gemini-2.5-flash"
        },
        "text": "What's in this image? Give detailed description",
        "imageUrls": "={{ $json.url }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        304,
        880
      ],
      "id": "12bacbd6-3013-4237-92fd-056532e7d797",
      "name": "Analyze an image",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        448,
        736
      ],
      "id": "0101e9eb-c189-408b-b487-681b35905b83",
      "name": "Merge"
    },
    {
      "parameters": {
        "model": "openai/gpt-5-mini",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        1008,
        1328
      ],
      "id": "0879eedf-0c04-465a-9137-6a4c8f420d3c",
      "name": "OpenRouter Chat Model2",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are creative assitent, blogger an youtuber. You are provided with image description:  {{ $('Analyze an image').item.json.content.parts[0].text }}\n\nYour task is to create voice over text for the video created from the image. \nTotal video length is 9 seconds so voice over MUST be 12 words with 6 percent tolerance. Make it interesting and add some mild humor.\n\nYour output must be in clean text, without any emojis or brackets, but with punctuations, it goes directly in text to speech generation model. \n\nVoice over must be in {{ $('On form submission').first().json.Language }} language!",
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        1056,
        1120
      ],
      "id": "f41a4b8b-52da-4280-a1fb-ef71b5c8a889",
      "name": "Gen voiceover text"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a62561bb-43d6-49eb-b2b4-46d63f310ff3",
              "name": "text_to_tts",
              "value": "={{ $json.text }}",
              "type": "string"
            },
            {
              "id": "7885f8e6-a366-4512-89c7-adcf4f7fe4e2",
              "name": "subfix",
              "value": "={{$now.toMillis()}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1408,
        1120
      ],
      "id": "d15599a8-7bbc-4883-9f6e-0dae83b9116b",
      "name": "Input text to test"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-preview-tts:generateContent",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "googlePalmApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"text\": \"{{ $json.text_to_tts }}\"\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\"audio\"],\n    \"temperature\": 1,\n    \"speech_config\": {\n      \"voice_config\": {\n        \"prebuilt_voice_config\": {\n          \"voice_name\": \"Zephyr\"\n        }\n      }\n    }\n  }\n}\n",
        "options": {
          "response": {
            "response": {}
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1632,
        1120
      ],
      "id": "8b529dd1-ba51-4bae-a988-df27511eb413",
      "name": "Text to speech",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "command": "=mkdir -p /tmp/video_turbo_temp || true"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        752,
        1120
      ],
      "id": "aa45fc5a-3d23-401f-94a2-a26aec3d77c6",
      "name": "Execute Command"
    },
    {
      "parameters": {
        "fileSelector": "=/tmp/video_turbo_temp/final_{{ $execution.id }}.mp4",
        "options": {
          "dataPropertyName": "data"
        }
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        2976,
        1168
      ],
      "id": "a30712d2-dc2b-4779-984e-be9f522bb5b2",
      "name": "Read Final Video"
    },
    {
      "parameters": {
        "jsCode": "// Configurable params\nconst sampleRate = 24000; \nconst numChannels = 1; \nconst bitsPerSample = 16;\nconst rawData = $input.first().json.candidates[0].content.parts[0].inlineData.data;\n\n// Decode base64 to buffer\nconst rawBuffer = Buffer.from(rawData, 'base64');\n\n// Construct WAV Header\nconst byteRate = sampleRate * numChannels * bitsPerSample / 8;\nconst blockAlign = numChannels * bitsPerSample / 8;\nconst wavHeaderSize = 44;\nconst dataSize = rawBuffer.length;\nconst fileSize = wavHeaderSize + dataSize - 8;\nconst header = Buffer.alloc(wavHeaderSize);\n\nheader.write('RIFF', 0);\nheader.writeUInt32LE(fileSize, 4);\nheader.write('WAVE', 8);\nheader.write('fmt ', 12);\nheader.writeUInt32LE(16, 16);\nheader.writeUInt16LE(1, 20);\nheader.writeUInt16LE(numChannels, 22);\nheader.writeUInt32LE(sampleRate, 24);\nheader.writeUInt32LE(byteRate, 28);\nheader.writeUInt16LE(blockAlign, 32);\nheader.writeUInt16LE(bitsPerSample, 34);\nheader.write('data', 36);\nheader.writeUInt32LE(dataSize, 40);\n\nconst wavBuffer = Buffer.concat([header, rawBuffer]);\n\n// DEFINE PATH AND RETURN IT\nconst fileName = `voice_${$execution.id}.wav`;\nconst filePath = `/tmp/video_turbo_temp/${fileName}`;\n\nreturn [\n  {\n    json: {\n      filePath: filePath,\n      fileName: fileName\n    },\n    binary: {\n      data: {  // <--- CHANGED FROM 'wav' TO 'data' TO FIX THE ERROR\n        data: wavBuffer.toString('base64'),\n        mimeType: 'audio/wav',\n        fileName: fileName\n      }\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2112,
        1120
      ],
      "id": "d853f523-1b67-428a-bcd5-51ee4296d99b",
      "name": "Get voiceover mp"
    },
    {
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1824,
        720
      ],
      "id": "55422250-c63a-46a7-908f-b04538c83bf2",
      "name": "Download Sora Video1"
    },
    {
      "parameters": {
        "operation": "uploadFile",
        "resource_type_file": "video",
        "additionalFieldsFile": {}
      },
      "type": "n8n-nodes-cloudinary.cloudinary",
      "typeVersion": 1,
      "position": [
        2544,
        1520
      ],
      "id": "09d08252-caac-4f22-8a63-f8704028f3d2",
      "name": "Upload Final1",
      "credentials": {
        "cloudinaryApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "contact@algoran.eu",
        "toEmail": "={{ $('On form submission').first().json['E-mail'] }}",
        "subject": "Your video link",
        "emailFormat": "text",
        "text": "=Link to your video: {{ $json.secure_url }}",
        "options": {}
      },
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        2736,
        1520
      ],
      "id": "d5accf05-4689-41b3-8f48-01db56b967c6",
      "name": "Send email1",
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Parse the stringified JSON from Sora\nconst data = JSON.parse($input.item.json.data.resultJson);\n\n// Return just the clean URL\nreturn {\n  json: {\n    url: data.resultUrls[0]\n  }\n};"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1600,
        720
      ],
      "id": "d422a7c3-c3ca-4028-81f8-b5d358010637",
      "name": "Clean URL1"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are a music supervisor. \n\nImage Description: {{ $('Analyze an image').item.json.content.parts[0].text }}\nUser Instruction: {{ $('On form submission').item.json.Instruction }}\n\nTask: Describe a musical style for a background track for this video. Use adjectives only (e.g., \"Cinematic, ethereal, orchestral, hopeful\"). \nConstraint: Maximum 10 words. Instrumental only."
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.4,
      "position": [
        432,
        1280
      ],
      "id": "cf947d4f-70ac-4c31-920a-1b4bca59ba9d",
      "name": "Gen Music Style"
    },
    {
      "parameters": {
        "model": "openai/gpt-5-mini",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        496,
        1504
      ],
      "id": "5d119b5e-2072-42b5-972b-fe758f95b25c",
      "name": "Music LLM",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.kie.ai/api/v1/generate",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"V4\",\n  \"prompt\": \"{{ $json.text }}\",\n  \"instrumental\": true,\n  \"customMode\": false,\n  \"callBackUrl\": \"https://example.com/callback\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        768,
        1376
      ],
      "id": "9e406a74-606a-40fa-9778-a6e5ea792c5e",
      "name": "Start Suno Music",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "amount": 50
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        976,
        1504
      ],
      "id": "6976e32f-1e1c-4645-818d-d9d1af76471b",
      "name": "Wait Music"
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/generate/record-info",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1648,
        1536
      ],
      "id": "2ca98e62-6d0f-454e-a751-ece6c0d7f21f",
      "name": "Get Suno Result",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.data.response.sunoData[0].audioUrl }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1872,
        1536
      ],
      "id": "5c314e52-54b5-45ac-a607-9308986303dc",
      "name": "Download Music"
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "=/tmp/video_turbo_temp/music_{{ $execution.id }}.mp3",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        2096,
        1536
      ],
      "id": "9a96dde4-deae-4d0a-9770-7947463cc7f2",
      "name": "Save Music"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "numberInputs": 3,
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [
        2560,
        1104
      ],
      "id": "99fe3d7f-3112-48a7-90a3-ad3bf14ca9c5",
      "name": "Merge 3 Files"
    },
    {
      "parameters": {
        "command": "=ffmpeg -y -i {{ $('Save Video').item.json.fileName }} -i {{ $('Save WAV').item.json.filePath }} -i {{ $('Save Music').item.json.fileName }} -filter_complex \"[1:a]adelay=1000|1000[voice];[2:a]volume=0.15[bgm];[voice][bgm]amix=inputs=2:duration=first:dropout_transition=2[a]\" -map 0:v -map \"[a]\" -c:v copy -c:a aac -shortest /tmp/video_turbo_temp/final_{{ $execution.id }}.mp4"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        2752,
        1120
      ],
      "id": "ad868ed9-bcac-4d6c-b8f1-2fb2f6c92d46",
      "name": "Merge FFmpeg Music"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "b4ea379e-3541-4d2b-9421-f0c962c8d5e8",
              "leftValue": "={{ $json.data.response.sunoData[0].audioUrl }}",
              "rightValue": "success",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            },
            {
              "id": "86b5c5ef-383b-4d9f-b373-a34622592e40",
              "leftValue": "={{ $runIndex  }}",
              "rightValue": 40,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1392,
        1552
      ],
      "id": "402adb0d-a263-4d8d-b791-2195a30374b1",
      "name": "If"
    },
    {
      "parameters": {
        "url": "https://api.kie.ai/api/v1/generate/record-info",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1184,
        1552
      ],
      "id": "ab234973-87d9-4fdf-93ff-2f4f200b24e2",
      "name": "Get Sora music",
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "=/tmp/video_turbo_temp/video_{{ $execution.id }}.mp4",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        2096,
        720
      ],
      "id": "ac3e3ed0-429c-4be0-979b-2dc67d237c18",
      "name": "Save Video"
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "={{ $json.filePath }}",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        2304,
        1120
      ],
      "id": "020c124f-f999-4847-bf75-b20db89794d6",
      "name": "Save WAV"
    },
    {
      "parameters": {
        "command": "=rm -f /tmp/video_turbo_temp/*_{{ $execution.id }}.*"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        2960,
        1520
      ],
      "id": "690404cd-f430-40a8-8cb8-a580b33021b9",
      "name": "Cleanup Temp Files"
    },
    {
      "parameters": {
        "content": "## 1. Input & Analysis\nAnalyzes the image to generate prompts for Video, Voiceover, and Music.",
        "height": 284,
        "width": 386,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -144,
        864
      ],
      "id": "b208fa98-7c3a-4999-8a77-515bd815cfa9",
      "name": "Sticky Note Input"
    },
    {
      "parameters": {
        "content": "## 2. Sora Video Generation\nGenerates video -> Loops until ready -> Downloads MP4.",
        "height": 348,
        "width": 1600,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        352,
        560
      ],
      "id": "e288ddec-1e94-4446-8cb5-240b3844cd88",
      "name": "Sticky Note Video"
    },
    {
      "parameters": {
        "content": "## 4. Music & Voice over Generation\nGenerates Style Prompt -> Suno AI -> Loops until ready -> Downloads MP3.",
        "height": 360,
        "width": 1800,
        "color": 6
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        224,
        1200
      ],
      "id": "ce474cd2-bb3b-4cb7-baee-7413f4633b26",
      "name": "Sticky Note Music"
    },
    {
      "parameters": {
        "content": "## 5. Assembly & Cleanup\nMerges 3 files -> Uploads -> Emails -> Deletes temp files.",
        "height": 600,
        "width": 992,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2208,
        816
      ],
      "id": "aca7efc6-cb62-49d5-9a0f-35ed834cb9ec",
      "name": "Sticky Note Assembly"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "3fcd80ac-63ec-4c67-a012-a5799b3f1c83",
              "leftValue": "={{ $json.candidates[0].content.parts[0].inlineData.data }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1840,
        1120
      ],
      "id": "b107753c-f462-40db-8f85-99ab07807622",
      "name": "If1"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1984,
        1264
      ],
      "id": "8600a12e-4464-4223-9897-2fc13b904ca4",
      "name": "Wait"
    }
  ],
  "connections": {
    "GPT-5-mini": {
      "ai_languageModel": [
        [
          {
            "node": "Sora Video Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Sora Video Prompt": {
      "main": [
        [
          {
            "node": "Sora Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Get Sora Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If2": {
      "main": [
        [
          {
            "node": "Clean URL1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sora Video": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Sora Video": {
      "main": [
        [
          {
            "node": "If2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Upload an asset from file data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload an asset from file data": {
      "main": [
        [
          {
            "node": "Analyze an image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Sora Video Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze an image": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          },
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gen Music Style",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Gen voiceover text",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gen voiceover text": {
      "main": [
        [
          {
            "node": "Input text to test",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Input text to test": {
      "main": [
        [
          {
            "node": "Text to speech",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text to speech": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "Gen voiceover text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Final Video": {
      "main": [
        [
          {
            "node": "Upload Final1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get voiceover mp": {
      "main": [
        [
          {
            "node": "Save WAV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Sora Video1": {
      "main": [
        [
          {
            "node": "Save Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Final1": {
      "main": [
        [
          {
            "node": "Send email1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean URL1": {
      "main": [
        [
          {
            "node": "Download Sora Video1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Music LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Gen Music Style",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gen Music Style": {
      "main": [
        [
          {
            "node": "Start Suno Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Suno Music": {
      "main": [
        [
          {
            "node": "Wait Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Music": {
      "main": [
        [
          {
            "node": "Get Sora music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Suno Result": {
      "main": [
        [
          {
            "node": "Download Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Music": {
      "main": [
        [
          {
            "node": "Save Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge 3 Files": {
      "main": [
        [
          {
            "node": "Merge FFmpeg Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge FFmpeg Music": {
      "main": [
        [
          {
            "node": "Read Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Music": {
      "main": [
        [
          {
            "node": "Merge 3 Files",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Get Suno Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Sora music": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Video": {
      "main": [
        [
          {
            "node": "Merge 3 Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save WAV": {
      "main": [
        [
          {
            "node": "Merge 3 Files",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send email1": {
      "main": [
        [
          {
            "node": "Cleanup Temp Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "Get voiceover mp",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Text to speech",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "versionId": "b9c4d0f0-71a4-470c-b4cb-8cd0d1082aa9",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "rMyiDGxMrPs6Zt0K",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Turbo Videogen. Uses lmChatOpenRouter, agent, httpRequest, formTrigger. Event-driven trigger; 41 nodes.

Source: https://gist.github.com/arnikanord/b9fdbb6ad7f2d740af1c17b0d829053b — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Deep Research new (fr). Uses outputParserStructured, formTrigger, chainLlm, form. Event-driven trigger; 82 nodes.

Output Parser Structured, Form Trigger, Chain Llm +8
AI & RAG

Transform a hand-drawn character sketch into a fully animated, narrated video story — automatically. This 3-part pipeline uses Claude AI, image generation, and video synthesis to go from a simple draw

Form Trigger, Google Gemini, HTTP Request +5
AI & RAG

Sourcing_Agent_LinkedIn_validator_production. Uses executeWorkflowTrigger, chainLlm, mySql, httpRequest. Event-driven trigger; 51 nodes.

Execute Workflow Trigger, Chain Llm, MySQL +9
AI & RAG

Sourcing_Agent_LinkedIn_validator_production. Uses executeWorkflowTrigger, chainLlm, mySql, httpRequest. Event-driven trigger; 51 nodes.

Execute Workflow Trigger, Chain Llm, MySQL +9