n8n Generate & Auto-Post AI Videos to Social Media

Overview

Type: AI Workflow
Node Types: stickyNote, set, googleSheets, httpRequest, string, scheduleTrigger, agent, toolThink, lmChatOpenAi, outputParserStructured, wait, main, ai_tool, ai_outputParser, ai_languageModel
Estimated Time: 19 min
Complexity: ⭐⭐⭐ Complex

🎬 n8n Generate & Auto-Post AI Videos to Social Media

This n8n Generate & Auto-Post AI Videos to Social Media using GPT + Veo3 + Blotato workflow automates the end-to-end process of creating AI-generated videos and distributing them to multiple social media platforms — using OpenAI/Gemini for scripting, Veo3 for video generation, and Blotato for publishing.

🔧 Workflow Steps:

  1. Trigger Workflow: Starts with a daily cron node.
  2. Generate Script & Caption: Uses GPT-4.1 (or Gemini) to ideate content and captions.
  3. Save to Google Sheets: Records all video prompts and script history.
  4. Format Prompt: Structures the prompt for Veo3 API compatibility.
  5. Generate Video: Sends the prompt to Veo3 via Fal.ai API and waits for video rendering.
  6. Retrieve Final Video URL: Gets the video link and logs it.
  7. Auto-Distribute: Uploads to Blotato and publishes across 9+ social platforms including YouTube, TikTok, Instagram, and more.

📌 Use Cases:

  • Automated content generation for TikTok/Instagram Reels/YouTube Shorts
  • Marketing teams scaling AI-powered short-form content
  • Content creators or solopreneurs managing multiple platforms

🧰 Required Credentials:

  • OpenAI or Google Vertex (Gemini) account
  • Fal.ai Veo3 API token
  • Google Sheets OAuth2 (read/write)
  • Blotato account and API access

⚙️ Notes & Enhancements:

  • You can swap GPT-4.1 with Gemini Pro for more control and lower cost via Vertex AI.
  • Replace static wait times with Webhook callbacks for real-time updates from Veo3.
  • Support dynamic formatting per platform (e.g., different aspect ratios or captions).
  • Enable optional thumbnail/image generation using DALL·E or SDXL models.

🧩 Attribution:

Based on the official n8n Workflow #5035, with enhancements and explanations by AutomateGeniusHub.

Workflow Editor Screenshot

Workflow Screenshot

Workflow JSON Code

