8
n8n 中文网amn8n.com

使用Sora 2(Kie AI)、Gemini创建AI自然视频并发送至Telegram

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 Wait, Telegram, HttpRequest, ScheduleTrigger, ChainLlm 等节点。 使用Sora 2(Kie AI)、Gemini创建AI自然视频并发送至Telegram

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "3d7eb9567ae690bf8c9bba1cb43396e6e40c18e15eb5889cf9673ed1713da6db",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "351eec25-40cc-4a01-acb7-e990556d3217",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1536,
        3872
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "afeee234-5af4-4961-84d5-6b345c4f31d1",
      "name": "生成视频提示",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1360,
        3872
      ],
      "parameters": {
        "text": "=You are a specialized AI agent that generates precise video prompts for 10-second nature stock footage. Your sole function is to output a complete, professionally-formatted video generation prompt suitable for AI video creation tools.\n\n## YOUR TASK:\nWhen called upon, generate a single, comprehensive 10-second nature stock footage prompt following the structure below. Output ONLY the prompt itself - no explanations, no meta-commentary, no alternatives.\n\n## OUTPUT STRUCTURE:\n\nMood: [Select 1-2: Serene, Majestic, Peaceful, Dramatic, Ethereal, Wild, Tranquil, Raw, Breathtaking]\nStyle: [Select: Cinematic documentary, 4K nature cinematography, Wildlife documentary, Aerial nature photography] with [natural lighting description and atmospheric qualities]\n\n00:00:00-00:00:01: Establishing shot. [Complete scene overview - environment, landscape elements, atmospheric conditions, time of day]. Cut to first scene.\n\n00:00-00:03: [Shot type]. [Natural subject and environment]. [Camera movement]. [Natural lighting conditions]. [Composition technique]. [Natural ambient sounds]. [Transition].\n\n00:03-00:06: [Shot type]. [Natural subject and environment]. [Camera movement]. [Lighting]. [Notable visual elements]. [Ambient sounds]. [Transition].\n\n00:06-00:10: [Shot type]. [Natural subject and environment]. [Camera movement]. [Lighting]. [Atmospheric details]. [Ambient sounds conclusion]. [Final transition: hold on frame, slow fade to black].\n\n## NATURE STOCK FOOTAGE REQUIREMENTS:\n\n**SUBJECTS TO FEATURE:**\n- Landscapes: Mountains, forests, coastlines, deserts, valleys, meadows, canyons\n- Water: Ocean waves, rivers, waterfalls, lakes, rain, fog, ice\n- Sky: Clouds, sunrise, sunset, stars, aurora, dramatic weather\n- Wildlife: Birds in flight, animals in habitat (no close human interaction)\n- Flora: Trees, flowers, grass, forests, seasonal foliage\n- Weather: Storm clouds, mist, snow, wind effects, light through atmosphere\n\n**CAMERA APPROACHES:**\n- Aerial/drone shots for sweeping vistas\n- Slow dolly/tracking movements for immersion\n- Static locked shots for contemplative moments\n- Gentle pans across landscapes\n- Crane movements revealing scale\n- Steadicam through environments\n\n**LIGHTING PRIORITY:**\n- Golden hour (warm, directional)\n- Blue hour (cool, ethereal)\n- Overcast soft light (even, gentle)\n- Harsh sunlight (dramatic shadows)\n- Backlit subjects (silhouettes, rim lighting)\n- Natural volumetric light (god rays, mist)\n\n**PACING:**\n- Slow to medium pacing (3-5 seconds per shot maximum)\n- 2-3 shots total across 10 seconds\n- Contemplative, not rushed\n- Smooth transitions (dissolves, gradual fades preferred)\n\n**SOUND DESIGN:**\n- Authentic natural ambient sounds (wind, water, birds, rustling)\n- NO music unless specifically requested\n- Emphasize environmental audio richness\n- Spatial audio cues (distant/close sounds)\n\n**COLOR GRADING:**\n- Natural, rich color palette\n- Slight saturation boost for vibrancy\n- Warm or cool tones based on time of day\n- High dynamic range for sky and landscape detail\n\n## CONSTRAINTS:\n- Total duration: EXACTLY 10 seconds\n- No human presence unless environmental scale reference\n- No artificial structures unless contextually natural (old barn in field, etc.)\n- No branded elements or identifiable locations requiring releases\n- Professional, commercial-ready aesthetic\n- Versatile for multiple use cases (backgrounds, B-roll, establishing shots)\n\n## RANDOMIZATION PARAMETERS:\nVary across calls:\n- Environment type (rotate through mountain, forest, ocean, desert, meadow, etc.)\n- Time of day (sunrise, midday, sunset, twilight, night)\n- Weather conditions (clear, cloudy, misty, dramatic, stormy)\n- Season (spring bloom, summer green, autumn colors, winter snow)\n- Camera movement style (aerial, ground-level, tracking, static)\n- Dominant natural element (water, sky, earth, flora, fauna)\n\n## OUTPUT FORMAT:\nGenerate the prompt in clean, professional format with proper timestamp structure. Be specific about natural elements while leaving creative interpretation space. Focus on achievable, realistic nature cinematography that would be commercially valuable as stock footage. \n\nWhen called, output ONLY the formatted prompt - nothing else.",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "518f5546-2fd2-44c4-aade-b525aa8ec246",
      "name": "提交视频生成",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1072,
        3872
      ],
      "parameters": {
        "url": "=https://api.kie.ai/api/v1/jobs/createTask",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"sora-2-text-to-video\",\n  \"callBackUrl\": \"{{ $execution.resumeUrl }}\",\n  \"input\": {\n    \"prompt\": \"{{ JSON.stringify($('Generate Video Prompt').item.json.text.replaceAll(/\\\\n/g, '')).slice(1, -1) }}\",\n    \"aspect_ratio\": \"portrait\",\n    \"n_frames\": \"10\",\n    \"remove_watermark\": true\n  }\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "KvEry5tdcrr9vqqw",
          "name": "Vapi - Zephoric"
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "c761833c-8e83-401d-bf4e-df55804dd84a",
      "name": "等待视频完成",
      "type": "n8n-nodes-base.wait",
      "position": [
        -864,
        3872
      ],
      "webhookId": "4009d14c-7a58-4325-b445-9683a15d1ead",
      "parameters": {
        "resume": "webhook",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1.1
    },
    {
      "id": "ef4e79ae-0788-4b01-8250-e84c733c3989",
      "name": "轮询视频状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -656,
        3872
      ],
      "parameters": {
        "url": "=https://api.kie.ai/api/v1/jobs/recordInfo",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $json.body.data.taskId }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "rS4I1YjvLXTJ43S8",
          "name": "Kie AI"
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "a631c233-db2d-4087-8a65-033913926fa6",
      "name": "下载生成的视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -448,
        3872
      ],
      "parameters": {
        "url": "={{ $json.data.resultJson.parseJson().resultWaterMarkUrls.first() }}",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "228d32da-5e35-4280-bdea-ce06be80153c",
      "name": "Gemini 提示模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1360,
        4080
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "7v8o9EaQkl33woxm",
          "name": "v9"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a8432ff0-1338-44f1-96a7-b1be9f8d34cc",
      "name": "将视频发送到 Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -240,
        3872
      ],
      "webhookId": "de56c81e-10c4-466e-a73c-f74e4fbc8257",
      "parameters": {
        "chatId": "[Your Chat ID]",
        "operation": "sendVideo",
        "binaryData": true,
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "Elo6BLaLpBDVgeLW",
          "name": "LinkedIn Post"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0adb59bc-4951-4b7a-9c18-4302bc36a42f",
      "name": "注意:API 提交",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        4064
      ],
      "parameters": {
        "color": 6,
        "width": 364,
        "height": 192,
        "content": "## 🚀 提交视频生成"
      },
      "typeVersion": 1
    },
    {
      "id": "600a2abf-4dbc-4a28-90fc-23954ddcd1ef",
      "name": "注意:Webhook 等待",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        3600
      ],
      "parameters": {
        "color": 3,
        "width": 348,
        "height": 192,
        "content": "## ⏳ 等待视频完成"
      },
      "typeVersion": 1
    },
    {
      "id": "187692e1-b8d2-492a-9b21-f4281b217aaa",
      "name": "注意:Telegram 投递",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        4064
      ],
      "parameters": {
        "color": 2,
        "width": 380,
        "height": 192,
        "content": "## 📥 将视频发送到 Telegram"
      },
      "typeVersion": 1
    },
    {
      "id": "69fdcab9-d77a-4908-b7d0-8dd5fe6b9f8a",
      "name": "概述说明7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2464,
        3296
      ],
      "parameters": {
        "color": 4,
        "width": 872,
        "height": 1352,
        "content": "# 用于 Telegram 的自动化 10 秒 Sora 2 视频机器人"
      },
      "typeVersion": 1
    },
    {
      "id": "554122f5-8cc0-4b68-87f7-15c86bc26faa",
      "name": "注意:提示生成1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        3600
      ],
      "parameters": {
        "color": 5,
        "width": 332,
        "height": 192,
        "content": "## 🤖 生成视频提示"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Generate Video Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Video Status": {
      "main": [
        [
          {
            "node": "Download Generated Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Prompt Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Video Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Prompt": {
      "main": [
        [
          {
            "node": "Submit Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Await Video Completion": {
      "main": [
        [
          {
            "node": "Poll Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video Generation": {
      "main": [
        [
          {
            "node": "Await Video Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Generated Video": {
      "main": [
        [
          {
            "node": "Deliver Video to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Daniel Nkencho

Daniel Nkencho

@daniel-automates

AI Automation Consultant | Helping Business Owners Implement AI Systems for Growth and Lead Gen

外部链接
在 n8n.io 查看

分享此工作流