From 57794c68120050a59b0e449f5556d64d2bc425f1 Mon Sep 17 00:00:00 2001 From: nusquama Date: Wed, 12 Nov 2025 12:58:30 +0100 Subject: [PATCH] creation --- ...e_chaining_ai-generated_video_scene_extensions_with_veo3.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 workflows/Narrative Chaining: AI-Generated Video Scene Extensions with Veo3-9145/narrative_chaining_ai-generated_video_scene_extensions_with_veo3.json diff --git a/workflows/Narrative Chaining: AI-Generated Video Scene Extensions with Veo3-9145/narrative_chaining_ai-generated_video_scene_extensions_with_veo3.json b/workflows/Narrative Chaining: AI-Generated Video Scene Extensions with Veo3-9145/narrative_chaining_ai-generated_video_scene_extensions_with_veo3.json new file mode 100644 index 000000000..1904ecc4c --- /dev/null +++ b/workflows/Narrative Chaining: AI-Generated Video Scene Extensions with Veo3-9145/narrative_chaining_ai-generated_video_scene_extensions_with_veo3.json @@ -0,0 +1 @@ +{"id":"A68ar0oBwWltbmI3","meta":{"instanceId":"968a3c2b30cb09cf0a66d24d68a6bc678e7409c798216c0e83a441f6a1d3b91b","templateCredsSetupCompleted":true},"name":"Narrative Chaining with Veo3 fast โœ…","tags":[],"nodes":[{"id":"3318859a-d325-48d9-83b1-57ee0e31ca9e","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[1456,304],"parameters":{"color":7,"width":496,"height":96,"content":"## Step 3: Get last frame "},"typeVersion":1},{"id":"624a13a0-ce0c-4f99-beeb-fb3ad3e68057","name":"Sticky Note12","type":"n8n-nodes-base.stickyNote","position":[1456,48],"parameters":{"color":7,"width":368,"height":96,"content":"## Step 1: Analyze preceding vid"},"typeVersion":1},{"id":"e0f237a9-6710-413d-a336-60b76b7c811e","name":"Think","type":"@n8n/n8n-nodes-langchain.toolThink","position":[832,576],"parameters":{},"typeVersion":1},{"id":"5743a029-2738-4604-8928-da1018f11e80","name":"GPT","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[736,576],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1","cachedResultName":"gpt-4.1"},"options":{}},"credentials":{"openAiApi":{"id":"kc8YMi5B68zGPUZQ","name":"OpenAi account 2"}},"typeVersion":1.2},{"id":"22cff697-4951-4ebf-b365-2d7276a80454","name":"Sticky Note14","type":"n8n-nodes-base.stickyNote","position":[1408,176],"parameters":{"color":7,"width":480,"height":96,"content":"## Step 2: Make next prompt "},"typeVersion":1},{"id":"48d024ef-92e1-4edc-9d84-aef29817216c","name":"Analyze Video","type":"n8n-nodes-base.httpRequest","position":[1120,48],"parameters":{"url":"https://queue.fal.run/fal-ai/video-understanding","method":"POST","options":{},"jsonBody":"={\n \"video_url\": \"{{ $json.mediaURL }}\",\n \"prompt\": \"What is happening in this video? At the very top, include a Heading 1 Section describing what happens at the last frame of the video. Make sure to describe the music, the camera being used, the camera movement, the dialogue if any, what their accent is, and a description of the characters. \",\n \"detailed_analysis\": true\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"aa56c538-4d6f-4567-bf8e-9247c7019b25","name":"Get Analysis","type":"n8n-nodes-base.httpRequest","position":[1344,48],"parameters":{"url":"={{ $json.response_url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"9c32b6be-05eb-48a9-968d-f673319a1f35","name":"Looper","type":"n8n-nodes-base.set","position":[736,48],"parameters":{"options":{},"assignments":{"assignments":[{"id":"845af529-04e4-4a77-ad42-c2a3025148da","name":"step","type":"number","value":"={{ $json.step }}"},{"id":"e1c5b7af-8520-45c6-a1e7-da832f711b0f","name":"complete","type":"number","value":"={{ $json.complete }}"},{"id":"f4f5df61-7c8b-4813-a52b-3a22e69c0dda","name":"mediaURL","type":"string","value":"={{ $json.videoURL }}"}]}},"typeVersion":3.4},{"id":"54b5193b-cec6-419a-a204-231216ae30e6","name":"If ","type":"n8n-nodes-base.if","position":[1456,432],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4c895d90-e8bd-42cf-ab58-511c85e8c782","operator":{"type":"number","operation":"equals"},"leftValue":"={{ $json.data.successFlag }}","rightValue":1}]}},"typeVersion":2.2},{"id":"329b7b4d-695e-4738-b0ce-da111db8d412","name":"Sticky Note15","type":"n8n-nodes-base.stickyNote","position":[1584,432],"parameters":{"color":3,"width":432,"height":96,"content":"## Step 4: Generate next scene "},"typeVersion":1},{"id":"9bd6af1d-e54a-4165-bd16-30a980e06ef6","name":"Sticky Note16","type":"n8n-nodes-base.stickyNote","position":[1584,560],"parameters":{"color":7,"width":496,"height":96,"content":"## Step 5: Add scene & increment step "},"typeVersion":1},{"id":"d110f12c-db72-4d81-a576-f0cf68557e80","name":"Combine Clips","type":"n8n-nodes-base.httpRequest","position":[1840,656],"parameters":{"url":"https://queue.fal.run/fal-ai/ffmpeg-api/merge-videos","method":"POST","options":{},"jsonBody":"={\n \"video_urls\": [\"{{ $('Initial Values').item.json.videoURL }}\",{{ $json.sceneURL.map(url => `\"${url}\"`) }}]\n}\n","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"f5d56aff-6620-46e2-9773-a72dc2c6c414","name":"Get Final Video","type":"n8n-nodes-base.httpRequest","position":[2064,656],"parameters":{"url":"={{ $('Combine Clips').first().json.response_url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"cf26da03-b95a-40a9-a40e-0e930f708370","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[1728,656],"parameters":{"options":{},"fieldsToAggregate":{"fieldToAggregate":[{"fieldToAggregate":"sceneURL"}]}},"typeVersion":1},{"id":"cd97d8fc-6f46-4f4a-a20e-00def5dc01d1","name":"Get input","type":"n8n-nodes-base.googleSheets","position":[304,48],"parameters":{"options":{},"filtersUI":{"values":[{"lookupValue":"for production","lookupColumn":"status"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit?usp=drivesdk","cachedResultName":"Copy of [Template] Veo3 - Narrative Chaining by RoboNuggets"}},"credentials":{"googleSheetsOAuth2Api":{"id":"QAjXHWGg9aLQ9IOb","name":"Google Sheets account 3"}},"typeVersion":4.7},{"id":"30479907-33a4-40e5-bad6-0cc48d8f9532","name":"Initial Values","type":"n8n-nodes-base.set","position":[528,48],"parameters":{"options":{},"assignments":{"assignments":[{"id":"845af529-04e4-4a77-ad42-c2a3025148da","name":"step","type":"number","value":"=1"},{"id":"e1c5b7af-8520-45c6-a1e7-da832f711b0f","name":"complete","type":"number","value":"={{ $json['clips to add'] }}"},{"id":"f4f5df61-7c8b-4813-a52b-3a22e69c0dda","name":"videoURL","type":"string","value":"={{ $json.videoURL }}"}]}},"typeVersion":3.4},{"id":"885aa3d0-807d-47e9-81b5-fd8f74442693","name":"Request last","type":"n8n-nodes-base.httpRequest","position":[1120,304],"parameters":{"url":"https://queue.fal.run/fal-ai/ffmpeg-api/extract-frame","method":"POST","options":{},"jsonBody":"={\n \"video_url\": \"{{ $('Looper').item.json.mediaURL }}\",\n \"frame_type\": \"last\"\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"7cb35806-fe25-4c6f-96bc-a07fd7c7f1f4","name":"Get last","type":"n8n-nodes-base.httpRequest","position":[1344,304],"parameters":{"url":"={{ $json.response_url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"YNGfdvlUgXAdpYmm","name":"fal.ai"}},"typeVersion":4.2},{"id":"18296134-a54a-440b-8847-872822220d95","name":"Get Video","type":"n8n-nodes-base.httpRequest","position":[1344,432],"parameters":{"url":"=https://api.kie.ai/api/v1/veo/record-info","options":{},"sendQuery":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","queryParameters":{"parameters":[{"name":"taskId","value":"={{ $('Create Video').item.json.data.taskId }}"}]}},"credentials":{"httpHeaderAuth":{"id":"JVHkxczNxnf3q6PE","name":"Kie.ai"}},"typeVersion":4.2},{"id":"65a60a8c-5fb2-4a01-b782-b5d2328c6a15","name":"Create Video","type":"n8n-nodes-base.httpRequest","position":[1120,432],"parameters":{"url":"https://api.kie.ai/api/v1/veo/generate","body":"={\n \"prompt\":\"{{ $('ExtendRobo AI Agent').item.json.output.video_prompt.replace(/\\n/g, '\\\\n').replace(/\"/g, '\\\\\"') }}\",\n \"model\": \"{{ $('ExtendRobo AI Agent').item.json.output.model }}\",\n \"aspectRatio\": \"{{ $('ExtendRobo AI Agent').item.json.output.aspect_ratio_video }}\",\n \"imageUrls\": \"{{ $json.images[0].url }}\"\n}\n","method":"POST","options":{},"sendBody":true,"contentType":"raw","authentication":"genericCredentialType","rawContentType":"application/json","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"JVHkxczNxnf3q6PE","name":"Kie.ai"}},"typeVersion":4.2},{"id":"b04e2a3a-365a-41d6-ac63-4843bb2b4272","name":"Add scene","type":"n8n-nodes-base.googleSheets","position":[1232,560],"parameters":{"columns":{"value":{"scene":"={{ $('Looper').item.json.step }}","prompt":"={{ $('ExtendRobo AI Agent').item.json.output.video_prompt }}","sceneURL":"={{ $json.data.response.resultUrls[0] }}","row_number":0},"schema":[{"id":"scene","type":"string","display":true,"removed":false,"required":false,"displayName":"scene","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt","defaultMatch":false,"canBeUsedToMatch":true},{"id":"sceneURL","type":"string","display":true,"removed":false,"required":false,"displayName":"sceneURL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"number","display":true,"removed":false,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["scene"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":423194450,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1x65wzvPcZAahQsegZ8h99Qh3boI5xRNymx-gtlE9QEU/edit#gid=423194450","cachedResultName":"Sheet2"},"documentId":{"__rl":true,"mode":"list","value":"1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit?usp=drivesdk","cachedResultName":"Copy of [Template] Veo3 - Narrative Chaining by RoboNuggets"}},"credentials":{"googleSheetsOAuth2Api":{"id":"QAjXHWGg9aLQ9IOb","name":"Google Sheets account 3"}},"typeVersion":4.6},{"id":"244af354-5da7-4093-85f1-c0fa389fcc3f","name":"Increment step","type":"n8n-nodes-base.set","position":[1344,560],"parameters":{"options":{},"assignments":{"assignments":[{"id":"845af529-04e4-4a77-ad42-c2a3025148da","name":"step","type":"number","value":"={{ $('Looper').first().json.step + 1}}"},{"id":"e1c5b7af-8520-45c6-a1e7-da832f711b0f","name":"complete","type":"number","value":"={{ $('Looper').first().json.complete }}"},{"id":"7486f15a-a92c-46c1-a77f-375c970e3c77","name":"videoURL","type":"string","value":"={{ $json.sceneURL }}"}]}},"typeVersion":3.4},{"id":"1cf3a44f-0a82-4373-8255-3c281a1554a7","name":"If complete","type":"n8n-nodes-base.if","position":[1456,560],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"a4b84c6a-c477-4929-a527-c70201b829d4","operator":{"type":"number","operation":"lt"},"leftValue":"={{ $json.complete }}","rightValue":"={{ $json.step }}"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"b8826c38-ccfd-4257-9927-fd876fd24a4d","name":"ExtendRobo AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[1168,176],"parameters":{"text":"=Your task: Create a video prompt as guided by your system guidelines.\n\nYou are about to create the video prompt for Scene {{ $('Looper').first().json.step }}, out of a total of {{ $('Looper').first().json.complete }} scenes\n\n\n***\nThe user's preferred narrative theme (if any): {{ $('Get input').first().json['narrative theme'] }}\n\nThe user's preferred aspect ratio: {{ $('Get input').first().json['aspect ratio'] }}\n\nThe user's preferred model: {{ $('Get input').first().json.model }}\n\nAny special requests by the user: {{ $('Get input').first().json['any special requests'] }}\n\n***\nUse the Think tool to double check your output\n\n\n***\n\n\nHere's what happens in the preceding video \n{{ $json.output }}\n\n","options":{"systemMessage":"=system_prompt: |\n ## SYSTEM PROMPT: Scene Continuation Prompt Generator (Video-Only, General Use)\n\n You are a scene continuation AI agent. \n Your task: Take the preceding video description and generate the scene, following user intent, style, and narrative progression. Make sure to generate the prompt with the ending seconds of the previous scene in mind.\n\n A โ€“ Ask:\n Generate **only video generation instructions** for AI models (no image prompts). Infer aspect ratios from vertical/horizontal context; default to vertical if unspecified.\n\n\n G โ€“ Guidance:\n\n - Make sure you consider consistency with the music style, camera, camera movement, and other elements from the previous scene when generating the prompt\n - If the user describes what happens per scene, make sure you just follow the instructions specific to this scene you are ideating for\n - Focus the prompt to consider what happens in the very last frame as described in the video\n - Always define the type of camera being used (example: Canon EOS, Gopro, iphone). and camera movement (be consistent with previous scene)\n - The actions defined in the scene are always simple. Avoid overly complex action prompts. Max of 250 characters for the action.\n - ALways describe the music if preceding scene has music\n - ALways describe the dialogue if preceding scene has dialogue (make sure accent of person is the same)\n - The video prompt is ALWAYS in stringified YAML format. Suggest the element parameters based on the user request\n - Avoid mentioning any copyrighted character, persons, or brands in the prompt. Just describe them if needed\n - Avoid terms in the prompt that may trigger a content policy flag. Like child, childlike, minor, young person, girl, boy, 14 year old, and so on. Instead of using those terms, just say \"character\".\n - Avoid including prompts with text overlays or subtitles. \n - Align each new scene with the progression of the previous video.\n - Follow any user-supplied dialogue, action requests, or performance details.\n - Use consistent characters, camera style, and tone when applicable.\n - Never use double quotes in prompts.\n\"notes\": [\n \"- Aspect ratio can only be 9:16 or 16:9\",\n \"- Model can only be veo3_fast or veo3\"\n\n E โ€“ Examples:\n ๐ŸŸข good_examples:\n - |\n {\n \"scenes\": [\n {\n \"video_prompt\": \"prompt in yaml format based on previous video and user request\",\n \"aspect_ratio_video\": \"[choose: 9:16, 16:9]\",\n \"model\": \"[choose: veo3_fast, veo3]\"\n }\n ]\n}\n\n\n N โ€“ Notation:\n format: JSON\n example_output: |\n {\n \"scenes\": [\n {\n \"video_prompt\": \"dialogue: [text]\\naction: [text]\\ncamera: [text]\\nemotion: [text]\\ntype: [model]\",\n \"aspect_ratio_video\": \"9:16\",\n \"model\": \"veo3_fast\"\n }\n ]\n }\n\n T โ€“ Tools:\n - Think Tool: Use this to check continuity from the previous scene, alignment with user intent, realism or stylization as needed, and that the output count matches exactly.\n"},"promptType":"define","hasOutputParser":true},"typeVersion":2},{"id":"6115c7da-9a1f-405e-af28-a6f8411295ef","name":"Wait 2","type":"n8n-nodes-base.wait","position":[1232,432],"webhookId":"cf23022b-1ab8-42a0-aa2e-e1ad33b4aeb6","parameters":{"amount":60},"typeVersion":1.1},{"id":"3b70e12c-e77b-4402-9571-c64a67e26bc2","name":"Wait 1","type":"n8n-nodes-base.wait","position":[1232,304],"webhookId":"0c593731-cba8-4727-ada7-c1994b8b241f","parameters":{"amount":30},"typeVersion":1.1},{"id":"d4c593f2-12af-4ad5-a625-43f5fc14294b","name":"Wait ","type":"n8n-nodes-base.wait","position":[1232,48],"webhookId":"0c593731-cba8-4727-ada7-c1994b8b241f","parameters":{"amount":60},"typeVersion":1.1},{"id":"2a476a33-9514-4122-9833-70ad865086c5","name":"Get scenes","type":"n8n-nodes-base.googleSheets","position":[1616,656],"parameters":{"options":{"dataLocationOnSheet":{"values":{"range":"C:C","rangeDefinition":"specifyRangeA1"}}},"sheetName":{"__rl":true,"mode":"list","value":423194450,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit#gid=423194450","cachedResultName":"Sheet2"},"documentId":{"__rl":true,"mode":"list","value":"1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit?usp=drivesdk","cachedResultName":"Copy of [Template] Veo3 - Narrative Chaining by RoboNuggets"}},"credentials":{"googleSheetsOAuth2Api":{"id":"QAjXHWGg9aLQ9IOb","name":"Google Sheets account 3"}},"typeVersion":4.7},{"id":"b838eda5-8848-4974-9a4c-b19d2af69eb7","name":"Wait 3","type":"n8n-nodes-base.wait","position":[1952,656],"webhookId":"16d20188-f627-47eb-88d2-383ddc68b0c2","parameters":{"amount":60},"typeVersion":1.1},{"id":"7e850ef2-14ce-473f-a595-6d12f55656f9","name":"Update log","type":"n8n-nodes-base.googleSheets","position":[2176,656],"parameters":{"columns":{"value":{"id":"={{ $('Get input').item.json.id }}","status":"done","outputURL":"={{ $json.video.url }}","row_number":0},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"videoURL","type":"string","display":true,"removed":false,"required":false,"displayName":"videoURL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"clips to add","type":"string","display":true,"removed":false,"required":false,"displayName":"clips to add","defaultMatch":false,"canBeUsedToMatch":true},{"id":"aspect ratio","type":"string","display":true,"removed":false,"required":false,"displayName":"aspect ratio","defaultMatch":false,"canBeUsedToMatch":true},{"id":"narrative theme","type":"string","display":true,"removed":false,"required":false,"displayName":"narrative theme","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model","type":"string","display":true,"removed":false,"required":false,"displayName":"model","defaultMatch":false,"canBeUsedToMatch":true},{"id":"any special requests","type":"string","display":true,"removed":false,"required":false,"displayName":"any special requests","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":false,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true},{"id":"outputURL","type":"string","display":true,"removed":false,"required":false,"displayName":"outputURL","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"number","display":true,"removed":false,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1x65wzvPcZAahQsegZ8h99Qh3boI5xRNymx-gtlE9QEU/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit?usp=drivesdk","cachedResultName":"Copy of [Template] Veo3 - Narrative Chaining by RoboNuggets"}},"credentials":{"googleSheetsOAuth2Api":{"id":"QAjXHWGg9aLQ9IOb","name":"Google Sheets account 3"}},"typeVersion":4.7},{"id":"e64a05ad-90ea-4bf3-803c-19c69c1ce5ec","name":"Structured Output","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[928,576],"parameters":{"autoFix":true,"jsonSchemaExample":"{\n \"video_prompt\": \"detailed stringified YAML prompt here\",\n \"aspect_ratio_video\": \"9:16\",\n \"model\": \"veo3_fast\"\n}\n"},"typeVersion":1.3},{"id":"9e804535-6887-416d-b035-b15dd6318004","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[160,-96],"parameters":{"color":4,"width":1776,"height":176,"content":"# - Veo3 Narrative Chaining \n"},"typeVersion":1},{"id":"fee1229e-65f6-4e5f-9b17-9b525c659eb7","name":"Execute","type":"n8n-nodes-base.manualTrigger","position":[160,48],"parameters":{},"typeVersion":1},{"id":"092668d1-5aed-4366-bd7f-b44cf6aaf417","name":"Clear scenes","type":"n8n-nodes-base.googleSheets","position":[416,48],"parameters":{"clear":"specificRange","range":"B2:C20","operation":"clear","sheetName":{"__rl":true,"mode":"list","value":423194450,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit#gid=423194450","cachedResultName":"Sheet2"},"documentId":{"__rl":true,"mode":"list","value":"1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1tNGBG0fTJWynnmiNN_uu1mt1l47HiVhE1CR3Z3_Zt34/edit?usp=drivesdk","cachedResultName":"Copy of [Template] Veo3 - Narrative Chaining by RoboNuggets"}},"credentials":{"googleSheetsOAuth2Api":{"id":"QAjXHWGg9aLQ9IOb","name":"Google Sheets account 3"}},"typeVersion":4.7},{"id":"e51a5c61-d9d9-4e0a-9009-7d29f1518131","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-432,-96],"parameters":{"width":528,"height":1392,"content":"Structured Setup Guide: Narrative Chaining with N8N + AI\n\n1. Input Setup\nUse a Google Sheet as the control panel.\nFields required:\nVideo URL (starting clip, ends with .mp4)\nNumber of clips to extend (e.g., 2 extra scenes)\nAspect ratio (horizontal, vertical, etc.)\nModel (V3 or V3 Fast)\nNarrative theme (guidance for story flow)\nSpecial requests (scene-by-scene instructions)\nStatus column (e.g., \"For Production\", \"Done\")\n๐Ÿ‘‰ Example scene inputs:\nScene 1: Naruto walks out with ramen is his hands\nScene 2: Joker joins with chips\n2. Workflow in N8N\nStep 1: Fetch Input\nGet rows in sheet โ†’ fetch the next row where status = For Production.\nClear sheet 2 โ†’ reset the sheet that stores generated scenes.\nEdit fields (Initial Values):\nVideo URL = starting clip\nStep = 1\nComplete = total number of scenes requested\nStep 2: Looping Logic\nLooper Node:\nRuns until step = complete.\nCarries over current video URL โ†’ feeds into next generation.\nStep 3: Analyze Current Clip\nSend video URL to File.AI Video Understanding API.\nRequest: Describe last frame + audio + scene details.\nOutput: Detailed video analysis text.\nStep 4: Generate Prompt\nAI Agent creates the next scene prompt using:\nContext from video analysis\nNarrative theme (from sheet)\nScene instructions (from sheet)\nAspect ratio, model preference, etc.\n๐Ÿ‘‰ Output = video prompt for next scene\nStep 5: Extract Last Frame\nCall File.AI Extract Frame API.\nParameters:\nInput video URL\nFrame = last\nOutput = JPG image (last frame of current clip).\nStep 6: Generate New Scene\nUse Key.AI (V3 Fast) for economical video generation.\nPOST request includes:\nPrompt (from AI Agent)\nAspect ratio + model\nImage URL (last frame) โ†’ ensures seamless chaining\nWait for generation to complete.\n๐Ÿ‘‰ Output = New clip URL (MP4)\nStep 7: Store & Increment\nLog new clip URL into Sheet 2.\nIncrement Step by +1.\nReplace Video URL with the new clip.\nLoop back if Step < Complete.\n3. Output Section\nOnce all clips are generated:\nGather all scene URLs from Sheet 2.\nUse File.AI Merge Videos API to stitch clips together:\nOriginal clip + all generated scenes.\nSave final MP4 output.\nUpdate Sheet 1 row with:\nFinal video URL\nStatus = Done\n4. Costs\nVideo analysis: ~$0.015 per 8s clip\nFrame extraction: ~0.002ยข (almost free)\nClip merging: negligible (via ffmpeg backend)\nV3 Fast video generation (Key.AI): ~$0.30 per 8s clip\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ff67c217-97a8-44e0-a091-a4c60cc6fb47","connections":{"GPT":{"ai_languageModel":[[{"node":"ExtendRobo AI Agent","type":"ai_languageModel","index":0},{"node":"Structured Output","type":"ai_languageModel","index":0}]]},"If ":{"main":[[{"node":"Add scene","type":"main","index":0}],[{"node":"Wait 2","type":"main","index":0}]]},"Think":{"ai_tool":[[{"node":"ExtendRobo AI Agent","type":"ai_tool","index":0}]]},"Wait ":{"main":[[{"node":"Get Analysis","type":"main","index":0}]]},"Looper":{"main":[[{"node":"Analyze Video","type":"main","index":0}]]},"Wait 1":{"main":[[{"node":"Get last","type":"main","index":0}]]},"Wait 2":{"main":[[{"node":"Get Video","type":"main","index":0}]]},"Wait 3":{"main":[[{"node":"Get Final Video","type":"main","index":0}]]},"Execute":{"main":[[{"node":"Get input","type":"main","index":0}]]},"Get last":{"main":[[{"node":"Create Video","type":"main","index":0}]]},"Add scene":{"main":[[{"node":"Increment step","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"Combine Clips","type":"main","index":0}]]},"Get Video":{"main":[[{"node":"If ","type":"main","index":0}]]},"Get input":{"main":[[{"node":"Clear scenes","type":"main","index":0}]]},"Get scenes":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"If complete":{"main":[[{"node":"Get scenes","type":"main","index":0}],[{"node":"Looper","type":"main","index":0}]]},"Clear scenes":{"main":[[{"node":"Initial Values","type":"main","index":0}]]},"Create Video":{"main":[[{"node":"Wait 2","type":"main","index":0}]]},"Get Analysis":{"main":[[{"node":"ExtendRobo AI Agent","type":"main","index":0}]]},"Request last":{"main":[[{"node":"Wait 1","type":"main","index":0}]]},"Analyze Video":{"main":[[{"node":"Wait ","type":"main","index":0}]]},"Combine Clips":{"main":[[{"node":"Wait 3","type":"main","index":0}]]},"Increment step":{"main":[[{"node":"If complete","type":"main","index":0}]]},"Initial Values":{"main":[[{"node":"Looper","type":"main","index":0}]]},"Get Final Video":{"main":[[{"node":"Update log","type":"main","index":0}]]},"Structured Output":{"ai_outputParser":[[{"node":"ExtendRobo AI Agent","type":"ai_outputParser","index":0}]]},"ExtendRobo AI Agent":{"main":[[{"node":"Request last","type":"main","index":0}]]}}} \ No newline at end of file