8
n8n 中文网amn8n.com

UGC - 截图→Gemini→Sora2→VBR(竖版)

高级

这是一个自动化工作流,包含 39 个节点。主要使用 If, Set, Code, Wait, Merge 等节点。 使用Gemini、Sora 2和VideoBGRemover从应用录屏制作UGC广告

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "name": "UGC – 截图→Gemini→Sora2→VBR(竖版)",
  "nodes": [
    {
      "id": "webhook",
      "name": "Webhook触发器",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1520,
        40
      ],
      "parameters": {
        "path": "ugc-screenshot-video",
        "options": {
          "responseData": "allEntries"
        },
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "manual-trigger",
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1520,
        280
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "sticky-overview",
      "name": "📋 概述",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1980,
        -320
      ],
      "parameters": {
        "width": 520,
        "height": 620,
        "content": "## 🎬 AI UGC 广告生成器"
      },
      "typeVersion": 1,
      "notesTextSize": "large",
      "notesBackgroundColor": 4
    },
    {
      "id": "sticky-api-keys",
      "name": "🔑 API 密钥",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1520,
        -320
      ],
      "parameters": {
        "width": 420,
        "height": 480,
        "content": "## 🔑 API 密钥设置(必需)"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-inputs",
      "name": "📥 输入",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1060,
        -320
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "## 📥 所需输入"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-workflow",
      "name": "🔄 工作流",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -600,
        -320
      ],
      "parameters": {
        "width": 420,
        "height": 520,
        "content": "## 🔄 工作流步骤"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-sora-structure",
      "name": "📝 Sora 提示词",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -320
      ],
      "parameters": {
        "width": 460,
        "height": 340,
        "content": "## 🎯 Sora 提示词结构"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-gdrive",
      "name": "💾 Google Drive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -320
      ],
      "parameters": {
        "width": 380,
        "height": 340,
        "content": "## 💾 Google Drive 设置"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-usage",
      "name": "🚀 使用",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        860,
        -320
      ],
      "parameters": {
        "width": 420,
        "height": 480,
        "content": "## 🚀 使用方法"
      },
      "typeVersion": 1
    },
    {
      "id": "extract-webhook",
      "name": "提取Webhook数据",
      "type": "n8n-nodes-base.set",
      "position": [
        -1300,
        40
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "screenshot_video_url",
              "type": "string",
              "value": "={{ $json.body?.screenshot_video_url ?? $json.screenshot_video_url }}"
            },
            {
              "name": "meta",
              "type": "object",
              "value": "={{ $json.body?.meta ?? $json.meta ?? {} }}"
            },
            {
              "name": "store_to_drive",
              "type": "boolean",
              "value": "={{ $json.body?.store_to_drive ?? $json.store_to_drive ?? false }}"
            },
            {
              "name": "reference_image_url",
              "type": "string",
              "value": "={{ $json.body?.reference_image_url ?? $json.reference_image_url ?? '' }}"
            },
            {
              "name": "source",
              "type": "string",
              "value": "webhook"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "sample-input",
      "name": "示例输入(在此编辑)",
      "type": "n8n-nodes-base.set",
      "position": [
        -1300,
        280
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "screenshot_video_url",
              "type": "string",
              "value": "https://videos.videobgremover.com/public-videos/assets/screenrecord_video_affina.mp4"
            },
            {
              "name": "meta",
              "type": "object",
              "value": "={{ {product_name: 'Sample App', benefits: ['Easy to use', 'Fast', 'Powerful'], tone: 'friendly'} }}"
            },
            {
              "name": "store_to_drive",
              "type": "boolean",
              "value": true
            },
            {
              "name": "reference_image_url",
              "type": "string",
              "value": ""
            },
            {
              "name": "source",
              "type": "string",
              "value": "manual"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "merge-triggers",
      "name": "合并触发器",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1080,
        160
      ],
      "parameters": {
        "mode": "append",
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "sticky-section-gemini",
      "name": "部分:Gemini",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        380
      ],
      "parameters": {
        "width": 1100,
        "height": 100,
        "content": "## 🤖 GEMINI AI 分析部分"
      },
      "typeVersion": 1,
      "notesBackgroundColor": 5
    },
    {
      "id": "download-shot",
      "name": "下载截图视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -860,
        460
      ],
      "parameters": {
        "url": "={{ $json.screenshot_video_url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "gemini-upload",
      "name": "上传到 Gemini",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -640,
        460
      ],
      "parameters": {
        "url": "=https://generativelanguage.googleapis.com/upload/v1beta/files?key={{ $vars.GEMINI_KEY }}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Goog-Upload-Command",
              "value": "start, upload, finalize"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Length",
              "value": "={{ $binary.data.fileSize }}"
            },
            {
              "name": "X-Goog-Upload-Header-Content-Type",
              "value": "=video/{{ $binary.data.fileExtension }}"
            },
            {
              "name": "Content-Type",
              "value": "video/mp4"
            }
          ]
        },
        "inputDataFieldName": "=data"
      },
      "typeVersion": 4.2
    },
    {
      "id": "wait-gemini",
      "name": "等待处理",
      "type": "n8n-nodes-base.wait",
      "position": [
        -420,
        460
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "gemini-analyze",
      "name": "Gemini – 分析与规划",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -180,
        460
      ],
      "parameters": {
        "url": "=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent?key={{ $vars.GEMINI_KEY }}",
        "method": "POST",
        "jsonBody": "={\n  \"contents\": [{\n    \"role\": \"user\",\n    \"parts\": [\n      {\n        \"fileData\": {\n          \"fileUri\": \"{{ $('Upload to Gemini').item.json.file.uri }}\",\n          \"mimeType\": \"{{ $('Upload to Gemini').item.json.file.mimeType }}\"\n        }\n      },\n      {\n        \"text\": \"You are a UGC ad planner. Analyze this vertical app-screen recording (<=12s) and create a facecam UGC ad structure.\\n\\nObserve the recording and infer: who uses this, what they want, where frustration occurs, why it matters.\\n\\nReturn strict JSON:\\n{\\n  ad_topic: \\\"Short description of what app/feature is being promoted (e.g. 'Hinge unlimited likes upgrade')\\\",\\n  icp_summary: \\\"One sentence describing the target user and their core frustration\\\",\\n  ad_structure: {\\n    hook_0_2s: \\\"Opening line that stops scroll (5-8 words max)\\\",\\n    problem_2_6s: \\\"One brief sentence about the problem (12-15 words max)\\\",\\n    solution_6_10s: \\\"Present the fix with product name and benefit (12-15 words max)\\\",\\n    cta_10_12s: \\\"Clear call-to-action (5-8 words max)\\\"\\n  },\\n  visual_details: \\\"Describe actor (age, gender, wardrobe), setting (location, lighting, background), and camera style (framing, movement)\\\",\\n  emotional_journey: \\\"Brief description of how emotions change: starting state (0-2s), middle escalation (2-6s), resolution (6-12s)\\\",\\n  duration: 4 or 8 or 12\\n}\\n\\nUse meta if provided: product_name, benefits[], tone.\\nDo NOT add extra fields. Keep all fields concise.\"\n      }\n    ]\n  }],\n  \"generationConfig\": {\n    \"temperature\": 0.7,\n    \"topK\": 40,\n    \"topP\": 0.95,\n    \"maxOutputTokens\": 8192\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "extract-plan",
      "name": "提取与解析",
      "type": "n8n-nodes-base.code",
      "position": [
        60,
        460
      ],
      "parameters": {
        "jsCode": "// Extract raw text from Gemini response\nconst rawText = $input.item.json.candidates[0].content.parts[0].text;\n\n// Remove markdown code blocks\nconst cleanJson = rawText.replace(/```json\\n?/g, '').replace(/\\n?```/g, '').trim();\n\n// Parse the JSON\nconst data = JSON.parse(cleanJson);\n\n// Return the structured data\nreturn {\n  json: {\n    ad_topic: data.ad_topic,\n    icp_summary: data.icp_summary,\n    ad_structure: data.ad_structure,\n    visual_details: data.visual_details,\n    emotional_journey: data.emotional_journey,\n    duration: data.duration || 8\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "sticky-section-sora",
      "name": "部分:Sora 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        680
      ],
      "parameters": {
        "width": 940,
        "height": 100,
        "content": "## 🎨 SORA 2 AI 视频生成部分"
      },
      "typeVersion": 1,
      "notesBackgroundColor": 6
    },
    {
      "id": "build-sora-prompt",
      "name": "构建 Sora 提示词",
      "type": "n8n-nodes-base.code",
      "position": [
        300,
        760
      ],
      "parameters": {
        "jsCode": "// Build Sora prompt following the structure:\n// [ICP/visual] filming a UGC ad about [APP CONTEXT]. They start by saying [hook], then explain [problem], present the solution: [solution], and end with [CTA]. [Emotional journey]. [Camera style]. Natural hand gestures and expressions.\n\nconst visual = $input.item.json.visual_details;\nconst emotions = $input.item.json.emotional_journey;\nconst ad = $input.item.json.ad_structure;\nconst topic = $input.item.json.ad_topic;\n\n// Extract camera style from visual_details (usually at the end)\nconst cameraStyle = visual.includes('camera') ? visual.split('.').find(s => s.toLowerCase().includes('camera'))?.trim() || 'Handheld selfie-style close-up' : 'Handheld selfie-style close-up';\n\n// Build the person description (without camera details)\nconst personDescription = visual.split('.').filter(s => !s.toLowerCase().includes('camera')).join('.').trim();\n\nconst soraPrompt = `${personDescription} filming a UGC ad about ${topic}. They start by saying: ${ad.hook_0_2s}. Then explain: ${ad.problem_2_6s}. Present the solution: ${ad.solution_6_10s}. And end with: ${ad.cta_10_12s}. ${emotions}. ${cameraStyle}. Natural hand gestures and authentic expressions throughout. Raw selfie video of ONLY the person talking - no text overlays, no app UI, no graphics, no split-screen. Just the speaker.`;\n\nreturn {\n  json: {\n    sora_prompt: soraPrompt,\n    duration: $input.item.json.duration\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "sora-submit",
      "name": "Sora 2 – 提交(fal.ai)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        520,
        760
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/sora-2/text-to-video",
        "method": "POST",
        "jsonBody": "={\n  \"prompt\": \"{{ $json.sora_prompt }}\",\n  \"aspect_ratio\": \"9:16\",\n  \"resolution\": \"720p\",\n  \"duration\": {{ $json.duration }}\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $vars.FAL_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "sora-status",
      "name": "Sora – 检查状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        740,
        760
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $json.request_id }}/status",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $vars.FAL_KEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "wait-20",
      "name": "等待20秒",
      "type": "n8n-nodes-base.wait",
      "position": [
        960,
        860
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "if-sora-done",
      "name": "Sora 完成?",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        760
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ok",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "sora-result",
      "name": "Sora – 获取结果",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1180,
        760
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/sora-2/requests/{{ $('Sora 2 – Submit (fal.ai)').item.json.request_id }}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Key {{ $vars.FAL_KEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "sticky-section-vbr",
      "name": "部分:VideoBGRemover",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        980
      ],
      "parameters": {
        "width": 1240,
        "height": 100,
        "content": "## 🎬 VIDEOBGREMOVER 合成部分"
      },
      "typeVersion": 1,
      "notesBackgroundColor": 2
    },
    {
      "id": "vbr-create",
      "name": "VBR – 创建任务(前景=Sora)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1400,
        1060
      ],
      "parameters": {
        "url": "https://api.videobgremover.com/api/v1/jobs",
        "method": "POST",
        "jsonBody": "={ \n  \"video_url\": \"{{ $json.video.url }}\" \n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "vbr-start",
      "name": "VBR – 开始合成",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1620,
        1060
      ],
      "parameters": {
        "url": "=https://api.videobgremover.com/api/v1/jobs/{{ $json.id }}/start",
        "method": "POST",
        "jsonBody": "={\n  \"background\": {\n    \"type\": \"composition\",\n    \"composition\": {\n      \"template\": \"ai_ugc_ad\",\n      \"background_type\": \"video\",\n      \"background_url\": \"{{ $('Merge Triggers').item.json.screenshot_video_url }}\",\n      \"background_audio_enabled\": true,\n      \"background_audio_volume\": 0.3,\n      \"export_format\": \"h264\",\n      \"export_preset\": \"medium\"\n    }\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "vbr-status",
      "name": "VBR – 检查状态",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1840,
        1060
      ],
      "parameters": {
        "url": "=https://api.videobgremover.com/api/v1/jobs/{{ $('VBR – Create Job (Foreground=Sora)').item.json.id }}/status",
        "method": "GET",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "={{ $vars.VIDEOBGREMOVER_KEY }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "wait-20b",
      "name": "等待 20 秒(VBR)",
      "type": "n8n-nodes-base.wait",
      "position": [
        2060,
        1160
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "if-vbr-done",
      "name": "VBR 完成?",
      "type": "n8n-nodes-base.if",
      "position": [
        2060,
        1060
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "done",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "prepare-final",
      "name": "准备最终 URL",
      "type": "n8n-nodes-base.set",
      "position": [
        2280,
        1060
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "final_url",
              "type": "string",
              "value": "={{ $json.processed_video_url }}"
            },
            {
              "name": "length_seconds",
              "type": "number",
              "value": "={{ $json.length_seconds ?? $json.meta?.duration }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "sticky-section-output",
      "name": "部分:输出",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2480,
        1280
      ],
      "parameters": {
        "width": 900,
        "height": 100,
        "content": "## 💾 输出部分"
      },
      "typeVersion": 1,
      "notesBackgroundColor": 3
    },
    {
      "id": "download-final",
      "name": "下载最终视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2480,
        1360
      ],
      "parameters": {
        "url": "={{ $('Prepare Final URL').item.json.final_url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "gdrive-upload",
      "name": "上传到 Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2700,
        1360
      ],
      "parameters": {
        "name": "=ugc_final_{{ new Date().getTime() }}.mp4",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {
          "simplifyOutput": true
        },
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "root"
        },
        "operation": "upload",
        "binaryPropertyName": "data"
      },
      "typeVersion": 3
    },
    {
      "id": "build-drive-resp",
      "name": "构建 Drive 响应",
      "type": "n8n-nodes-base.set",
      "position": [
        2920,
        1360
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "response",
              "type": "object",
              "value": "={{ { url: $json.webViewLink, drive_file_id: $json.id, source: 'google_drive' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "if-webhook",
      "name": "来自Webhook?",
      "type": "n8n-nodes-base.if",
      "position": [
        3140,
        1460
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "is-webhook",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Merge Triggers').item.json.source }}",
              "rightValue": "webhook"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "respond",
      "name": "响应 Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3360,
        1360
      ],
      "parameters": {
        "responseBody": "={{ $json.response ?? $json }}",
        "responseCode": 200
      },
      "typeVersion": 1.1
    },
    {
      "id": "manual-complete",
      "name": "手动测试完成",
      "type": "n8n-nodes-base.set",
      "position": [
        3360,
        1560
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response ?? $json }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Wait 20s": {
      "main": [
        [
          {
            "node": "Sora – Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "From Webhook?": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Manual Test Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Sample Input (Edit Here)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Triggers": {
      "main": [
        [
          {
            "node": "Download Screenshot Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VBR Completed?": {
      "main": [
        [
          {
            "node": "Prepare Final URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20s (VBR)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 20s (VBR)": {
      "main": [
        [
          {
            "node": "VBR – Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract & Parse": {
      "main": [
        [
          {
            "node": "Build Sora Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sora Completed?": {
      "main": [
        [
          {
            "node": "Sora – Get Result",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook Trigger": {
      "main": [
        [
          {
            "node": "Extract Webhook Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Gemini": {
      "main": [
        [
          {
            "node": "Wait for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Sora Prompt": {
      "main": [
        [
          {
            "node": "Sora 2 – Submit (fal.ai)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Final URL": {
      "main": [
        [
          {
            "node": "Download Final Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sora – Get Result": {
      "main": [
        [
          {
            "node": "VBR – Create Job (Foreground=Sora)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Processing": {
      "main": [
        [
          {
            "node": "Gemini – Analyze & Plan",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Drive Response": {
      "main": [
        [
          {
            "node": "From Webhook?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Final Video": {
      "main": [
        [
          {
            "node": "Upload to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Webhook Data": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VBR – Check Status": {
      "main": [
        [
          {
            "node": "VBR Completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sora – Check Status": {
      "main": [
        [
          {
            "node": "Sora Completed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload to Google Drive": {
      "main": [
        [
          {
            "node": "Build Drive Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sample Input (Edit Here)": {
      "main": [
        [
          {
            "node": "Merge Triggers",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Download Screenshot Video": {
      "main": [
        [
          {
            "node": "Upload to Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini – Analyze & Plan": {
      "main": [
        [
          {
            "node": "Extract & Parse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VBR – Start Composition": {
      "main": [
        [
          {
            "node": "VBR – Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sora 2 – Submit (fal.ai)": {
      "main": [
        [
          {
            "node": "Sora – Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VBR – Create Job (Foreground=Sora)": {
      "main": [
        [
          {
            "node": "VBR – Start Composition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级

需要付费吗?

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

工作流信息
难度等级
高级
节点数量39
分类-
节点类型11
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流