{
  "name": "My workflow 7",
  "nodes": [
    {
      "parameters": {
        "content": "# ✅ STEP 1 — Generate Script & Prompt with AI",
        "height": 500,
        "width": 1200
      },
      "id": "e490ad7f-3e0d-4fe7-be9d-651f671e1984",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "content": "# ✅ STEP 2 — Create Video Using Veo3\n\n",
        "height": 280,
        "width": 1200,
        "color": 3
      },
      "id": "98641253-b1b9-4ef1-9564-8822426ad6bd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        540
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "mode": "raw",
        "jsonOutput": "{\n  \"instagram_id\": \"1111\",\n  \"youtube_id\": \"1111\",\n  \"threads_id\": \"1111\",\n  \"tiktok_id\": \"1111\",\n  \"facebook_id\": \"1111\",\n  \"facebook_page_id\": \"1111\",\n  \"twitter_id\": \"1111\",\n  \"linkedin_id\": \"1111\",\n  \"pinterest_id\": \"1111\",\n  \"pinterest_board_id\": \"1111\",\n  \"bluesky_id\": \"1111\"\n}\n",
        "options": {}
      },
      "id": "300e4ba5-9ed9-483c-a3fc-e55245bb2e63",
      "name": "Assign Social Media IDs",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        1200
      ],
      "typeVersion": 3.4
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "options": {}
      },
      "id": "ec80dad4-acc5-4242-8705-8b4ac36aceb0",
      "name": "Get my video",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        180,
        960
      ],
      "typeVersion": 4.5
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/media",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "url",
              "value": "={{ $('Get my video').item.json['final_output'] }}"
            }
          ]
        },
        "options": {}
      },
      "id": "91dfe881-9b97-4906-aed9-8d3190018e0d",
      "name": "Upload Video to Blotato",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        300,
        1200
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.instagram_id }}\",\n    \"target\": {\n      \"targetType\": \"instagram\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"instagram\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n\n",
        "options": {}
      },
      "id": "f72e22ef-d437-46c0-8bf7-9f19414ab611",
      "name": "INSTAGRAM",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        960
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.youtube_id }}\",\n    \"target\": {\n      \"targetType\": \"youtube\",\n      \"title\": \"{{ $('Get my video').item.json.Titre }}\",\n      \"privacyStatus\": \"unlisted\",\n      \"shouldNotifySubscribers\": \"false\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"youtube\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "feab1c3e-3bd8-4853-af31-da6549b47d34",
      "name": "YOUTUBE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        960
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "=YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.tiktok_id }}\",\n    \"target\": {\n      \"targetType\": \"tiktok\",\n      \"isYourBrand\": \"false\", \n      \"disabledDuet\": \"false\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"isAiGenerated\": \"true\",\n      \"disabledStitch\": \"false\",\n      \"disabledComments\": \"false\",\n      \"isBrandedContent\": \"false\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"tiktok\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "160e6f9a-2d64-4e16-81bd-7547414f4d0d",
      "name": "TIKTOK",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        960
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "=YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.facebook_id }}\",\n    \"target\": {\n      \"targetType\": \"facebook\",\n      \"pageId\": \"{{ $('Assign Social Media IDs').item.json.facebook_page_id }}\"\n\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"facebook\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}",
        "options": {}
      },
      "id": "40977fb8-9190-47cf-bc60-7a310a70a60c",
      "name": "FACEBOOK",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        1200
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.threads_id }}\",\n    \"target\": {\n      \"targetType\": \"threads\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"threads\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "a4f5d35f-a65d-4c3d-9db9-05f112ad12c6",
      "name": "THREADS",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        1200
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.twitter_id }}\",\n    \"target\": {\n      \"targetType\": \"twitter\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"twitter\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "46f6ce11-a2fc-4f22-9843-78be02d3b8ab",
      "name": "TWETTER",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        1200
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.linkedin_id }}\",\n    \"target\": {\n      \"targetType\": \"linkedin\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"linkedin\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "b655365b-3e61-496b-a8cb-b75294bb455c",
      "name": "LINKEDIN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        1440
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "= {\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.bluesky_id }}\",\n    \"target\": {\n      \"targetType\": \"bluesky\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"bluesky\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n",
        "options": {}
      },
      "id": "b9cc6583-38e2-4293-a642-fca0fbef23fb",
      "name": "BLUESKY",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        1440
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://backend.blotato.com/v2/posts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "blotato-api-key",
              "value": "YOUR_API_HERE"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.pinterest_id }}\",\n    \"target\": {\n      \"targetType\": \"pinterest\",\n      \"boardId\": \"{{ $('Assign Social Media IDs').item.json.pinterest_board_id }}\"      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Get my video').item.json.DESCRIPTION }}\",\n      \"platform\": \"pinterest\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n\n",
        "options": {}
      },
      "id": "653d56a3-f08e-4051-a1a8-5ee5905ae897",
      "name": "PINTEREST",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        1440
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "columns": {
          "value": {
            "STATUS": "Publish",
            "row_number": "={{ $('Get my video').item.json.row_number }}"
          },
          "schema": [
            {
              "id": "PROMPT",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "PROMPT",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DESCRIPTION",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "DESCRIPTION",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "URL VIDEO",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "URL VIDEO",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Titre",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Titre",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "STATUS",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "STATUS",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "0d361e8b-b384-4b42-b5ab-f13a58b04223",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        300,
        1440
      ],
      "typeVersion": 4.5
    },
    {
      "parameters": {
        "content": "# ✅ STEP 3 — Publish Video to Social Media\n",
        "height": 760,
        "width": 1200,
        "color": 4
      },
      "id": "385096bd-a5be-4bd7-9f5d-fde445d23392",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        860
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "id": "0a613862-9347-4592-9241-707fdfdda17d",
      "name": "Trigger: Run Daily Script Generator",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        160,
        80
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "Give me an idea about [a Yeti speaking to a camera and doing a Vlog through his selfie stick]. ",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=You are an AI designed to generate 1 immersive, realistic idea based on a user-provided topic. Your output must be formatted as a JSON array (single line) and follow all the rules below exactly.\n\nRULES:\n\nOnly return 1 idea at a time.\n\nThe user will provide a key topic (e.g. “urban farming,” “arctic survival,” “street food in Vietnam”).\n\nThe Idea must:\n\nBe under 13 words.\n\nDescribe an interesting and viral-worthy moment, action, or event related to the provided topic.\n\nCan be as surreal as you can get, doesn't have to be real-world!\n\nInvolves a character.\n\nThe Caption must be:\n\nShort, punchy, and viral-friendly.\n\nInclude one relevant emoji.\n\nInclude exactly 12 hashtags in this order:\n** 4 topic-relevant hashtags\n** 4 all-time most popular hashtags\n** 4 currently trending hashtags (based on live research)\n\nAll hashtags must be lowercase.\n\nSet Status to \"for production\" (always).\n\nThe Environment must:\n\nBe under 20 words.\n\nMatch the action in the Idea exactly.\n\nClearly describe:\n\nWhere the event is happening (e.g. rooftop, jungle trail, city alley, frozen lake)\n\nKey visuals or background details (e.g. smoke rising, neon lights, fog, birds overhead)\n\nMain participants (e.g. farmer, cook, mechanic, rescue team, animal)\n\nStyle of scene (e.g. cinematic realism, handheld docu-style, aerial tracking shot, macro close-up)\n\nOk with fictional settings\n\nOUTPUT FORMAT (single-line JSON array):\n\n\n[\n  {\n    \"Caption\": \"Short viral title with emoji #4_topic_hashtags #4_all_time_popular_hashtags #4_trending_hashtags\",\n    \"Idea\": \"Short idea under 13 words\",\n    \"Environment\": \"Brief vivid setting under 20 words matching the action\",\n    \"Status\": \"for production\"\n  }\n]\n"
        }
      },
      "id": "668978b0-a847-4fc8-a662-af8e8e98c2fd",
      "name": "AI Agent: Generate Video Concept",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        80
      ],
      "typeVersion": 1.9
    },
    {
      "parameters": {},
      "id": "841297c9-f9ed-4ec9-9e62-4a979a533178",
      "name": "Tool: Inject Creativity",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        400,
        340
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "id": "08b0faf4-e990-45bf-8adc-04f31d56b6da",
      "name": "LLM: Generate Idea & Caption (GPT-4.1)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        240,
        340
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "jsonSchemaExample": "[\n  {\n    \"Caption\": \"Diver Removes Nets Off Whale 🐋 #whalerescue #marinelife #oceanrescue #seahelpers #love #nature #instagood #explore #viral #savenature #oceanguardians #cleanoceans\",\n    \"Idea\": \"Diver carefully cuts tangled net from distressed whale in open sea\",\n    \"Environment\": \"Open ocean, sunlight beams through water, diver and whale, cinematic realism\",\n    \"Status\": \"for production\"\n  }\n]\n"
      },
      "id": "32c9ec4a-d3bd-4cf2-af94-2ea30e03a2c1",
      "name": "Parser: Extract JSON from Idea",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        560,
        340
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "columns": {
          "value": {
            "id": "==ROW()-1",
            "idea": "={{ $json.output[0].Idea }}",
            "caption": "={{ $json.output[0].Caption }}",
            "production": "={{ $json.output[0].Status }}",
            "environment_prompt": "={{ $json.output[0].Environment }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "production",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "production",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "environment_prompt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "environment_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "final_output",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "final_output",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "b86848f7-bd0f-4e80-bb3f-f24c2cb1260c",
      "name": "Google Sheets: Save Script Idea",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        680,
        80
      ],
      "typeVersion": 4.5,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "eSQgy5LAFfmcjUk1",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Give me a Veo3 prompt for this idea:\n{{ $json.idea }}\n\nThis is the environment:\n{{ $json.environment_prompt }}\n\n",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=SYSTEM PROMPT FOR GOOGLE VEO3 PROMPT AGENT\n\nYou are an AI agent that writes hyper-realistic, cinematic video prompts for Google VEO3. Each prompt should describe a short, vivid selfie-style video clip featuring one unnamed character speaking or acting in a specific moment. The final video should look like found footage or documentary-style film — grounded, realistic, and immersive.\n\nREQUIRED STRUCTURE (FILL IN THE BRACKETS BELOW):\n\n[Scene paragraph prompt here]\n\nMain character: [description of character]\nThey say: [insert one line of dialogue, fits the scene and mood].\nThey [describe a physical action or subtle camera movement, e.g. pans the camera, shifts position, glances around].\nTime of Day: [day / night / dusk / etc.]\nLens: [describe lens]\nAudio: (implied) [ambient sounds, e.g. lion growls, wind, distant traffic, birdsong]\nBackground: [brief restatement of what is visible behind them]\n\nRULES FOR PROMPT GENERATION\n\nSingle paragraph only, 750–1500 characters. No line breaks or headings.\n\nOnly one human character. Never give them a name.\n\nInclude one spoken line of dialogue and describe how it’s delivered.\n\nCharacter must do something physical, even if subtle (e.g. glance, smirk, pan camera).\n\nUse selfie-style framing. Always describe the lens, stock, and camera behavior.\n\nScene must feel real and cinematic — like a short clip someone might record on a stylized camera.\n\nAlways include the five key technical elements: Time of Day, Lens, Film Stock, Audio, and Background.\n\nDO NOT DO THIS:\n\nDon’t name the character.\n\nDon’t include more than one character.\n\nDon’t describe subtitles or on-screen text.\n\nDon’t break the paragraph or use formatting.\n\nDon’t write vague or abstract scenes — always keep them grounded in physical detail."
        }
      },
      "id": "30a59269-cfb0-43ac-a7f0-0ae6b74b0a0e",
      "name": "AI Agent: Create Veo3-Compatible Prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        840,
        80
      ],
      "typeVersion": 1.9
    },
    {
      "parameters": {},
      "id": "3dacd252-896f-47c3-b0c6-b2a7707b1085",
      "name": "Tool: Build Prompt Structure",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1040,
        340
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "gpt-4.1"
        },
        "options": {}
      },
      "id": "6eb2e316-933c-464d-9711-0c5199660ed4",
      "name": "LLM: Format Prompt for Veo3 (GPT-4.1)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        820,
        300
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://queue.fal.run/fal-ai/veo3",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={ \"prompt\": \"{{ $json.output }}\" }\n",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 2000
            }
          }
        }
      },
      "id": "4f4fda05-52f4-458d-8864-8e50df7dbec6",
      "name": "Call Veo3 API to Generate Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        180,
        620
      ],
      "typeVersion": 4.2,
      "credentials": {
        "httpHeaderAuth": {
          "id": "vs277fpGRQX8bp6y",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {},
      "id": "5dcf7d5f-d622-49f3-86c6-28236fe73659",
      "name": "Wait for Veo3 Processing (5 mins)",
      "type": "n8n-nodes-base.wait",
      "position": [
        400,
        620
      ],
      "webhookId": "861e2761-369b-407b-9e88-1b176e617cd8",
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/veo3/requests/{{ $json.request_id }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "id": "c1c6c64c-4678-48db-969f-e1d883293145",
      "name": "Retrieve Final Video URL from Veo3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        680,
        620
      ],
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "="
        },
        "columns": {
          "value": {
            "idea": "={{ $('Google Sheets: Save Script Idea').first().json.idea }}",
            "production": "done",
            "final_output": "={{ $json.video.url }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "idea",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "production",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "production",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "environment_prompt",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "environment_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "final_output",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "final_output",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "idea"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "id": "6f84f000-9733-423a-96af-09e0f7d276b0",
      "name": "Google Sheets: Log Final Video Output",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1000,
        620
      ],
      "typeVersion": 4.5,
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "eSQgy5LAFfmcjUk1",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Get my video": {
      "main": [
        [
          {
            "node": "Assign Social Media IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assign Social Media IDs": {
      "main": [
        [
          {
            "node": "Upload Video to Blotato",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tool: Inject Creativity": {
      "ai_tool": [
        [
          {
            "node": "AI Agent: Generate Video Concept",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Upload Video to Blotato": {
      "main": [
        [
          {
            "node": "INSTAGRAM",
            "type": "main",
            "index": 0
          },
          {
            "node": "YOUTUBE",
            "type": "main",
            "index": 0
          },
          {
            "node": "TIKTOK",
            "type": "main",
            "index": 0
          },
          {
            "node": "FACEBOOK",
            "type": "main",
            "index": 0
          },
          {
            "node": "THREADS",
            "type": "main",
            "index": 0
          },
          {
            "node": "TWETTER",
            "type": "main",
            "index": 0
          },
          {
            "node": "LINKEDIN",
            "type": "main",
            "index": 0
          },
          {
            "node": "BLUESKY",
            "type": "main",
            "index": 0
          },
          {
            "node": "PINTEREST",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tool: Build Prompt Structure": {
      "ai_tool": [
        [
          {
            "node": "AI Agent: Create Veo3-Compatible Prompt",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Parser: Extract JSON from Idea": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent: Generate Video Concept",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Call Veo3 API to Generate Video": {
      "main": [
        [
          {
            "node": "Wait for Veo3 Processing (5 mins)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Save Script Idea": {
      "main": [
        [
          {
            "node": "AI Agent: Create Veo3-Compatible Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent: Generate Video Concept": {
      "main": [
        [
          {
            "node": "Google Sheets: Save Script Idea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Veo3 Processing (5 mins)": {
      "main": [
        [
          {
            "node": "Retrieve Final Video URL from Veo3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Final Video URL from Veo3": {
      "main": [
        [
          {
            "node": "Google Sheets: Log Final Video Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: Run Daily Script Generator": {
      "main": [
        [
          {
            "node": "AI Agent: Generate Video Concept",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Log Final Video Output": {
      "main": [
        [
          {
            "node": "Get my video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM: Format Prompt for Veo3 (GPT-4.1)": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Create Veo3-Compatible Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "LLM: Generate Idea & Caption (GPT-4.1)": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Generate Video Concept",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent: Create Veo3-Compatible Prompt": {
      "main": [
        [
          {
            "node": "Call Veo3 API to Generate Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a1b54ec7-2868-42e0-9cfc-3dd11e6aca0e",
  "meta": {
    "instanceId": "b58c72a58c801e03c1291a94486621c33c072d68397a812e8c55705976de38d8"
  },
  "id": "iJQLSP9dt8jtEU0M",
  "tags": []
}