Gemini_NanoBanana_模板
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 36 个节点。主要使用 If, Set, Code, Wait, Switch 等节点。 使用 Fal.ai 模型(nano-banana、WAN2.2、Veo3)从 Google Sheets 生成 UGC 广告
前置要求
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
使用的节点 (36)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "ySznauhiBaq3fJaY",
"meta": {
"instanceId": "2c12b0b552404dc07af67cd5f092afd21d18c808d4fdabdb04cb4b064195b6fb",
"templateCredsSetupCompleted": true
},
"name": "Gemini_NanoBanana_模板",
"tags": [
{
"id": "vQcdMpzndwlrDhbx",
"name": "n8n_official_template",
"createdAt": "2025-07-02T13:54:20.087Z",
"updatedAt": "2025-07-02T13:54:20.087Z"
}
],
"nodes": [
{
"id": "481d7713-dea3-42e5-b37e-8c0d248aea45",
"name": "当点击“执行工作流”时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-416,
-768
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7635ea3e-e3cb-4692-8ce9-47cd715ce143",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
-752,
-784
],
"parameters": {
"width": 2064,
"height": 192,
"content": "### 🟨 区域1:创建图像"
},
"typeVersion": 1
},
{
"id": "1ed6cdf6-6efb-4194-8837-569df0756677",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
-752,
-576
],
"parameters": {
"color": 2,
"width": 2064,
"height": 240,
"content": "### 🟫 区域2:生成视频"
},
"typeVersion": 1
},
{
"id": "ff3727e9-21b6-4e75-8711-fa76c749809d",
"name": "便签说明4",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
-752,
-320
],
"parameters": {
"color": 4,
"width": 672,
"height": 656,
"content": "## 产品图像"
},
"typeVersion": 1
},
{
"id": "fab0a010-d8be-42ca-98bd-a7fd0a7e5f3d",
"name": "便签说明5",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
0,
-320
],
"parameters": {
"color": 4,
"width": 656,
"height": 656,
"content": "## 产品图像 - nano Banana"
},
"typeVersion": 1
},
{
"id": "5dbbeeda-0a98-4672-b89a-112193eb948d",
"name": "便签 6",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
768,
-320
],
"parameters": {
"color": 4,
"width": 528,
"height": 656,
"content": "## 产品视频 - Veo3"
},
"typeVersion": 1
},
{
"id": "540b8055-4c2d-478e-bbe7-996d6dd1d0b3",
"name": "便签 7",
"type": "n8n-nodes-base.stickyNote",
"disabled": true,
"position": [
-752,
-992
],
"parameters": {
"width": 2064,
"height": 192,
"content": "### 🟨 区域1:通过nano Bananna创建图像"
},
"typeVersion": 1
},
{
"id": "0d1012fe-1f69-4693-82f8-c7f2af86d76a",
"name": "获取数据1",
"type": "n8n-nodes-base.googleSheets",
"position": [
-240,
-960
],
"parameters": {
"options": {
"returnFirstMatch": true
},
"filtersUI": {
"values": [
{
"lookupColumn": "img_url"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 997043272,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit#gid=997043272",
"cachedResultName": "Gemini"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit?usp=drivesdk",
"cachedResultName": "n8n_nanoBanan_FalAI"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RVWjnYzlWor2bMu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "55f2026c-5ec4-46f2-ac99-6e9300d2cefd",
"name": "转换为文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
624,
-960
],
"parameters": {
"options": {
"fileName": "={{ $json.fileName }}",
"mimeType": "={{ $json.mimeType }}"
},
"operation": "toBinary",
"sourceProperty": "data"
},
"typeVersion": 1.1
},
{
"id": "63e86079-f906-424a-9d0a-ce4d01ad0634",
"name": "设置图像URL",
"type": "n8n-nodes-base.set",
"position": [
-80,
-960
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "044f40af-ec59-45e6-a097-678a473b7a8d",
"name": "presenter",
"type": "string",
"value": "={{ (() => { const u = $json.presenter || ''; const q = u.match(/[?&]id=([-\\w]{25,})/); const d = u.match(/\\/d\\/([-\\w]{25,})/); const any = u.match(/[-\\w]{25,}/); const id = q?.[1] || d?.[1] || (any ? any[0] : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }}"
},
{
"id": "62a409c6-c607-452b-9bbb-f3d29c86dddf",
"name": "product",
"type": "string",
"value": "={{ (() => { const u = $json.product || ''; const q = u.match(/[?&]id=([-\\w]{25,})/); const d = u.match(/\\/d\\/([-\\w]{25,})/); const any = u.match(/[-\\w]{25,}/); const id = q?.[1] || d?.[1] || (any ? any[0] : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "849a7ac8-9892-44b3-a9af-49530dd1a71e",
"name": "通过OpernRouter创建图像(gemini-2.5-flash-image-preview:free)",
"type": "n8n-nodes-base.httpRequest",
"position": [
96,
-960
],
"parameters": {
"url": "https://openrouter.ai/api/v1/chat/completions",
"method": "POST",
"options": {},
"jsonBody": "={\n \"model\": \"google/gemini-2.5-flash-image-preview:free\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"{{ $json.prompt }}\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"{{ $json.product }}\"\n }\n }\n ]\n }\n ]\n} ",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "XL3zLCDeux0bB3sM",
"name": "OpenRouter"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "ab591887-6ac9-48ee-86d1-a08e868749ab",
"name": "等待20秒",
"type": "n8n-nodes-base.wait",
"position": [
272,
-960
],
"webhookId": "f2c64d90-376c-4300-a228-9361747e8494",
"parameters": {
"amount": 10
},
"typeVersion": 1.1
},
{
"id": "6ca128d7-f859-43ad-bd73-368d6c30eee7",
"name": "设置Base64数据",
"type": "n8n-nodes-base.code",
"position": [
448,
-960
],
"parameters": {
"jsCode": "const dataUri = $json[\"choices\"][0][\"message\"][\"images\"][0][\"image_url\"][\"url\"];\nconst [meta, base64] = dataUri.split(\",\");\nconst mime = meta.match(/:(.*?);/)[1]; // ดึง image/png\nconst ext = mime.split(\"/\")[1]; // png\n\nreturn {\n data: base64,\n mimeType: mime,\n fileName: `output.${ext}`\n};\n"
},
"typeVersion": 2
},
{
"id": "d3e80f31-1fc1-4df2-8dd7-34c784f5f7d3",
"name": "上传图像到Gdrive",
"type": "n8n-nodes-base.googleDrive",
"position": [
800,
-960
],
"parameters": {
"name": "output.png",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1WUzYyF-Uo45wCLQaQRAuhsvCYC0lHJ9O",
"cachedResultUrl": "https://drive.google.com/drive/folders/1WUzYyF-Uo45wCLQaQRAuhsvCYC0lHJ9O",
"cachedResultName": "imageOutput"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "QVrgALkld7whKIgB",
"name": "Google Drive account - Peakwave"
}
},
"typeVersion": 3
},
{
"id": "2ec6e0e6-0e78-4775-84b7-41e2dee4e235",
"name": "更新图像URL",
"type": "n8n-nodes-base.googleSheets",
"position": [
976,
-960
],
"parameters": {
"columns": {
"value": {
"img_url": "={{ $json.webViewLink }}",
"product": "={{ $('Get Data1').item.json.product }}"
},
"schema": [
{
"id": "presenter",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "presenter",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "product",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "model",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "model",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "duration",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "duration",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "generate_audio",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "generate_audio",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolutio",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "resolutio",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "img_url",
"type": "string",
"display": true,
"required": false,
"displayName": "img_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "video_url",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "video_url",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"product"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 997043272,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit#gid=997043272",
"cachedResultName": "Gemini"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit?usp=drivesdk",
"cachedResultName": "n8n_nanoBanan_FalAI"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RVWjnYzlWor2bMu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "a381a991-ec85-4a9f-993b-193a5808f1d8",
"name": "HTTP 请求",
"type": "n8n-nodes-base.httpRequest",
"position": [
1024,
-576
],
"parameters": {
"url": "={{ $json.video.url }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
},
{
"id": "c393bdf9-ee80-44db-9bff-84fbc6f74d47",
"name": "上传图像到Gdrive1",
"type": "n8n-nodes-base.googleDrive",
"position": [
1168,
-576
],
"parameters": {
"name": "={{ $json.video.url }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1WUzYyF-Uo45wCLQaQRAuhsvCYC0lHJ9O",
"cachedResultUrl": "https://drive.google.com/drive/folders/1WUzYyF-Uo45wCLQaQRAuhsvCYC0lHJ9O",
"cachedResultName": "imageOutput"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "QVrgALkld7whKIgB",
"name": "Google Drive account - Peakwave"
}
},
"typeVersion": 3
},
{
"id": "bb9d425a-1dc2-4f71-a22c-a3995e6df83a",
"name": "更新视频URL",
"type": "n8n-nodes-base.googleSheets",
"position": [
1088,
-448
],
"parameters": {
"columns": {
"value": {
"product": "={{ $('Get Data').item.json.product }}",
"video_url": "={{ $json.webViewLink }}"
},
"schema": [
{
"id": "presenter",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "presenter",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "product",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "model",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "model",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "duration",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "duration",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "generate_audio",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "generate_audio",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "resolutio",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "resolutio",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "img_url",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "img_url",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "video_url",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "video_url",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"product"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 997043272,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit#gid=997043272",
"cachedResultName": "Gemini"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit?usp=drivesdk",
"cachedResultName": "n8n_nanoBanan_FalAI"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RVWjnYzlWor2bMu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "93af04aa-a869-419a-b6aa-c47cce1b9071",
"name": "调用Fal.ai API(WAN2.2)",
"type": "n8n-nodes-base.httpRequest",
"disabled": true,
"position": [
0,
-416
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/wan/v2.2-a14b/image-to-video",
"method": "=POST",
"options": {},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "=<Characters>\n{{ $json.output.characters.map(character => `<Character>\n <Name>${character.name}</Name>\n <Description>${character.description}</Description>\n</Character>`).join('\\n') }}\n</Characters>\n\n<SceneDescription>\n{{ $json.output.scene_description }}\n</SceneDescription>\n\n<CameraMovements>\n{{ $json.output.camera_movement }}\n</CameraMovements>\n\n<ObjectMovements>\n{{ $json.output.object_movements }}\n</ObjectMovements>"
},
{
"name": "num_frames",
"value": "81"
},
{
"name": "frames_per_second",
"value": "18"
},
{
"name": "resolution",
"value": "720p"
},
{
"name": "aspect_ratio",
"value": "auto"
},
{
"name": "num_inference_steps",
"value": "27"
},
{
"name": "enable_safety_checker",
"value": "true"
},
{
"name": "enable_prompt_expansion",
"value": "false"
},
{
"name": "acceleration",
"value": "regular"
},
{
"name": "guidance_scale",
"value": "3.5"
},
{
"name": "guidance_scale_2",
"value": "3.5"
},
{
"name": "shift",
"value": "5"
},
{
"name": "interpolator_model",
"value": "film"
},
{
"name": "num_interpolated_frames",
"value": "1"
},
{
"name": "adjust_fps_for_interpolation",
"value": "true"
},
{
"name": "image_url",
"value": "={{ $('Get the image').item.json.images[0].url }}"
}
]
},
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
},
{
"id": "3347378b-bcfa-4a45-94f4-f124c554e882",
"name": "分析图像",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
992,
-784
],
"parameters": {
"text": "Analyze the image: is it a product, a character, or both?\n\nIf product → return JSON:\n brand_name: (brand if visible/inferable)\n color_scheme:\n - hex: (HEX of main colors)\n name: (color name)\n font_style: (if visible)\n visible_text: |\n (all legible text exactly)\n product_type: (type of product)\n visual_description: (1–2 sentences about subject)\n\nIf character → return JSON:\n character_name: (if known/inferable)\n color_scheme:\n - hex: (HEX of main colors on outfit/character)\n name: (color name)\n outfit_style: (clothes/accessories)\n visual_description: (1–2 sentences about subject)\n\nOutput JSON only.\n",
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"resource": "image",
"imageUrls": "={{ (() => {\n // เลือกค่าแรกที่มี และ trim ช่องว่าง/ขึ้นบรรทัดใหม่\n const raw = ($json?.images?.[0]?.url ?? $json?.img_url ?? $json?.image_url ?? '')\n .toString()\n .trim();\n\n if (!raw) return '';\n\n // ถ้าไม่ใช่ Google Drive ก็ส่งออกไปเลย\n if (!raw.includes('drive.google.com')) return raw;\n\n // แยก fileId จากทั้ง 2 รูปแบบ\n const idFromPath = raw.match(/\\/d\\/([^/]+)/)?.[1];\n const idFromQuery = raw.match(/[?&]id=([^&]+)/)?.[1];\n const fileId = idFromPath ?? idFromQuery;\n\n // แปลงเป็น direct-download URL (ต้องทำไฟล์ให้ public ก่อน)\n return fileId\n ? `https://drive.google.com/uc?export=download&id=${fileId}`\n : raw;\n})() }}\n",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "28LXl50ZdQjnkMJs",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "a46204ae-c314-4489-91d8-f7196f0d6926",
"name": "获取图像",
"type": "n8n-nodes-base.httpRequest",
"position": [
800,
-784
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/nano-banana/requests/{{ $json.request_id }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "94054e50-9f19-451a-a1a3-ccc4ed31bdb4",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
608,
-720
],
"webhookId": "98549686-33c2-4bef-a176-92ead56ad0d1",
"parameters": {
"amount": 10
},
"typeVersion": 1.1
},
{
"id": "7defb174-8f13-4216-a0ac-d3e107939e71",
"name": "条件判断",
"type": "n8n-nodes-base.if",
"position": [
448,
-768
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "38f5427f-4fc7-4c07-87d5-fa7f5964deb2",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "=COMPLETED"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "ddaabbef-87d4-48a0-9d73-67941198e0f7",
"name": "获取图像状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
288,
-768
],
"parameters": {
"url": "={{ $json.status_url }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
},
{
"id": "f5d5d006-02e2-4ddc-88f4-53ed734e9834",
"name": "调用Fal.ai API(nannoBanana)",
"type": "n8n-nodes-base.httpRequest",
"position": [
112,
-768
],
"parameters": {
"url": "=https://queue.fal.run/fal-ai/{{ $('Get Data').item.json.model }}/edit",
"method": "=POST",
"options": {},
"jsonBody": "={\n \"prompt\": \"{{ $json.prompt }}\",\n \"image_urls\": [\n \"{{ $json.product }}\"\n ],\n \"num_images\": 1,\n \"output_format\": \"jpeg\"\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
},
{
"id": "d78f1556-3f05-4000-8bfe-65feab4d1a6d",
"name": "编辑字段",
"type": "n8n-nodes-base.set",
"position": [
-64,
-768
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "044f40af-ec59-45e6-a097-678a473b7a8d",
"name": "presenter",
"type": "string",
"value": "={{ (() => { const u = $json.presenter || ''; const q = u.match(/[?&]id=([-\\w]{25,})/); const d = u.match(/\\/d\\/([-\\w]{25,})/); const any = u.match(/[-\\w]{25,}/); const id = q?.[1] || d?.[1] || (any ? any[0] : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }}"
},
{
"id": "62a409c6-c607-452b-9bbb-f3d29c86dddf",
"name": "product",
"type": "string",
"value": "={{ (() => { const u = $json.product || ''; const q = u.match(/[?&]id=([-\\w]{25,})/); const d = u.match(/\\/d\\/([-\\w]{25,})/); const any = u.match(/[-\\w]{25,}/); const id = q?.[1] || d?.[1] || (any ? any[0] : ''); return id ? 'https://drive.google.com/uc?export=view&id=' + id : ''; })() }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "7179d640-378b-428c-bd04-defc8e7eab01",
"name": "获取数据",
"type": "n8n-nodes-base.googleSheets",
"position": [
-240,
-768
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupColumn": "video_url"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 658195685,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit#gid=658195685",
"cachedResultName": "nanoBanana"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1-oeo9nsFGfDUTh2OVXo1bHeoY1JBvSQx5IbDAH37epY/edit?usp=drivesdk",
"cachedResultName": "n8n_nanoBanan_FalAI"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "0RVWjnYzlWor2bMu",
"name": "Google Sheets account"
}
},
"typeVersion": 4.6
},
{
"id": "27447a25-46b9-4eed-8098-8a9a31dcdd9b",
"name": "描述每个视频场景",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-336,
-560
],
"parameters": {
"text": "=You are a Video Scene Prompt Generator for Veo3. \nYour job is to take the scene input below and expand it into a detailed 5-second video description, following these rules:\n\n1. Use the scene input as the core reference. Do not remove or alter product names, logos, or visible text from the reference image.\n2. Expand the description into a natural, realistic **UGC-style video scene**. The output must feel authentic, casual, and human-made (like a phone video).\n3. Break down the scene into these sections:\n - Characters: List all characters in the scene with age, attire, appearance, posture, emotion, and what they are doing.\n - Scene Background: Describe the environment in detail (location, lighting, colors, props, atmosphere, time of day).\n - Camera Movement: Describe how the camera moves (handheld, selfie, panning, zooming, tilt, etc.), as if filmed on a smartphone.\n - Movement in Scene: Show how the character(s) and product interact or move naturally in the 5-second clip.\n - Sound Design: Suggest casual voice/dialogue (under 150 characters, natural & authentic tone), plus ambient sounds or background noise that fit the scene.\n\n4. The **dialogue** should sound natural, short, and conversational (like talking to a friend), not scripted or commercial. \n5. Keep everything **photorealistic** and authentic, not overly polished or cinematic. Emphasize realism and relatability.\n\nScene Input (from previous step):\n{{ $json.content }}\n\nReturn your answer in **plain text** exactly in the following structure (no JSON, no extra commentary):\n\nCharacters:\n- ...\n- ...\n\nScene Background: ...\nCamera Movement: ...\nMovement in Scene: ...\nSound Design: ...\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "4b806043-08c4-4b6a-bbba-cbde55d56007",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
176,
-560
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "90904d65-9d1f-42e9-beef-3199462d7cff",
"name": "获取视频",
"type": "n8n-nodes-base.httpRequest",
"position": [
864,
-528
],
"parameters": {
"url": "={{ $('Loop Over Items').item.json.response_url }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"retryOnFail": true,
"typeVersion": 4.2,
"alwaysOutputData": false
},
{
"id": "0b24a2a7-6339-4baf-90d7-0f0875870ee4",
"name": "视频状态",
"type": "n8n-nodes-base.switch",
"position": [
672,
-512
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "COMPLETED",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6fc5bea4-1567-474b-bfca-5394eb303217",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "COMPLETED"
}
]
},
"renameOutput": true
},
{
"outputKey": "IN_PROGRESS",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0882f634-2472-4d24-a1c3-a39f0cd94855",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "IN_PROGRESS"
}
]
},
"renameOutput": true
},
{
"outputKey": "IN_QUEUE",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e6c8b207-13ac-4537-8c5c-677039bc2fef",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "IN_QUEUE"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "de378e60-155a-46cc-848f-f106c21827c1",
"name": "获取视频状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
512,
-512
],
"parameters": {
"url": "={{ $('Loop Over Items').item.json.status_url }}",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
},
{
"id": "1b1be4c2-7825-41fb-9d0c-8bbedab5335c",
"name": "等待视频",
"type": "n8n-nodes-base.wait",
"position": [
352,
-512
],
"webhookId": "5620e17d-ec9f-4eb0-86dd-2d495f54cbf9",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "a0830568-00ba-473d-9cf4-70b55204a81b",
"name": "结构化输出解析器 2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-288,
-432
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"characters\": {\n \"type\": \"array\",\n \"description\": \"the list of characters in the scene\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"description\": \"the name of the character\"\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"the detailed description of the character (visual outlook)\"\n }\n },\n \"required\": [\n \"name\",\n \"description\"\n ]\n }\n },\n \"scene_description\": {\n \"type\": \"string\",\n \"description\": \"the detailed description of the scene\"\n },\n \"camera_movement\": {\n \"type\": \"string\",\n \"description\": \"the description of the camera movement (if any)\"\n },\n \"object_movements\": {\n \"type\": \"string\",\n \"description\": \"the detailed description of the movement of the objects on the screen\"\n },\n \"sound_effects\": {\n \"type\": \"string\",\n \"description\": \"the sound effects the viewer can hear during the scene\"\n }\n },\n \"required\": [\n \"characters\",\n \"scene_description\",\n \"camera_movement\",\n \"object_movements\",\n \"sound_effects\"\n ]\n}"
},
"typeVersion": 1.2
},
{
"id": "c999283b-e187-4cf0-a35b-7dfa980a97b2",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-368,
-432
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "28LXl50ZdQjnkMJs",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "ae94893c-3604-40a3-acd0-6959adb68c23",
"name": "Veo3",
"type": "n8n-nodes-base.httpRequest",
"position": [
0,
-560
],
"parameters": {
"url": "https://queue.fal.run/fal-ai/veo3/image-to-video",
"method": "POST",
"options": {},
"jsonBody": "={\n \"prompt\": \"{{ $json.output.characters[0].description }}{{ $json.output.scene_description }}{{ $json.output.camera_movement }}{{ $json.output.object_movements }}{{ $json.output.sound_effects }}\",\n \"image_url\": \"{{ $('Get the image').item.json.images[0].url }}\",\n \"duration\": \"8s\",\n \"generate_audio\": true,\n \"resolution\": \"720p\"\n }",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "8aXZ3G10Qvvsc8FY",
"name": "Fal AI"
}
},
"typeVersion": 4.2
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "86a8a9cb-697d-4e5f-99ee-f40cc55b8081",
"connections": {
"If": {
"main": [
[
{
"node": "Get the image",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Veo3": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get image status",
"type": "main",
"index": 0
}
]
]
},
"Get Data": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Get Data1": {
"main": [
[
{
"node": "setImgeURL",
"type": "main",
"index": 0
}
]
]
},
"wait20sec": {
"main": [
[
{
"node": "setBase64data",
"type": "main",
"index": 0
}
]
]
},
"setImgeURL": {
"main": [
[
{
"node": "CreateImagebyOpernRouter (gemini-2.5-flash-image-preview:free)",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Call Fal.ai API (nannoBanana)",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "uploadImagetoGdrive1",
"type": "main",
"index": 0
}
]
]
},
"Video status": {
"main": [
[
{
"node": "Get the video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait for the video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait for the video",
"type": "main",
"index": 0
}
]
]
},
"Analyze image": {
"main": [
[
{
"node": "Describe Each Scene for Video",
"type": "main",
"index": 0
}
]
]
},
"Get the image": {
"main": [
[
{
"node": "Analyze image",
"type": "main",
"index": 0
}
]
]
},
"setBase64data": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Get the video": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"updateImageURL": {
"main": [
[]
]
},
"Convert to File": {
"main": [
[
{
"node": "uploadImagetoGdrive",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait for the video",
"type": "main",
"index": 0
}
]
]
},
"Get image status": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Structured Output Parser2",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Describe Each Scene for Video",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wait for the video": {
"main": [
[
{
"node": "Get the video status",
"type": "main",
"index": 0
}
]
]
},
"uploadImagetoGdrive": {
"main": [
[
{
"node": "updateImageURL",
"type": "main",
"index": 0
}
]
]
},
"Get the video status": {
"main": [
[
{
"node": "Video status",
"type": "main",
"index": 0
}
]
]
},
"uploadImagetoGdrive1": {
"main": [
[
{
"node": "updateVideoURL",
"type": "main",
"index": 0
}
]
]
},
"Call Fal.ai API (WAN2.2)": {
"main": [
[]
]
},
"Structured Output Parser2": {
"ai_outputParser": [
[
{
"node": "Describe Each Scene for Video",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Call Fal.ai API (nannoBanana)": {
"main": [
[
{
"node": "Get image status",
"type": "main",
"index": 0
}
]
]
},
"Describe Each Scene for Video": {
"main": [
[
{
"node": "Veo3",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Get Data",
"type": "main",
"index": 0
}
]
]
},
"CreateImagebyOpernRouter (gemini-2.5-flash-image-preview:free)": {
"main": [
[
{
"node": "wait20sec",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Multi_Ad_Image
使用Fal.ai和OpenAI从Google表格生成AI产品广告图像
If
Set
Wait
+10
22 节点Jaruphat J.
内容创作
FalAI_SeeDanceV1.0_英文模板
使用GPT-4o、Fal.AI Seedance和音频从文本提示生成电影级视频
If
Code
Wait
+12
38 节点Jaruphat J.
内容创作
WordPress博客自动化专业版(深度研究)v2.1市场
使用GPT-4o、Perplexity AI和多语言支持自动化SEO优化的博客创建
If
Set
Xml
+27
125 节点Daniel Ng
内容创作
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作,适用于视频、播客和 ASMR
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作,适用于视频、播客和 ASMR
Set
Code
Wait
+16
97 节点Adam Crafts
内容创作
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
批量SEO内容生成与带AI图片的Webflow草稿创建(模板)
使用GPT、Gemini图片和Webflow草稿创建进行批量SEO内容生成
If
Set
Code
+18
54 节点Dahiana
内容创作
工作流信息
难度等级
高级
节点数量36
分类2
节点类型16
作者
Jaruphat J.
@jaruphatjProject Manager who passionate about Automation & AI and continuously explore innovative ways to improve business processes through intelligent workflow automation. Let’s connect and automate the future!
外部链接
在 n8n.io 查看 →
分享此工作流