{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "cbbea0db-2557-48ef-a9ab-04a86a4437fa",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1312,
        -128
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f4047448-a0e8-49e3-85e3-44729e2cf94b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -256
      ],
      "parameters": {
        "color": 3,
        "width": 540,
        "height": 520,
        "content": "## Save Content"
      },
      "typeVersion": 1
    },
    {
      "id": "e4a99226-f6dc-411e-86bb-681707d482c6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        -400
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 740,
        "content": "## Create a Video"
      },
      "typeVersion": 1
    },
    {
      "id": "36b4b4b9-9226-4f38-bec6-e6b5d6d73a51",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -256
      ],
      "parameters": {
        "color": 5,
        "width": 840,
        "height": 520,
        "content": "# Input: Video Topic"
      },
      "typeVersion": 1
    },
    {
      "id": "36337833-92cb-45ed-ac80-8ffd96b3c8a9",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1232,
        80
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "c8412fba-deac-4e6c-9f22-176ead2a956e",
      "name": "Think1",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -1104,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "14a1ad4e-9fcb-443a-8627-b4802d1c994e",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -992,
        80
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"caption\": \"\",\n  \"idea\": \"\",\n  \"environment\": \"\",\n  \"status\": \"\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "41cc4339-6112-4939-a2df-a246d80f234c",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -832,
        80
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "b5759496-3eaf-4d02-ab7c-82cf41361162",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -672,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9d2f5cb6-9db8-4eca-bde0-e883e0fa4cd4",
      "name": "Generate Video Idea",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1152,
        -128
      ],
      "parameters": {
        "text": "Give me an idea to create the content about biblical characters speaking to thecamera and making a vlog",
        "options": {
          "systemMessage": "=** Purpose **\nYou generate viral short-form video ideas inspired by biblical characters or scenes, styled like modern TikTok vlogs. These should feel personal, emotional, and often humorous.\n\n** Think Tool Prompt (used before generation) **\n\u201cHow can I take a biblical moment or character and turn it into a relatable, viral, or funny TikTok-style video idea that feels natural, emotional, or modern?\u201d\n\n** Output Requirements **\nYour response must include:\n\n- caption \u2013 Short, poetic or funny, TikTok-style. Include emojis and 3\u20135 hashtags (e.g., #biblevlog #foryou #holycomedy #ancientvibes).\n- idea \u2013 1\u20132 sentence summary of the action, story, or twist in the video.\n- environment \u2013 Describe what the set looks like: light, textures, mood, setting. Think \u201cGoPro meets ancient Jerusalem.\u201d\n- status \u2013 Must be \"to create\", without quotation marks\n\n** JSON Output Parser **\nEvery output must strictly follow this format:\n\n{\n  \"caption\": \"\",\n  \"idea\": \"\",\n  \"environment\": \"\",\n  \"status\": \"\"\n}\n\n** Sample Outputs **\n\nExample 1\n{\n  \"caption\": \"When Jesus gives you the silent treatment \ud83d\udd4a\ufe0f\ud83d\ude36 #jesusvlog #holycomedy\",\n  \"idea\": \"Jesus calmly stares at the camera while the disciple keeps asking, 'Are we lost?' \u2013 awkward silence builds up.\",\n  \"environment\": \"Desert trail, golden hour light, dry bushes around, warm rocky textures and wind softly blowing.\",\n  \"status\": \"ready for production\"\n}\n\nExample 2\n{\n  \"caption\": \"POV: You just met Mary Magdalene and she\u2019s not what you expected \ud83d\ude33\u2728 #biblevlog #foryou\",\n  \"idea\": \"A modern-style introduction of Mary Magdalene where she breaks the fourth wall with sarcasm and confidence.\",\n  \"environment\": \"Dusty stone home with narrow light beams, clay walls, fabric drapes blowing slightly in the breeze.\",\n  \"status\": \"ready for production\"\n}\n\nExample 3\n{\n  \"caption\": \"Me trying to explain the flood before it happened \ud83c\udf27\ufe0f\ud83d\udc18 #noahvibes #bibletok\",\n  \"idea\": \"Noah explains why he\u2019s building the ark, while others laugh in the background \u2014 like a vlog rant.\",\n  \"environment\": \"Half-built wooden structure, cloudy sky, goats wandering around, mud everywhere, distant laughter.\",\n  \"status\": \"concept only\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "8a94a444-28d0-42ac-8cb6-3040fb8769cc",
      "name": "Generate Veo3 Prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -832,
        -128
      ],
      "parameters": {
        "text": "=Create a prompt for the Veo3 video based on the following information:\n\nIdea: {{ $json.output.idea }}\nEnvironment: {{ $json.output.environment }}",
        "options": {
          "systemMessage": "=** System Message **\n\nYou are a professional cinematic prompt generator for AI video tools. Your task is to convert a short-form video idea and its environment description (inspired by biblical or ancient-world themes) into a highly detailed, camera-aware, emotionally rich prompt suitable for generating a cinematic AI video using Veo3.\n\nYou must understand the emotional tone, visual aesthetics, and storytelling style of short-form TikTok videos that imitate biblical scenes with modern pacing and framing.\n\n** Veo3 Prompt Structure Guidelines **\n\nEach prompt should be natural, cinematic, and visually immersive, including:\n\n- Scene description \u2013 Describe the overall environment clearly (terrain, buildings, light, movement).\n- Character focus \u2013 If the idea involves a person, include their position, outfit style (biblical era), mood/expression, and framing (e.g., close-up, wide shot).\n- Camera movement \u2013 Always include one cinematic camera motion (e.g., slow push-in, handheld tracking, drone pan, orbit, dolly backward).\n- Time of day & lighting \u2013 Set the mood with light (e.g., golden hour, harsh daylight, candlelit interior).\n- Atmosphere & texture \u2013 Mention dust, wind, fabric movement, shadows, reflections, or imperfections in the scene to increase realism.\n- Style & quality \u2013 Include cinematic tone, analog warmth, slightly soft vintage film look, GoPro-like closeness if appropriate.\n\n** Input **\n- You will receive two fields: idea, environment\n- Return only the complete and detailed Veo3 prompt, no additional text.\n\n** Example Output **\nA biblical man stands in front of a half-built wooden ark, gesturing passionately as he explains something to the camera. The camera follows him handheld-style, moving slightly as he paces. In the background, groups of villagers are laughing and pointing. The sky is overcast with low clouds, and goats wander through muddy terrain. The man wears worn, ancient robes, his feet muddy, his tone frustrated but hopeful. The scene has a documentary-style realism, with soft golden highlights breaking through cloud gaps. Light wind moves fabric and rustles dry straw around the ark. Shot in cinematic 24fps with natural tones and slight vintage softness."
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "8e5c1d35-3664-4630-994c-0df329ab0341",
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -288,
        -320
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/veo3",
        "body": "={ \"prompt\": \"{{ $('Generate Veo3 Prompt').item.json.output }}\" }",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 2000
            }
          }
        },
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "c3080d20-1952-4456-a175-4df985dad72e",
      "name": "Get Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -288,
        80
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/veo3/requests/{{ $json.request_id }}\n",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "typeVersion": 4.2
    },
    {
      "id": "525a1ba7-d51e-4c1d-bd78-416b3c545339",
      "name": "Wait 10 Minutes",
      "type": "n8n-nodes-base.wait",
      "position": [
        -288,
        -128
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "eba3a1ef-cf20-4a49-b7e0-94222d83d331",
      "name": "Store the Video",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        208,
        -80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Video URL": "={{ $json.video.url }}"
          },
          "schema": [
            {
              "id": "Idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Captions",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Captions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Environment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Environment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E/edit?usp=drivesdk",
          "cachedResultName": "Veo3 Videos"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "b807cf27-6520-4e72-8136-2919e3adeb94",
      "name": "Save Content Information",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -512,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {
            "Idea": "={{ $('Generate Video Idea').first().json.output.idea }}",
            "Status": "={{ $('Generate Video Idea').first().json.output.status }}",
            "Captions": "={{ $('Generate Video Idea').first().json.output.caption }}",
            "Environment": "={{ $('Generate Video Idea').first().json.output.environment }}"
          },
          "schema": [
            {
              "id": "Idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Captions",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Captions",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Environment",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Environment",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video URL",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1JsQWTq-ozkDD4VRaUEe34IzVFhig4HlWPIh0ZelyQ2E/edit?usp=drivesdk",
          "cachedResultName": "Veo3 Videos"
        }
      },
      "typeVersion": 4.5
    }
  ],
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Generate Veo3 Prompt",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Think1": {
      "ai_tool": [
        [
          {
            "node": "Generate Video Idea",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Video": {
      "main": [
        [
          {
            "node": "Store the Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "Wait 10 Minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10 Minutes": {
      "main": [
        [
          {
            "node": "Get Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Generate Video Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Veo3 Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Video Idea",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Idea": {
      "main": [
        [
          {
            "node": "Generate Veo3 Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Veo3 Prompt": {
      "main": [
        [
          {
            "node": "Save Content Information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Content Information": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Video Idea",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}