8
n8n 中文网amn8n.com

使用VEO3和Gemini生成AI电影视频并发布至YouTube Shorts

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Wait, YouTube, Telegram, HttpRequest, Agent 等节点。 使用VEO3和Gemini生成AI电影视频并发布至YouTube Shorts

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "e4c230a9107a7f9a037eb58a26a9c0643e61422c540da6ff5e6de728d4657870",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "3810be1e-7612-435a-9c9b-19b074063d92",
      "name": "Sticky Note - 触发器",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        32
      ],
      "parameters": {
        "width": 600,
        "height": 300,
        "content": "## 启动触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "5dcfce81-600e-451c-9278-a7dee8162003",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1424,
        176
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 12 02 * * *"
            },
            {
              "field": "cronExpression",
              "expression": "0 12 17 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2c3afa77-319b-4aae-aa09-ff6b5f7dd8a8",
      "name": "Sticky Note - AI 提示",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -64
      ],
      "parameters": {
        "color": 2,
        "width": 700,
        "height": 576,
        "content": "## AI 提示生成"
      },
      "typeVersion": 1
    },
    {
      "id": "35022ca9-bc3d-4e0a-92ee-2c51e6b59d00",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -496,
        144
      ],
      "parameters": {
        "text": "=<user>\nGenerate a fast, surreal cinematic video idea.\n\nProvide:\n1. A highly detailed video prompt (min. 900 – max. 1800 characters).\n2. A short hypnotic caption (max. 12 words) with hashtags.\n3. A YouTube Short title (max. 100 characters).\n4. A description (humorous, keyword-rich, up to 2000 characters).\n</user>",
        "options": {
          "systemMessage": "=<system>\nYou are the official Prompt Generator for cinematic short-form surreal videos.\n\n🎬 **Your Core Task:**\nAlways generate extremely detailed, hyperrealistic video concepts that can be turned into an AI-generated cinematic short video. Each output must be precise and visually rich – as if you are briefing a film director.\n\nScenes must:\n- Be 8 seconds long.\n- Show constant motion, surreal transitions, and impossible visuals.\n- Have dynamic, unusual camera movements (fast, tilted, bird-like).\n\n✨ **Style:**\n- 4K Ultra-HD, cinematic, hyper-detailed.\n- Warm tones (gold, beige, glass effects).\n- Surreal, hypnotic, elegant, and slightly confusing.\n- Must always include one element that feels physically impossible.\n\n🌀 **Signature Elements:**\n- Infinite structures (stairs, corridors, floors).\n- Impossible fluids or slime motions.\n- Glass-like reflective and transparent designs.\n- Elegant but confusing illusions.\n\n🚫 **Rules:**\n- No humans, no animals.\n- No text inside the scene.\n</system>"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a8cb4084-9473-48a5-9f32-b119f0f5581e",
      "name": "Google Gemini 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -528,
        352
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "VgTsmQkUs1bl3AJA",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "168bfee8-7725-4fbf-9ddc-2898af256efe",
      "name": "Sticky Note - 视频 API",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -96
      ],
      "parameters": {
        "color": 3,
        "width": 700,
        "height": 400,
        "content": "## 视频生成 API"
      },
      "typeVersion": 1
    },
    {
      "id": "e0f4abf1-0f3b-4770-9302-76d3efeba36c",
      "name": "生成视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -144,
        144
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{ $json.output.prompt.replaceAll('\"',\"\").replaceAll(\"\\n\",\"\") }}\",\n  \"model\": \"veo3_fast\",\n  \"aspectRatio\": \"9:16\",\n  \"seeds\": 12345,\n  \"enableFallback\": false\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "799c7352-c027-43dc-99ac-ab6b281fbd3a",
      "name": "等待渲染",
      "type": "n8n-nodes-base.wait",
      "position": [
        96,
        144
      ],
      "webhookId": "036433e4-0d6b-4bb9-86b3-c9a32ebbb861",
      "parameters": {
        "amount": 60
      },
      "typeVersion": 1.1
    },
    {
      "id": "c7cc85c8-76f5-4d1a-96e1-7337241ce0a2",
      "name": "检查渲染状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        336,
        128
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/record-info",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.data.taskId }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a2f0d577-f85e-4659-a1fc-a445a5f840af",
      "name": "Sticky Note - 发布",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        576,
        -144
      ],
      "parameters": {
        "color": 4,
        "width": 650,
        "height": 556,
        "content": "## 视频发布"
      },
      "typeVersion": 1
    },
    {
      "id": "f0d8b5d2-a1ad-4e50-9a2a-49a4417ed300",
      "name": "上传到 YouTube",
      "type": "n8n-nodes-base.youTube",
      "position": [
        864,
        272
      ],
      "parameters": {
        "title": "={{ $('AI Agent').item.json.output.title.substring(0,99) }}",
        "options": {
          "tags": "",
          "embeddable": true,
          "description": "={{ $('AI Agent').item.json.output.describtion }}",
          "privacyStatus": "public",
          "defaultLanguage": "en",
          "notifySubscribers": true,
          "publicStatsViewable": true,
          "selfDeclaredMadeForKids": false
        },
        "resource": "video",
        "operation": "upload",
        "categoryId": "1",
        "regionCode": "DE"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "id": "24Y77sh7p4MOAdYH",
          "name": "flow kanald gold"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7cfeac4c-8fcd-4a58-818c-eee3b100c415",
      "name": "发送到 Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        864,
        80
      ],
      "webhookId": "438d3c41-e185-447f-88fb-405caa4a8ded",
      "parameters": {
        "chatId": "-1001234567890",
        "operation": "sendVideo",
        "binaryData": true,
        "additionalFields": {
          "caption": "={{ $('AI Agent').item.json.output.caption }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "5vXYsp1FkgoTBXwz",
          "name": "reality"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a05c3292-a3a6-4ec0-ba90-28cdca732c73",
      "name": "结构化输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -336,
        352
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"prompt\": \"California\",\n\t\"caption\": \"Los Angeles\",\n  \"title\":\"dsf\",\n  \"describtion\":\"dfaf\"\n}"
      },
      "typeVersion": 1.3
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Generate Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video": {
      "main": [
        [
          {
            "node": "Wait for Render",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Render": {
      "main": [
        [
          {
            "node": "Check Render Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Render Status": {
      "main": [
        [
          {
            "node": "Upload to YouTube",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量13
分类2
节点类型9
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Sulieman Said

Sulieman Said

@sulieman-said

👋 Hi, I’m Sulieman – Founder of aufCopilot.de . I build custom n8n workflows, automations & AI integrations to help businesses save time and scale smarter. I share templates, answer questions and love exploring creative use cases – from lead generation to data workflows and AI-powered automations. 🚀 Always happy to connect, learn and contribute to the community.

外部链接
在 n8n.io 查看

分享此工作流