AutomationFlowsAI & RAG › Create Video Ad Clones with Nanobanana, Kling & Airtable

Create Video Ad Clones with Nanobanana, Kling & Airtable

Original n8n title: Create Automated Video Ad Clones with Nanobanana, Kling, Airtable and Blotato

ByDr. Firas @drfiras on n8n.io

📄 Documentation: Notion Guide

Event trigger★★★★★ complexityAI-powered59 nodesAirtableAgentOpenAI ChatOutput Parser StructuredGoogle GeminiHTTP Request@Blotato/N8N Nodes Blotato
AI & RAG Trigger: Event Nodes: 59 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Agent → Airtable 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": "QcnXDa3aRYDdQxDN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "\ud83d\udca5 Clone Video Ads Factory using NanoBanana, Kling and Publish with Blotato",
  "tags": [],
  "nodes": [
    {
      "id": "0f7bcb5d-3e15-47b6-a743-fc7c013a0bc7",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -5648,
        560
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5e12b2a6-53e2-4ed3-b22c-855b8946480c",
      "name": "Setup Workflow",
      "type": "n8n-nodes-base.set",
      "position": [
        -5424,
        560
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "maxScenes",
              "type": "number",
              "value": 3
            },
            {
              "id": "id-2",
              "name": "musicStyle",
              "type": "string",
              "value": ""
            },
            {
              "id": "id-3",
              "name": "language",
              "type": "string",
              "value": "en"
            },
            {
              "id": "id-4",
              "name": "airtableBaseId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Base ID__>"
            },
            {
              "id": "b3d3b1e3-3456-4dd3-bfae-1c4583f08eba",
              "name": "airtableTableId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table ID__>"
            },
            {
              "id": "id-5",
              "name": "airtableTableName",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table Name__>"
            },
            {
              "id": "id-6",
              "name": "statusField",
              "type": "string",
              "value": "status"
            },
            {
              "id": "id-7",
              "name": "statusValue",
              "type": "string",
              "value": "Todo"
            },
            {
              "id": "id-8",
              "name": "videoUrlField",
              "type": "string",
              "value": "video"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "cf791d65-aff9-4602-8062-e478a6f8f26a",
      "name": "Search Airtable for Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -5200,
        560
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').item.json.airtableBaseId }}"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').item.json.airtableTableName }}"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "={{ '{' + $('Setup Workflow').item.json.statusField + '}=\"' + $('Setup Workflow').item.json.statusValue + '\"' }}"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "17573595-e1c8-43ea-a4ec-1e7d49e42f0c",
      "name": "Check if Record Found",
      "type": "n8n-nodes-base.if",
      "position": [
        -4976,
        560
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "exists"
              },
              "leftValue": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "b719ca52-e281-47cb-8bbb-ce1682076225",
      "name": "Generate Creative Assets JSON",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -4208,
        560
      ],
      "parameters": {
        "text": "=Generate creative production prompts based on this video.\n\nThe full video analysis is:\n{{ $json.content.parts[0].text }}\n\n***\n\nThe user request for this project is:\n{{ $('Search Airtable for Record').item.json['My Description'] }}\n\n***\n\nThe reference images provided by the user are:\n\nAvatar image:\n{{ $('Search Airtable for Record').item.json['Avatar Image'][0].url }}\n\nProduct image:\n{{ $('Search Airtable for Record').item.json['Product Image'][0].url }}\n\n(Note: if a field is blank, it means no reference image was provided)\n\n***\n\nYour task is to generate **structured, high-quality AI prompts** for content creation, including:\n\n- One music generation prompt  \n- One global video title  \n- One global video caption  \n- Scene titles for each scene  \n- Image generation prompts for each scene  \n- Video generation prompts for each scene  \n\nAll outputs must be:\n- Cinematic  \n- Visually coherent  \n- Consistent with the video analysis  \n- Aligned with the user request  \n- Visually consistent with the avatar and product reference images  \n- High-quality  \n- Production-ready  \n- Optimized for AI generation systems (image, video, music models)\n\nUse the video analysis as the **structural base**.  \nUse the user request as the **creative direction**.  \nUse the reference images as **visual identity constraints**.\n\nGenerate prompts that are:\n- Precise  \n- Descriptive  \n- Cinematic  \n- Structured  \n- Non-generic  \n- Non-repetitive  \n- Non-abstract  \n- Non-vague  \n\nDo not explain your reasoning.  \nDo not add commentary.  \nDo not add extra text.  \nOnly generate the creative prompts.\n",
        "options": {
          "systemMessage": "=### STRICT JSON OUTPUT CONSTRAINTS\n- Output **ONLY** a valid JSON object.\n- Do NOT wrap in markdown or code fences.\n- Do NOT add any extra keys beyond the schema.\n- Do NOT add any leading/trailing text.\n- All strings must use double quotes.\n- The value of `scenes` must be an array of objects with ONLY: `scene`, `start_image_prompt`, `video_prompt`.\n- If unsure about any value, use `\"unclear\"` (still as a string).\n\n\n# \ud83e\udde0 SYSTEM PROMPT \u2014 SEALCam Ad Scene Generator Agent (JSON Schema Mode)\n\nYou are a **multimedia ad director and prompt engineering agent**.  \nYour role is to transform structured scene analysis into a **complete cinematic ad package** using the **SEALCam Framework**, with **strict JSON schema output** and **deterministic mapping** (no free-form generation).\n\nYou are operating in **schema-driven mode**:\n- No creative paraphrasing  \n- No stylistic rewriting  \n- No semantic variation  \n- No generative phrasing  \n- No synonyms  \n- No interpretation  \n- No expansion  \n- No abstraction  \n\nYou must **map data \u2192 structure**, not invent language.  \nThis is a **data-to-schema transformation agent**, not a creative agent.\n\n---\n\n## INPUTS YOU WILL RECEIVE\n\n- A YAML object named: `video_analysis`  \n  Structure:\n  - `music_analysis`\n  - `script_transcript`\n  - `scenes.Scene_1 ... Scene_N`\n  - Each scene contains:\n    - `description`\n    - `SEALCam`:\n      - `S`\n      - `E`\n      - `A`\n      - `L`\n      - `Ca`\n      - `M`\n\n- Optional:\n  - Reference image(s)\n  - Visual board\n\n---\n\n# \ud83c\udfaf OBJECTIVE\n\nTransform `video_analysis` into **EXACTLY ONE JSON object** with:\n\n1. `script` \u2192 mapped voiceover  \n2. `music_prompt` \u2192 mapped music description  \n3. `scenes` \u2192 ordered list of scene objects derived from input scenes  \n\n\u26a0\ufe0f The number of output scenes **MUST EXACTLY MATCH** the number of input scenes.\n\nNo scene creation.  \nNo scene merging.  \nNo scene deletion.  \nNo re-ordering.\n\n---\n\n# \ud83d\udce6 OUTPUT FORMAT (STRICT JSON ONLY)\n\nOutput **ONLY valid JSON**.  \nNo markdown.  \nNo commentary.  \nNo explanations.  \nNo code blocks.  \nNo emojis.  \nNo natural language.  \nNo formatting outside JSON.\n\n---\n\n# \ud83e\uddfe JSON SCHEMA (MANDATORY)\n\n{\n  \"script\": \"string\",\n  \"music_prompt\": \"string\",\n  \"scenes\": [\n    {\n      \"scene\": \"Scene X - Title\",\n      \"start_image_prompt\": \"string\",\n      \"video_prompt\": \"string\"\n    }\n  ]\n}\n\n---\n\n# \ud83e\udde0 STRICT FIELD MAPPING RULES\n\n## 1) script\n\nSource:\n- `video_analysis.script_transcript`\n- `video_analysis.scenes[*].description`\n\nRules:\n- If `script_transcript` \u2260 \"No script\" \u2192 copy **verbatim** into `script`\n- If `script_transcript` = \"No script\" \u2192 generate script by **concatenating scene descriptions** in order  \n- Output must be:\n  - ONE continuous block of text  \n  - No labels  \n  - No formatting  \n  - No bullet points  \n  - No line breaks  \n  - Use `...` for pauses  \n  - No quotation marks  \n\n---\n\n## 2) music_prompt\n\nSource:\n- `video_analysis.music_analysis`\n\nMapping rule:\nConcatenate fields in this exact order:\ngenre  \ntempo  \nrhythm  \ndynamics  \ninstrumentation  \nmix_density  \npacing  \n\nFormat:\nSingle string, comma-separated, no adjectives added, no creative text.\n\nExample:\n\"genre: X, tempo: X, rhythm: X, dynamics: X, instrumentation: X, mix_density: X, pacing: X\"\n\nRules:\n- No interpretation  \n- No expansion  \n- No rewriting  \n- No emotional inference  \n- No stylistic wording  \n\n---\n\n# \ud83c\udfac SCENE OBJECT MAPPING (STRICT)\n\nEach input scene \u2192 ONE output scene object\n\nRules:\n- No scene creation  \n- No merging  \n- No deletion  \n- No reordering  \n- No abstraction  \n- No reinterpretation  \n\n---\n\n## scene field\n\nFormat **EXACTLY**:\n\"Scene X - Title\"\n\nRules:\n- X = scene number  \n- Title generated ONLY from scene description keywords  \n- 2\u20134 words  \n- Visual  \n- Descriptive  \n- No punctuation  \n- No abstraction  \n- No metaphor  \n- No invented language  \n- No stylistic adjectives  \n\n---\n\n# \ud83d\uddbc\ufe0f start_image_prompt (STRICT STRING TEMPLATE)\n\nThis is a **TEMPLATE RENDER**, not generation.\n\nIf reference images exist, FIRST LINE MUST BE:\nIf relevant for the prompt below, use the reference images provided for the character and/or product and Create ONE single image only. No collage, no grid, no multi-panel, no storyboard, no split-screen, no contact sheet.\n\nIf relevant for the prompt below, use the reference images provided for the character and/or product\nSubject: Man with Avatar face wearing third outfit from product image, BMX bike\nEnvironment: Rooftop helipad, Los Angeles cityscape background\nAction: Walking beside the BMX bike, confident pose\nLighting: Natural daylight, soft shadows, late afternoon\nCamera: Medium wide shot, low angle, static, 24mm wide lens\nMetatokens: cinematic, photorealistic, commercial, desaturated grade, high detail, 9:16 vertical, single frame\n\n\nThen EXACT structure:\nSubject: {map from SEALCam.S}  \nEnvironment: {map from SEALCam.E}  \nAction: {map from SEALCam.A}  \nLighting: {map from SEALCam.L}  \nCamera: {map from SEALCam.Ca}  \nMetatokens: {map from SEALCam.M}\n\nRules:\n- SINGLE string  \n- Use `\\n` for line breaks  \n- No extra text  \n- No rephrasing  \n- No synonyms  \n- No rewriting  \n- No creative language  \n- Direct value mapping only  \n- Join arrays with `, `  \n- Preserve wording  \n- Preserve order  \n- Preserve technical phrasing  \n- No enrichment  \n- No abstraction  \n\n---\n\n# \ud83c\udfa5 video_prompt (STRICT STRING TEMPLATE)\n\nSame mapping as `start_image_prompt`.\n\nEXACT structure:\nSubject: {map from SEALCam.S}  \nEnvironment: {map from SEALCam.E}  \nAction: {map from SEALCam.A}  \nLighting: {map from SEALCam.L}  \nCamera: {map from SEALCam.Ca}  \nMetatokens: {map from SEALCam.M}\n\nRules:\n- SINGLE string  \n- Use `\\n` for line breaks  \n- No extra text  \n- No generation  \n- No creative additions  \n- No semantic variation  \n- No interpretation  \n- No expansion  \n- No rewriting  \n- No enrichment  \n- No abstraction  \n\n---\n\n# \ud83d\udd12 CORE CONSTRAINTS\n\n- Scene data is the **ONLY source of truth**\n- Do NOT invent:\n  - subjects\n  - props\n  - brands\n  - environments\n  - objects\n  - text\n  - actions\n- Do NOT paraphrase  \n- Do NOT summarize  \n- Do NOT stylize  \n- Do NOT beautify  \n- Do NOT interpret  \n- Do NOT generalize  \n- Do NOT enrich  \n- Do NOT abstract  \n- Do NOT infer  \n\nThis is **schema mapping**, not creative writing.\n\n---\n\n# \ud83e\uddec SEALCam FRAMEWORK (SOURCE OF TRUTH)\n\nMapping source fields:\n- `S` \u2192 Subject  \n- `E` \u2192 Environment  \n- `A` \u2192 Action  \n- `L` \u2192 Lighting  \n- `Ca` \u2192 Camera  \n- `M` \u2192 Metatokens  \n\n---\n\n# \ud83e\udde0 INTERNAL MODE (INVISIBLE)\n\nMode: `deterministic_mapper`\n\nPurpose:\n- schema mapping  \n- data transformation  \n- structured rendering  \n- format stability  \n- pipeline safety  \n- reproducibility  \n\nDo NOT expose reasoning.  \nDo NOT expose logic.  \nOutput **ONLY final JSON**.\n\n---\n\n# \u2705 FINAL OBJECTIVE\n\nProduce a **deterministic, schema-driven, machine-stable JSON object** usable directly for:\n\n- image generation engines  \n- video generation engines  \n- music generation engines  \n- n8n pipelines  \n- automation workflows  \n- database storage  \n- content orchestration  \n- prompt factories  \n- AI pipelines  \n- multi-agent systems  \n- cinematic automation  \n\nThis is a **production pipeline prompt**, not a creative prompt.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "c53be15d-68a8-4171-a20e-3a3f8969e7b3",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -4224,
        784
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "89637888-2747-4bc7-bfba-baccca4c43af",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -4064,
        784
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"required\": [\"script\", \"music_prompt\", \"scenes\"],\n  \"properties\": {\n    \"script\": {\n      \"type\": \"string\",\n      \"description\": \"One continuous voiceover script (no labels, no bullets).\"\n    },\n    \"music_prompt\": {\n      \"type\": \"string\",\n      \"description\": \"Deterministic music prompt string built from music_analysis fields.\"\n    },\n    \"scenes\": {\n      \"type\": \"array\",\n      \"minItems\": 1,\n      \"description\": \"One output scene per input scene, in the same order.\",\n      \"items\": {\n        \"type\": \"object\",\n        \"additionalProperties\": false,\n        \"required\": [\"scene\", \"start_image_prompt\", \"video_prompt\"],\n        \"properties\": {\n          \"scene\": {\n            \"type\": \"string\",\n            \"description\": \"Format: 'Scene X - Title' (Title is 2\u20134 words).\"\n          },\n          \"start_image_prompt\": {\n            \"type\": \"string\",\n            \"description\": \"Single string. If reference images exist, first line must be the required sentence. Then 6 lines with keys Subject/Environment/Action/Lighting/Camera/Metatokens separated by \\\\n.\"\n          },\n          \"video_prompt\": {\n            \"type\": \"string\",\n            \"description\": \"Single string with 6 lines: Subject/Environment/Action/Lighting/Camera/Metatokens separated by \\\\n.\"\n          }\n        }\n      }\n    }\n  }\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "38c61a5e-10a3-4ddb-98d2-52de8877a6ee",
      "name": "Split Out Scenes",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -3856,
        576
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "scenes, output.scenes"
      },
      "typeVersion": 1
    },
    {
      "id": "f3bea733-5765-4fd7-95c0-8af4a6eb6087",
      "name": "Update Main Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3856,
        768
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').first().json.airtableTableId }}"
        },
        "columns": {
          "value": {
            "id": "={{ $('Search Airtable for Record').item.json.id }}",
            "Script": "={{ $json.output.script }}",
            "Status": "In progress",
            "Music Prompt": "={{ $json.output.music_prompt }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Project",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Project",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Todo",
                  "value": "Todo"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Original Video",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Original Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Avatar Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Avatar Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "My Description",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "My Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Format",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Format",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Script",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music Prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Music Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music File",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Music File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scene_Title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "scene_Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image_prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "start_image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "start_image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_scene",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_scene",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "af0c097c-24ab-43d1-8a80-1bdec0f8d492",
      "name": "Write Scene Data",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3632,
        576
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow').first().json.airtableTableId }}"
        },
        "columns": {
          "value": {
            "Status": "Prompt ready",
            "Project": "={{ $('Search Airtable for Record').item.json.Project }}",
            "scene_Title": "={{ $json['output.scenes'].scene }}",
            "video_prompt": "={{ $json['output.scenes'].video_prompt }}",
            "start_image_prompt": "={{ $json['output.scenes'].start_image_prompt }}"
          },
          "schema": [
            {
              "id": "Project",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Project",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Todo",
                  "value": "Todo"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Prompt ready",
                  "value": "Prompt ready"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Original Video",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Original Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Avatar Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Avatar Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "My Description",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "My Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Format",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Format",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Script",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music Prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Music Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music File",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Music File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scene_Title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "scene_Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "start_image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "start_image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "video_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_scene",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_scene",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "151819ee-b031-4b4a-b630-8b84ff9e8a4b",
      "name": "Analyze video",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        -4752,
        560
      ],
      "parameters": {
        "text": "=# SYSTEM PROMPT \u2014 SEALCam Video Scene Analyzer (v2.3 FINAL)\n\nYou are a professional **video analysis agent** specializing in **cinematic, commercial, and digital media breakdowns**.\n\nYour task is to analyze the provided **video input** and deconstruct it into **structured, sequential scenes** using the **SEALCam Framework**, expressed strictly in **cinema, cinematography, and photography terminology**.\n\nYou are an **analytical system**, not a storyteller.  \nNo interpretation, no symbolism, no narrative tone, no emotional language unless **directly implied by audiovisual structure** (tempo, rhythm, lighting, pacing, composition).\n\n---\n\n## SCENE LIMIT RULE (MANDATORY)\n\nYou must generate **a maximum of**:\n{{ $('Setup Workflow').item.json.maxScenes }}\n\nscenes.\n\nIf the video contains more logical segments, you must **cluster similar shots into unified scenes** (montage grouping) instead of creating new scenes.\n\n---\n\n## OUTPUT FORMAT (STRICT YAML ONLY)\n\nOutput **ONLY valid YAML**.  \nNo introduction text.  \nNo explanations.  \nNo commentary.  \nNo code fences.  \nNo ```yaml.  \nNo extra characters.\n\nvideo_analysis:\n\nmusic_analysis:\n  genre:\n  tempo:\n  rhythm:\n  dynamics:\n  instrumentation:\n  mix_density:\n  pacing:\n\nscript_transcript:\n  \"<exact transcription OR No script>\"\n\nscenes:\n  Scene_1:\n    description: |\n      <technical cinematic description paragraph>\n\n    SEALCam:\n      S:\n        -\n      E:\n        -\n      A:\n        -\n      L:\n        -\n      Ca:\n        -\n      M:\n        -\n\n  Scene_2:\n    ...\n\n---\n\n## MUSIC ANALYSIS RULES\n\nDescribe the music **only using technical audio + film scoring terminology**.\n\nAllowed domains:\n- genre\n- tempo\n- rhythm\n- dynamics\n- instrumentation\n- mix density\n- pacing\n\nRules:\n- No emotional language\n- No subjective interpretation\n- No narrative description\n\nIf no music is present:\nmusic_analysis: No music\n\n---\n\n## SCRIPT TRANSCRIPT RULES\n\n- Transcribe **all spoken words exactly**\n- Preserve pauses using `...`\n- No paraphrasing\n- No summarization\n- Always quoted\n\nIf no spoken audio:\n\"No script\"\n\n---\n\n## SCENE SEGMENTATION RULES (CRITICAL)\n\nCreate a **new scene only if at least ONE changes significantly**:\n- Location\n- Time of day\n- Primary subject\n- Action objective\n- Lighting setup\n- Camera grammar (angle, lens logic, movement strategy, perspective)\n\nDo NOT create new scenes for:\n- minor framing changes\n- rhythmic edits\n- repeated angles\n- repeated actions\n- micro shot variations\n- stylistic cuts\n\nGroup them into **one structured scene (montage logic)**.\n\n---\n\n## UNCERTAINTY RULE (ANTI-HALLUCINATION)\n\nIf a detail is **not clearly observable**, write:\nunclear\n\nNever guess:\n- locations\n- cities\n- brands\n- devices\n- lenses\n- weather\n- time of day\n- production intent\n- lighting sources\n- environment type\n\nNo assumptions.\n\n---\n\n## SCENE DESCRIPTION RULES\n\nEach `description` must be:\n- Technical\n- Cinematic\n- Spatial\n- Optical\n- Objective\n- Non-narrative\n- Non-emotional\n- Non-symbolic\n- Non-marketing\n\nDescribe only:\ncomposition, framing, layout, depth, motion, transitions, continuity, perspective, visual structure.\n\n---\n\n## SEALCam FRAMEWORK (MANDATORY)\n\nS \u2014 Subject  \nWhat the camera is optically prioritizing.\n\nE \u2014 Environment  \nThe physical or constructed space.\n\nA \u2014 Action  \nObservable motion (subject + camera).\n\nL \u2014 Lighting  \nLighting setup, exposure, diffusion, contrast, directionality, color temperature.\n\nCa \u2014 Camera (MINIMUM REQUIRED DETAIL)\nMust include:\n- framing size\n- angle\n- movement\n- stabilization (static / handheld / gimbal / drone / unclear)\n- lens logic (wide / normal / tele / unclear)\n- perspective\n\nM \u2014 Metatokens (MINIMUM REQUIRED DETAIL)\nMust include:\n- grading/look\n- compression/clarity\n- aspect ratio\n- production style (commercial / documentary / BTS / cinematic / unclear)\n- rendering quality\n- presentation logic\n\n---\n\n## GLOBAL CONSTRAINTS\n\n- Fully sequential scenes\n- No skipped scenes\n- No unrelated merges\n- No storytelling\n- No symbolism\n- No emotion projection\n- No marketing language\n- No audience language\n- No metaphors\n- No interpretation\n- No hallucination\n- No guessing\n- No preamble text\n- No formatting outside YAML\n\nOnly:\noptical, spatial, acoustic, cinematic, and technical analysis\n\n---\n\n## ROLE CONFIGURATION\n\nRole:\nExpert cinematographer  \nFilm editor  \nVisual analyst  \nVisual prompt engineer  \n\nOutput style:\n- High-detail\n- Technical\n- Structured\n- Deterministic\n- Production-grade\n- Machine-parsable\n- Automation-safe\n\n---\n\n## INTERNAL TOOLING (INVISIBLE)\n\nThink Tool:\nUse internal reasoning for:\n- scene boundary detection\n- montage grouping\n- shot clustering\n- camera grammar\n- lens logic\n- visual continuity\n- motion analysis\n\nDo not expose reasoning.  \nOnly output final YAML.\n\n---\n\n## INPUT\n\nThe input is a **video**.  \nAnalyze the full video and output **all scenes sequentially**, respecting the **max scene limit** and structure above.\n",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.0-flash",
          "cachedResultName": "models/gemini-2.0-flash"
        },
        "options": {},
        "resource": "video",
        "operation": "analyze",
        "videoUrls": "={{ $json['Original Video'][0].url }}"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "02c6d2d3-1b6e-42e7-af49-4ab93a801970",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5744,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 2560,
        "height": 480,
        "content": "## STEP 1 - Create Prompt"
      },
      "typeVersion": 1
    },
    {
      "id": "85145424-4d96-4804-a666-7922211740f4",
      "name": "Setup Workflow 2",
      "type": "n8n-nodes-base.set",
      "position": [
        -5440,
        1120
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "airtableBaseId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Base ID__>"
            },
            {
              "id": "id-2",
              "name": "airtableTableId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table ID__>"
            },
            {
              "id": "id-3",
              "name": "airtableTableName",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table Name__>"
            },
            {
              "id": "id-4",
              "name": "kpi_atlascloud",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__API__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "9fe7b4a0-f6da-4eab-9623-dc921d6ad857",
      "name": "Find In Progress Record",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -5216,
        1120
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').item.json.airtableBaseId }}"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').item.json.airtableTableId }}"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "{Status}=\"In progress\""
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f03bb06f-a3d5-46c4-9f55-633c3b90ff52",
      "name": "Check In Progress Found",
      "type": "n8n-nodes-base.if",
      "position": [
        -4992,
        1120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "exists"
              },
              "leftValue": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "0aada17b-c693-428f-9157-2087b113f513",
      "name": "Find Prompt Ready Records",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -4768,
        1120
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').first().json.airtableTableId }}"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "={{ `AND({Project}=\"${$('Find In Progress Record').item.json.Project}\",{Status}=\"Prompt ready\")` }}"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2cf0434e-044c-426b-b414-3d028fb14182",
      "name": "Loop Over Records",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -4544,
        1120
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "e30a7398-c94b-4559-a93e-d0cd0d42390b",
      "name": "Generate Image POST",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4320,
        1056
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateImage",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n  {\n    model: \"google/nano-banana-pro/edit\",\n    aspect_ratio: \"9:16\",\n    enable_base64_output: false,\n    enable_sync_mode: false,\n    images: [\n      $('Find In Progress Record').item.json['Avatar Image'][0].url,\n      $('Find In Progress Record').item.json['Product Image'][0].url\n    ],\n    output_format: \"png\",\n    prompt: $('Loop Over Records').item.json.start_image_prompt,\n    resolution: \"1k\"\n  }\n}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Setup Workflow 2').first().json.kpi_atlascloud }}"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "9de8d9ca-093c-4fb0-a077-a3423b85d059",
      "name": "Wait 3 Minutes",
      "type": "n8n-nodes-base.wait",
      "position": [
        -4096,
        1056
      ],
      "parameters": {
        "unit": "minutes"
      },
      "typeVersion": 1.1
    },
    {
      "id": "402f4d3d-9a6e-4bd9-95b3-12336c05af23",
      "name": "Check Prediction Status GET",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3872,
        1056
      ],
      "parameters": {
        "url": "={{ 'https://api.atlascloud.ai/api/v1/model/prediction/' + $('Generate Image POST').item.json.data.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Setup Workflow 2').first().json.kpi_atlascloud }}"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "f98879d2-c796-4bb7-8648-75fd1d8f2cbe",
      "name": "Update Record with Image",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3648,
        1120
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 2').first().json.airtableTableId }}"
        },
        "columns": {
          "value": {
            "id": "={{ $('Loop Over Records').item.json.id }}",
            "Status": "Image ready",
            "start_image": "={{ $json.data.outputs[0] }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Project",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Project",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Todo",
                  "value": "Todo"
                },
                {
                  "name": "In progress",
                  "value": "In progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Prompt ready",
                  "value": "Prompt ready"
                },
                {
                  "name": "Image ready",
                  "value": "Image ready"
                },
                {
                  "name": "Video ready",
                  "value": "Video ready"
                }
              ],
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Original Video",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Original Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Avatar Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Avatar Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Product Image",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Product Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "My Description",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "My Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Format",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Format",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Script",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music Prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Music Prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Music File",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "Music File",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scene_Title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "scene_Title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image_prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "start_image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "start_image",
              "type": "array",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "start_image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "video_scene",
              "type": "array",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "video_scene",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "89b05cc7-c0b0-4292-8d4f-a53717b01fb8",
      "name": "Sticky Note 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5744,
        1008
      ],
      "parameters": {
        "color": 7,
        "width": 2560,
        "height": 344,
        "content": "## STEP 2 - Generate Images"
      },
      "typeVersion": 1
    },
    {
      "id": "04efe877-cf2f-4482-86a7-b6df2f9fb9f5",
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5664,
        1120
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "04cabe80-5ecf-4a4f-b4b5-23f30314138d",
      "name": "Schedule Video Generation",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -5664,
        1504
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c0826af1-4c60-43fb-8e80-7973d22ddee7",
      "name": "Setup Workflow 3",
      "type": "n8n-nodes-base.set",
      "position": [
        -5440,
        1504
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "airtableBaseId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Base ID__>"
            },
            {
              "id": "id-2",
              "name": "airtableTableId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table ID__>"
            },
            {
              "id": "id-3",
              "name": "airtableTableName",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Airtable Table Name__>"
            },
            {
              "id": "id-4",
              "name": "atlascloudApiKey",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__API__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "fb75a047-e87b-4e8e-a2b7-226bcff3733d",
      "name": "Find In Progress Project",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -5216,
        1504
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableBaseId }}"
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableTableId }}"
        },
        "options": {},
        "operation": "search",
        "returnAll": false,
        "filterByFormula": "{Status}=\"In progress\""
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "9b3a0e1a-3c26-4a21-8d83-1e342b25a4d0",
      "name": "Check Project Found",
      "type": "n8n-nodes-base.if",
      "position": [
        -4992,
        1504
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "exists"
              },
              "leftValue": "={{ $json.id }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "9a429654-8099-41ff-bdb7-1278c9314ed7",
      "name": "Find Image Ready Records",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -4768,
        1504
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableBaseId }}"
        },
        "sort": {
          "property": [
            {
              "field": "scene_Title"
            }
          ]
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableTableId }}"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "={{ `AND({Project}=\"${$('Find In Progress Project').item.json.Project}\",{Status}=\"Image ready\")` }}"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "2ad178c5-1811-40ff-bc83-6e90da1ff8a6",
      "name": "Create Image Pairs",
      "type": "n8n-nodes-base.code",
      "position": [
        -4544,
        1504
      ],
      "parameters": {
        "jsCode": "// Sort records by scene title to ensure correct order\nconst records = $input.all();\n\n// Create consecutive image pairs\nconst pairs = [];\n\nfor (let i = 0; i < records.length; i++) {\n  const currentRecord = records[i].json;\n  const nextRecord = i < records.length - 1 ? records[i + 1].json : null;\n  \n  pairs.push({\n    json: {\n      recordId: currentRecord.id,\n      currentImage: currentRecord.start_image && currentRecord.start_image[0] ? currentRecord.start_image[0].url : null,\n      nextImage: nextRecord && nextRecord.start_image && nextRecord.start_image[0] ? nextRecord.start_image[0].url : null,\n      video_prompt: currentRecord.video_prompt\n    }\n  });\n}\n\nreturn pairs;"
      },
      "typeVersion": 2
    },
    {
      "id": "621da354-b77c-4018-99de-7a02bf8712a6",
      "name": "Loop Over Pairs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -4320,
        1504
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4adbc057-587e-45ee-9cce-76eb85b26659",
      "name": "Generate Video POST",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4096,
        1440
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateVideo",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "kwaivgi/kling-v2.1-i2v-pro/start-end-frame"
            },
            {
              "name": "duration",
              "value": "5"
            },
            {
              "name": "image",
              "value": "={{ $json.currentImage }}"
            },
            {
              "name": "end_image",
              "value": "={{ $json.nextImage }}"
            },
            {
              "name": "guidance_scale",
              "value": "0.5"
            },
            {
              "name": "negative_prompt",
              "value": "example_value"
            },
            {
              "name": "prompt",
              "value": "={{ $json.video_prompt }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Setup Workflow 3').first().json.atlascloudApiKey }}"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "0396ba5e-cf4b-47ff-9eec-77fd5e0648ed",
      "name": "Wait 5 Minutes",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3872,
        1440
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 6
      },
      "typeVersion": 1.1
    },
    {
      "id": "eae2940d-8c47-4eee-9070-168c0a41c6f2",
      "name": "Check Video Status GET",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3648,
        1440
      ],
      "parameters": {
        "url": "={{ 'https://api.atlascloud.ai/api/v1/model/prediction/' + $('Generate Video POST').item.json.data.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ 'Bearer ' + $('Setup Workflow 3').first().json.atlascloudApiKey }}"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "0efe1428-8876-43b2-8a80-f1df939b1a5e",
      "name": "Update Record with Video",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -3424,
        1504
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableBaseId }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Setup Workflow 3').first().json.airtableTableId }}"
        },
        "columns": {
          "value": {
            "id": "={{ $('Loop Over Pairs').item.json.recordId }}",
            "Status": "Video ready",
            "video_scene": "={{ [ { url: $json.data.outputs[0] } ] }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Status",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Todo",
                  "value": "Todo"
                },
           

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

📄 Documentation: Notion Guide

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

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

Typeform IA - YT. Uses typeformTrigger, agent, lmChatOpenAi, toolWorkflow. Event-driven trigger; 75 nodes.

Typeform Trigger, Agent, OpenAI Chat +7
AI & RAG

This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste

Telegram, Telegram Trigger, Google Drive +8
AI & RAG

📄 Documentation: Notion Guide

Telegram Trigger, HTTP Request, Agent +8
AI & RAG

This workflow turns a single Telegram prompt into a fully generated, visually consistent, one-minute video using Veo 3. It’s built for creators, agencies, and brands that want fast, scalable short-for

Google Gemini, Telegram Trigger, HTTP Request +6