AutomationFlowsAI & RAG › Create Viral Storytelling Videos with Gpt, Gemini & Jsoncut From Text Prompts

Create Viral Storytelling Videos with Gpt, Gemini & Jsoncut From Text Prompts

By8Automator @kesim0 on n8n.io

[](https://drive.google.com/file/d/1Cl0KwgRgcuBPVdGgL-nqAcheyvfVXttD/view) Click on the image to see the Example output in google drive

Event trigger★★★★★ complexityAI-powered32 nodesHTTP RequestStop And ErrorOpenAIGoogle GeminiForm TriggerNoco Db
AI & RAG Trigger: Event Nodes: 32 Complexity: ★★★★★ AI nodes: yes Added:
Create Viral Storytelling Videos with Gpt, Gemini & Jsoncut From Text Prompts — n8n workflow card showing HTTP Request, Stop And Error, OpenAI integration

This workflow corresponds to n8n.io template #9687 — we link there as the canonical source.

This workflow follows the Form Trigger → Googlegemini 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
{
  "id": "FeATxwI6wsWxI9FS",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Template-Jsoncut-images-to-video-nocodb",
  "tags": [
    {
      "id": "4f5HsQRwHRxYIUuf",
      "name": "jsoncut",
      "createdAt": "2025-10-12T07:39:06.742Z",
      "updatedAt": "2025-10-12T07:39:06.742Z"
    }
  ],
  "nodes": [
    {
      "id": "efbe1b62-900e-4b67-9269-b260fab0fa93",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1808,
        -304
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 3
      },
      "typeVersion": 1
    },
    {
      "id": "c6ecd939-fca4-495f-ba6e-e4942d840729",
      "name": "If Success",
      "type": "n8n-nodes-base.if",
      "position": [
        2224,
        -304
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.data.status }}",
              "value2": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "913331fc-3926-4fce-b727-f1ef610d9ae3",
      "name": "If Error",
      "type": "n8n-nodes-base.if",
      "position": [
        2240,
        -64
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json.data.status }}",
              "value2": "FAILED"
            },
            {
              "value1": "={{ $json.data.status }}",
              "value2": "CANCELLED"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c89e1256-72cd-4346-9043-4b7630e45626",
      "name": "Download Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2400,
        -320
      ],
      "parameters": {
        "url": "=https://api.jsoncut.com/api/v1/files/{{ $json.data.outputFileId }}/download",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        },
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/octet-stream"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "c1b3af1d-fab0-4c91-88ef-8d5fbae01823",
      "name": "Error Stop",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        2432,
        -64
      ],
      "parameters": {
        "errorMessage": "Failed to generate image"
      },
      "typeVersion": 1
    },
    {
      "id": "1c23012e-a186-4174-bd63-8e05bea44b81",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1376,
        -304
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "upload_results"
      },
      "typeVersion": 1
    },
    {
      "id": "d9dbc3a6-e2d1-47a3-979e-014ba6f2e26b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -608
      ],
      "parameters": {
        "width": 432,
        "height": 896,
        "content": "### Upload Files to JsonCut API"
      },
      "typeVersion": 1
    },
    {
      "id": "1a9195a4-e997-4d80-9abb-99a96ee3ab9c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        -400
      ],
      "parameters": {
        "color": 4,
        "width": 1104,
        "height": 576,
        "content": "### Create Job with Jsoncut API and wait for the result\nAlternatively, the JsonCut Community node can also be used (https://github.com/jsoncut/n8n-nodes-jsoncut)."
      },
      "typeVersion": 1
    },
    {
      "id": "116c4e0b-2533-4ef1-bee3-8c90d15b1527",
      "name": "Create JsonCut Job",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1584,
        -304
      ],
      "parameters": {
        "url": "https://api.jsoncut.com/api/v1/jobs",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"type\": \"video\",\n  \"config\": {\n    \"width\": 1080,\n    \"height\": 1920,\n    \"fps\": 25,\n    \"format\": \"mp4\",\n    \"audioTracks\": [\n      {\n        \"path\": \"{{ $json.upload_results[1].body.data.storageUrl }}\",\n        \"mixVolume\": 0.8,\n        \"start\": 1,\n        \"cutFrom\": 0,\n        \"cutTo\": {{ $('calculate audio duration').item.json.duration_seconds }}\n      },\n      {\n        \"path\": \"{{ $json.upload_results[2].data.storageUrl }}\",\n        \"mixVolume\": 0.2,\n        \"start\": 0,\n        \"cutFrom\": 0\n      }\n    ],\n    \"defaults\": {\n      \"layer\": {\n        \"googleFont\": \"Montserrat:700\",\n        \"textColor\": \"#ffffff\",\n        \"fontSize\": 54\n      }\n    },\n    \"clips\": [\n      {\n        \"duration\": {{ $('calculate audio duration').item.json.duration_seconds + 2 }},\n        \"layers\": [\n          {\n            \"type\": \"fill-color\",\n            \"color\": \"#000000\"\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[0].storageUrl[0] }}\",\n            \"start\": 1,\n            \"stop\": {{ 1 + ($('calculate audio duration').item.json.duration_seconds / 5) }},\n            \"zoomDirection\": \"in\",\n            \"zoomAmount\": 0.15,\n            \"height\": 1,\n            \"opacity\": 0.9\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[0].storageUrl[1] }}\",\n            \"start\": {{ 1 + ($('calculate audio duration').item.json.duration_seconds / 5) }},\n            \"stop\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 2 ) }},\n            \"zoomDirection\": \"right\",\n            \"zoomAmount\": 0.15,\n            \"height\": 1,\n            \"opacity\": 0.9\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[0].storageUrl[2] }}\",\n            \"start\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 2 ) }},\n            \"stop\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 3 ) }},\n            \"zoomDirection\": \"left\",\n            \"zoomAmount\": 0.15,\n            \"height\": 1,\n            \"opacity\": 0.9\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[0].storageUrl[3] }}\",\n            \"start\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 3 ) }},\n            \"stop\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 4 ) }},\n            \"zoomDirection\": \"out\",\n            \"zoomAmount\": 0.15,\n            \"height\": 1,\n            \"opacity\": 0.9\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[0].storageUrl[4] }}\",\n            \"start\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 5) * 4 ) }},\n            \"stop\": {{ $('calculate audio duration').item.json.duration_seconds + 1 }},\n            \"zoomDirection\": \"in\",\n            \"zoomAmount\": 0.15,\n            \"height\": 1,\n            \"opacity\": 0.9\n          },\n          {\n            \"type\": \"image-overlay\",\n            \"path\": \"{{ $json.upload_results[3].data.storageUrl }}\",\n            \"start\": 1,\n            \"stop\": {{ $('calculate audio duration').item.json.duration_seconds + 1 }},\n            \"position\": \"bottom\",\n            \"width\": 0.1,\n            \"height\": 0.1,\n            \"zoomDirection\": null\n          },\n          {\n            \"type\": \"title\",\n            \"text\": \"{{ $('Generate content and Image Prompt').item.json.message.content.text_segments[0] }}\",\n            \"start\": 1,\n            \"stop\": {{ 1 + ($('calculate audio duration').item.json.duration_seconds / 4) }},\n            \"position\": \"center\",\n            \"zoomDirection\": null\n          },\n          {\n            \"type\": \"title\",\n            \"text\": \"{{ $('Generate content and Image Prompt').item.json.message.content.text_segments[1] }}\",\n            \"start\": {{ 1 + ($('calculate audio duration').item.json.duration_seconds / 4) }},\n            \"stop\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 4) * 2 ) }},\n            \"position\": \"center\",\n            \"zoomDirection\": null\n          },\n          {\n            \"type\": \"title\",\n            \"text\": \"{{ $('Generate content and Image Prompt').item.json.message.content.text_segments[2] }}\",\n            \"start\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 4) * 2 ) }},\n            \"stop\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 4) * 3 ) }},\n            \"position\": \"center\",\n            \"zoomDirection\": null\n          },\n          {\n            \"type\": \"title\",\n            \"text\": \"{{ $('Generate content and Image Prompt').item.json.message.content.text_segments[3] }}\",\n            \"start\": {{ 1 + ( ($('calculate audio duration').item.json.duration_seconds / 4) * 3 ) }},\n            \"stop\": {{ $('calculate audio duration').item.json.duration_seconds + 1 }},\n            \"position\": \"center\",\n            \"zoomDirection\": null\n          }\n        ]\n      }\n    ]\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "8368485d-a6e4-4376-8f7f-b5633844dba3",
      "name": "Check JsonCut job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2032,
        -304
      ],
      "parameters": {
        "url": "=https://api.jsoncut.com/api/v1/jobs/{{ $('Create JsonCut Job').item.json.data.jobId }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "e5750b7b-8b1c-4abd-9ffe-7e474991c710",
      "name": "Generate content and Image Prompt",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -96,
        -448
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "GPT-5-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a creative video director and scriptwriter for short-form social media videos (Instagram, TikTok, YouTube Shorts).  \nYour task is to generate **cohesive and emotionally consistent content** based on a given *theme*:\n\n```\n{{ $json['Video Theme'] }}\n```\nand the *setting* (ignore if empty):\n```\n{{ $json['Video Setting'] || \"\"}}\n```\n\nUse the following Style for the background images (if not empty). Also keep the full style for each image prompt (e.g. is it a painting or photo?):\n```\n{{ $json['Image Style'] || \"\"}}\n```\n\n---\n\n### GOAL\nCreate a concept for a 20\u201340 second video with consistent **visual style, tone, and lighting**, including:\n1. **5 detailed prompts** for AI-generated background images  \n2. **1 full narration text** (to be spoken by a narrator)  \n3. **4 sequential text segments** that align perfectly with the narration (each about the same length, representing the same story flow)  \n4. **1 short caption** for a social media post promoting this video  \n\n---\n\n### IMAGE PROMPT GUIDELINES\n- Each image prompt should clearly describe the **scene**, **style**, **setting**, **mood**, **lighting**, and **color tone**.  \n- All 5 images must feel visually and emotionally consistent.  \n- Choose an appropriate general lighting mood (e.g. bright and hopeful, dark and moody, colorful and energetic, monochrome and calm).  \n- Example structure for each image prompt:  \n  *\u201cA cinematic photo of [subject/scene], [lighting type], [environment details], [emotion/feeling], [color palette/style].\u201d*  \n- Style examples: \u201ccinematic\u201d, \u201csoft focus\u201d, \u201cwarm tones\u201d, \u201cvolumetric light\u201d, \u201cdreamy atmosphere\u201d, etc.  \n\n---\n\n### TEXT CREATION GUIDELINES\n- The full text should sound natural when spoken by a narrator.  \n- It should flow smoothly and build emotional or motivational impact.  \n- The 4 text segments should represent logical parts of the full narration (e.g. setup, reflection, climax, resolution).  \n- Keep tone consistent with the image prompts (motivational, dramatic, peaceful, etc.).\n- Do not use \"-\" or \"\u2014\" (thinking / pause )\n\n---\n\n### OUTPUT FORMAT (JSON)\nReturn the result **only** as valid JSON structured like this:\n\n```json\n{\n  \"image_prompts\": [\n    \"Prompt 1\",\n    \"Prompt 2\",\n    \"Prompt 3\",\n    \"Prompt 4\",\n    \"Prompt 5\"\n  ],\n  \"full_text\": \"Complete narration text here.\",\n  \"text_segments\": [\n    \"Part 1 text\",\n    \"Part 2 text\",\n    \"Part 3 text\",\n    \"Part 4 text\"\n  ],\n  \"caption\": \"Short social media caption here.\"\n}\n```\n\nexample output:\n{\n  \"image_prompts\": [\n    \"A cinematic sunrise over misty mountains, golden light, hopeful tone, warm color palette\",\n    \"A lone runner on a foggy trail, morning light breaking through clouds, determination and focus\",\n    \"Close-up of hands tying running shoes, soft golden backlight, texture-rich realism\",\n    \"Runner pushing through rain, dramatic contrast lighting, resilience mood\",\n    \"A victorious silhouette at the mountain peak, glowing sky, triumphant energy\"\n  ],\n  \"full_text\": \"Every dream begins as a whisper. Most give up before the echo returns. But those who keep moving, step by step, turn the whisper into a roar. Keep going, your sunrise is closer than you think.\",\n  \"text_segments\": [\n    \"Every dream begins as a whisper.\",\n    \"Most give up before the echo returns.\",\n    \"But those who keep moving, step by step, turn the whisper into a roar.\",\n    \"Keep going... your sunrise is closer than you think.\"\n  ],\n  \"caption\": \"Don\u2019t stop now, your sunrise is coming. \ud83c\udf05 #motivation #dreambig\"\n}\n"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "9b178dec-c384-4706-9bb2-0ff6e20c6842",
      "name": "Upload logo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        752,
        112
      ],
      "parameters": {
        "url": "https://api.jsoncut.com/api/v1/files/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "731fba29-88e3-49be-b923-761fed1852fa",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        80
      ],
      "parameters": {
        "color": 3,
        "width": 272,
        "height": 208,
        "content": "### Download external ressources"
      },
      "typeVersion": 1
    },
    {
      "id": "4489772b-903b-429a-bedf-f56acae3d07a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -608
      ],
      "parameters": {
        "color": 3,
        "width": 752,
        "height": 432,
        "content": "### Generate Script and Background Image Prompts"
      },
      "typeVersion": 1
    },
    {
      "id": "9b384086-9370-445c-a405-be429a6e6850",
      "name": "Download Watermark",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        128
      ],
      "parameters": {
        "url": "https://img.icons8.com/?size=100&id=532&format=png&color=000000",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "35542d13-b584-439c-9b4b-793b3f026a56",
      "name": "Get List of background Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -48,
        -112
      ],
      "parameters": {
        "url": "https://api.openverse.engineering/v1/audio/",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "ambiente"
            },
            {
              "name": "license",
              "value": "cc0,by,by-sa"
            },
            {
              "name": "format",
              "value": "json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6c959a7f-82b0-4180-ac6b-a929eca0c5d2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 224,
        "content": "### download Random Background music"
      },
      "typeVersion": 1
    },
    {
      "id": "1d248ef1-3fe8-40ec-9289-b606895934a7",
      "name": "Download MP3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        -112
      ],
      "parameters": {
        "url": "={{ $json.results[Math.floor(Math.random() * $json.results.length)].url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "e5c524c4-3741-49ca-b1b6-e18d3755f16b",
      "name": "Upload Background Music",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        752,
        -112
      ],
      "parameters": {
        "url": "https://api.jsoncut.com/api/v1/files/upload",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "86c12a83-8f1e-45e3-88d9-7c34c8f24a29",
      "name": "Split Image Prompts",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        256,
        -528
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "message.content.image_prompts"
      },
      "typeVersion": 1
    },
    {
      "id": "87c26b9e-1553-4ed4-973d-a81b11a3a519",
      "name": "Generate an image",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        464,
        -528
      ],
      "parameters": {
        "prompt": "=Generate in the format 9:16 (no text in image): {{ $json['message.content.image_prompts'] }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/imagen-4.0-generate-001",
          "cachedResultName": "models/imagen-4.0-generate-001"
        },
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a5d687a8-bc65-4bac-915d-deccdc2c8098",
      "name": "Generate audio",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        256,
        -336
      ],
      "parameters": {
        "input": "={{ $json.message.content.full_text }}",
        "voice": "echo",
        "options": {},
        "resource": "audio"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "5f471cee-9b78-4cb0-8711-dfcbb4897d01",
      "name": "Upload Background Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        752,
        -528
      ],
      "parameters": {
        "url": "https://api.jsoncut.com/api/v1/files/upload",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4c4efcd6-0224-4003-85b6-3269359085df",
      "name": "Upload Voice Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        752,
        -320
      ],
      "parameters": {
        "url": "https://api.jsoncut.com/api/v1/files/upload",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          },
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bd711a93-ab0c-4dba-bdf2-d149030decdb",
      "name": "Background Image Urls",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        976,
        -528
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "data.storageUrl"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fa3bd8e1-a251-4fa0-a2f8-6c6ec83801b2",
      "name": "Merge all uploads",
      "type": "n8n-nodes-base.merge",
      "position": [
        1232,
        -336
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.2
    },
    {
      "id": "4f0167a3-e215-4524-b606-7e70835796da",
      "name": "calculate audio duration",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        -336
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "language": "python",
        "pythonCode": "import base64\n\n# Get binary MP3 data from the input item\nbinary_data = _input.item.binary['data']\nbuffer = base64.b64decode(binary_data['data'])\n\ndef get_bitrate(bitrate_index, version, layer):\n    bitrates = {\n        'V1L3': [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320],\n        'V2L3': [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160],\n    }\n    table = bitrates['V1L3'] if version == 3 else bitrates['V2L3']\n    return table[bitrate_index] * 1000\n\nbitrate = 0\nfile_size = len(buffer)\n\n# Scan for first MP3 frame header (starts with 0xFFE)\nfor i in range(len(buffer) - 4):\n    if buffer[i] == 0xFF and (buffer[i + 1] & 0xE0) == 0xE0:\n        version_bits = (buffer[i + 1] >> 3) & 0x03\n        layer_bits = (buffer[i + 1] >> 1) & 0x03\n        bitrate_index = (buffer[i + 2] >> 4) & 0x0F\n\n        version = 3 if version_bits == 3 else 2\n        layer = 3 - (layer_bits - 1)\n\n        bitrate = get_bitrate(bitrate_index, version, layer)\n        if bitrate > 0:\n            break\n\nif bitrate == 0:\n    _input.item.json['duration_seconds'] = None\n    _input.item.json['error'] = 'Could not detect bitrate'\n    return _input.item\n\n# Calculate duration: file size (bits) / bitrate\nduration_seconds = (file_size * 8) / bitrate\n\n# Write results into JSON\n_input.item.json['duration_seconds'] = round(duration_seconds, 2)\n_input.item.json['duration_minutes'] = round(duration_seconds / 60, 2)\n_input.item.json['bitrate'] = bitrate\n_input.item.json['file_size_bytes'] = file_size\n\nreturn _input.item\n"
      },
      "typeVersion": 2
    },
    {
      "id": "efd1bde6-0c7e-41df-80ec-de2e7b80bfb4",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -384,
        -272
      ],
      "parameters": {
        "options": {},
        "formTitle": "Social Video Production Input",
        "formFields": {
          "values": [
            {
              "fieldType": "textarea",
              "fieldLabel": "Video Theme",
              "placeholder": "Enter the main theme or motto for your video (e.g., \u2018Embrace the small wins\u2019 for a motivational video).",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Video Setting",
              "placeholder": "Describe the setting or mood of the video (e.g., a calm, cozy evening with soft lighting for a relaxed, reflective feel).",
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Image Style",
              "placeholder": "Optional: Define the style of the background images (e.g. Watercolor Painting)"
            }
          ]
        },
        "formDescription": "Provide the core idea and the setting for your video. These details will guide the generation of a polished, ready-to-publish social media video."
      },
      "typeVersion": 2.2
    },
    {
      "id": "01a424d4-17f9-4d47-8921-d231c3f1d7f3",
      "name": "Save Video in NocoDB",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        2688,
        -320
      ],
      "parameters": {
        "table": "mu9r5htgfwxolb2",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldName": "Theme",
              "fieldValue": "={{ $('On form submission').item.json['Video Theme'] }}"
            },
            {
              "fieldName": "Setting",
              "fieldValue": "={{ $('On form submission').item.json['Video Setting'] || \"\" }}"
            },
            {
              "fieldName": "Style",
              "fieldValue": "={{ $('On form submission').item.json['Image Style'] || \"\" }}"
            },
            {
              "fieldName": "Output",
              "binaryData": true,
              "binaryProperty": "data"
            }
          ]
        },
        "operation": "create",
        "projectId": "prcn8tlyu7dbn60",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "d341edf1-f747-43c5-8192-56900d04da04",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -528
      ],
      "parameters": {
        "color": 6,
        "width": 560,
        "height": 416,
        "content": "## Exmpe Form Input\n\n1. General Video Theme:\nOvercoming struggles / personal growth\n\n2. Video Setting:\nIntrospective, deep thinking, sunrise or twilight moments, emotional reflection\n\n3. Background Image Style: \nWatercolor painting with muted colors, low light"
      },
      "typeVersion": 1
    },
    {
      "id": "763a2957-3e11-4f38-872e-ed58b84a9378",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        -576
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 464,
        "content": "## Stores the final output in a new Table Row\n\n### Row Content:\n1. Theme\n2. Setting\n3. Style\n4. Output Video File"
      },
      "typeVersion": 1
    },
    {
      "id": "5be95991-a680-4363-8f1b-7e0b1c7a18a1",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        -80
      ],
      "parameters": {
        "color": 6,
        "width": 480,
        "height": 128,
        "content": "## Example Output\n\n[\ud83d\udcf9 View Video (Google Drive)](https://drive.google.com/file/d/1Cl0KwgRgcuBPVdGgL-nqAcheyvfVXttD/preview)\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "826504f6-36f9-4c5b-83d8-1a1f30d8f248",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Check JsonCut job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Error": {
      "main": [
        [
          {
            "node": "Error Stop",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Create JsonCut Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Success": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload logo": {
      "main": [
        [
          {
            "node": "Merge all uploads",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Download MP3": {
      "main": [
        [
          {
            "node": "Upload Background Music",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Save Video in NocoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate audio": {
      "main": [
        [
          {
            "node": "calculate audio duration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image": {
      "main": [
        [
          {
            "node": "Upload Background Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge all uploads": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JsonCut Job": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Watermark": {
      "main": [
        [
          {
            "node": "Upload logo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Generate content and Image Prompt",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get List of background Audio",
            "type": "main",
            "index": 0
          },
          {
            "node": "Download Watermark",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Voice Audio": {
      "main": [
        [
          {
            "node": "Merge all uploads",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Image Prompts": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Video in NocoDB": {
      "main": [
        []
      ]
    },
    "Background Image Urls": {
      "main": [
        [
          {
            "node": "Merge all uploads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Background Music": {
      "main": [
        [
          {
            "node": "Merge all uploads",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Check JsonCut job Status": {
      "main": [
        [
          {
            "node": "If Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Background Images": {
      "main": [
        [
          {
            "node": "Background Image Urls",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "calculate audio duration": {
      "main": [
        [
          {
            "node": "Upload Voice Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get List of background Audio": {
      "main": [
        [
          {
            "node": "Download MP3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate content and Image Prompt": {
      "main": [
        [
          {
            "node": "Split Image Prompts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

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

[](https://drive.google.com/file/d/1Cl0KwgRgcuBPVdGgL-nqAcheyvfVXttD/view) Click on the image to see the Example output in google drive

Source: https://n8n.io/workflows/9687/ — 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

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP

Form Trigger, Google Sheets Trigger, OpenAI +2
AI & RAG

This comprehensive automation flow helps you scale your outreach to potential customers through intelligent personalized email campaigns. The system combines web scraping, AI-powered lead scoring, and

Noco Db, HTTP Request, OpenAI +2
AI & RAG

This system automates LinkedIn lead generation and enrichment in six clear stages: Lead Collection (via Apollo.io) Automatically pulls leads based on keywords, roles, or industries using Apollo’s API.

Form Trigger, OpenAI, Google Sheets Trigger +2
AI & RAG

The AI-Powered Cold Call Machine is a fully automated workflow designed to generate qualified leads from LinkedIn, evaluate them using AI-based scoring, identify key decision-makers, and generate pers

HTTP Request, Google Sheets, OpenAI +1
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Airtable, OpenAI, Form Trigger +3