8
n8n 中文网amn8n.com

使用 GPT-4.1、Dumpling FLUX.1 Pro 和 Veo 3 将文本创意转化为电影级视频

中级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Code, Wait, FormTrigger, HttpRequest 等节点。 使用GPT-4、Dumpling FLUX.1 Pro和Veo 3将文本转换为电影级视频

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "NyFrooSCpKENZbDP",
  "meta": {
    "instanceId": "a1ae5c8dc6c65e674f9c3947d083abcc749ef2546dff9f4ff01de4d6a36ebfe6",
    "templateCredsSetupCompleted": true
  },
  "name": "使用 GPT-4.1、Dumpling FLUX.1 Pro 和 Veo 3 将文本创意转化为电影级视频",
  "tags": [],
  "nodes": [
    {
      "id": "112e36a4-2eb3-47f2-ae2c-1d3c6e1d2a76",
      "name": "捕获图像创意",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -496,
        48
      ],
      "webhookId": "b4ffe220-2fd9-44ce-aec1-b2aee57ddf35",
      "parameters": {
        "options": {},
        "formTitle": "Video Content ideas",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Image Ideas",
              "requiredField": true
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0d117860-fbd4-4468-b102-8277e47d4ef5",
      "name": "生成图像提示(GPT-4.1)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -272,
        48
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "\"You will receive a short image idea. Expand it into a full, descriptive prompt suitable for high quality image generation. Make it vivid, creative, and detailed by including environment, style, mood, lighting, perspective, and relevant artistic details. Keep it under 3 sentences. Do not add camera technical jargon unless it naturally enhances the scene. Output only the refined prompt, nothing else.\"\n\nExample input:\nIdea: A Chef Cat cooking Seafood\n\nExample output:\n\"A fluffy orange cat dressed as a professional chef stands in a bright kitchen, skillfully cooking seafood in a steaming pan, with vibrant colors, warm lighting, and a playful yet cinematic atmosphere.\""
            },
            {
              "content": "=image idea: {{ $json['Image Ideas'] }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "dd8NvMC6rvx8RITo",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "44921974-00da-46e8-bfe2-c8df7e5a6229",
      "name": "使用 Dumpling AI 生成图像(FLUX.1 Pro)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        48
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/generate-ai-image",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"FLUX.1-pro\",\n  \"input\": {\n    \"prompt\": \"{{ $json.message.content }}\",\n    \"aspect_ratio\": \"16:9\",\n    \"output_format\":\"jpg\"\n  }\n  }",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "RLFzAcGRepr5eXZB",
          "name": "Dumpling AI-n8n"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "261174d3-5935-422b-862e-5ba340e8157d",
      "name": "生成视频提示(GPT-4o)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        304,
        48
      ],
      "parameters": {
        "text": "=Analyze the single image provided. Describe only what is visible. Create a short video prompt for Veo 3 that turns this image into a realistic 8 second clip with matching spoken dialogue. Respect these rules:\n\nOne scene only, no cuts, no scene changes.\n\nDescribe the setting, the visible subject, and a single action that fits the image.\n\nAdd one natural dialogue line the subject would say that matches the action.\n\nKeep the dialogue under 16 words.\n\nSpecify camera motion in simple terms, for example slow push in, slow pan left, or static.\n\nAdd style notes in a few words, for example warm lighting, indoor kitchen, realistic texture.\n\nDo not invent new characters, objects, or locations that are not in the image.\n\nOutput in this exact format, nothing else:\n\nScene: <one sentence that matches the image>\nAction for 8s: <one simple action that fits the image>\nDialogue: “<one short line the subject would say>”\nCamera: <one simple motion or static>\nStyle: <3 to 6 short descriptors>\nAudio notes: <very short note for ambient sound, for example kitchen sizzle, street ambience>”\n\nExample of a good output the model should follow:\n\nScene: A home kitchen with a person at the stove stirring a pan of seafood.\nAction for 8s: The person keeps stirring while steam rises and plates are set beside the stove.\nDialogue: “I am cooking garlic butter shrimp with fresh herbs.”\nCamera: Slow push in.\nStyle: Warm lighting, clean counters, realistic texture.\nAudio notes: Soft sizzle, quiet room tone.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "resource": "image",
        "imageUrls": "={{ $json.images[0].url }}",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "id": "dd8NvMC6rvx8RITo",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a6d7dea6-9226-4ef1-8a37-4663f0eb2d81",
      "name": "将图像上传到 KIE API 以供 Veo 3 使用",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        48
      ],
      "parameters": {
        "url": "https://kieai.redpandaai.co/api/file-url-upload",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"fileUrl\": \"{{ $('Generate Image (FLUX.1 Pro) with Dumpling AI').item.json.images[0].url }}\",\n  \"uploadPath\": \"images\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "WijpUT5YZUeu1xCS",
          "name": "VEO 3"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9695a75e-af03-4c7d-a528-3d997af849b8",
      "name": "清理视频提示(移除 \\n)",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        48
      ],
      "parameters": {
        "jsCode": "const analyzeImageItems = $(\"Generate Video Prompt (GPT-4o)\").all();\n\nconst cleanedItems = analyzeImageItems.map((item) => {\n  item.json.content = item.json.content.replace(/\\n/g, \"\");\n  return item;\n});\n\nreturn cleanedItems;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "fe494740-a887-47a7-9313-f6f7259959ae",
      "name": "使用 KIE API 生成视频(Veo 3)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        976,
        48
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/generate ",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"prompt\": \"{{ $json.content }}\",\n  \"imageUrls\": [\n    \"{{ $('Upload Image to KIE API for Veo 3').item.json.data.downloadUrl }}\"\n  ],\n  \"model\": \"veo3_fast\",\n  \"aspectRatio\": \"16:9\",\n  \"seeds\": 12345,\n  \"enableFallback\": false,\n  \"enableTranslation\": true\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "WijpUT5YZUeu1xCS",
          "name": "VEO 3"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5bb04c5e-df2e-407c-9781-fd15458455d7",
      "name": "等待视频处理(80秒)",
      "type": "n8n-nodes-base.wait",
      "position": [
        1200,
        48
      ],
      "webhookId": "118d2c1b-6b43-4dd1-a546-29a899b527a7",
      "parameters": {
        "amount": 80
      },
      "typeVersion": 1.1
    },
    {
      "id": "55660f52-b28f-43d9-9e35-0f411005be10",
      "name": "检查视频状态(Veo 3)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1424,
        48
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/veo/get-1080p-video",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{ $('Generate Video (Veo 3) with KIE API').item.json.data.taskId }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "WijpUT5YZUeu1xCS",
          "name": "VEO 3"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "22f2ef8c-9f81-49e7-994b-3c0a2cfb4741",
      "name": "视频就绪?",
      "type": "n8n-nodes-base.if",
      "position": [
        1648,
        -32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ab8ad299-0ea0-4370-ba3b-dce5884560f1",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.code }}",
              "rightValue": 200
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8a264507-fd0b-41f4-becb-edd18a3d0654",
      "name": "重试延迟(20秒)",
      "type": "n8n-nodes-base.wait",
      "position": [
        1872,
        144
      ],
      "webhookId": "16c53c0f-bcf3-482b-ac5b-a524209d38ea",
      "parameters": {
        "amount": 20
      },
      "typeVersion": 1.1
    },
    {
      "id": "b30c69df-c47b-4c31-8d71-4eba79da4025",
      "name": "记录到 Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1872,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {
            "Idea": "={{ $('Capture Image Idea').item.json['Image Ideas'] }}",
            "Video Created": "={{ $json.data.result_url }}",
            "Prompt USED for Image": "={{ $('Generate Image Prompt (GPT-4.1)').item.json.message.content }}",
            "Prompt USED for Video": "={{ $('Generate Video Prompt (GPT-4o)').item.json.content }}"
          },
          "schema": [
            {
              "id": "Idea",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Idea",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Prompt USED for Image",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Prompt USED for Image",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Prompt USED for Video",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Prompt USED for Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video Created",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video Created",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SemZL-VgxdTHQpXRSZ-YMhJx-IQ78qmsBQ6pSGSgcGY/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1SemZL-VgxdTHQpXRSZ-YMhJx-IQ78qmsBQ6pSGSgcGY/edit?usp=drivesdk",
          "cachedResultName": "VeO 3 Videos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GaJqJHuS5mQxap7q",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a754887e-473f-44a3-a66a-f32581ecdeac",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -272
      ],
      "parameters": {
        "width": 688,
        "height": 432,
        "content": "### 🧠 步骤 1:将文本创意扩展为视觉提示"
      },
      "typeVersion": 1
    },
    {
      "id": "91fbc1d5-f36a-4327-ab67-87ea31014c16",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        -272
      ],
      "parameters": {
        "color": 4,
        "width": 848,
        "height": 448,
        "content": "### 🎨 步骤 2:创建图像并生成视频提示"
      },
      "typeVersion": 1
    },
    {
      "id": "717301df-e8c0-484d-8f98-bc8b54b4a26a",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -336
      ],
      "parameters": {
        "color": 6,
        "width": 1088,
        "height": 624,
        "content": "### 🎬 步骤 3:生成视频并记录输出"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "Capture Image Idea": [
      {
        "json": {
          "formMode": "test",
          "Image Ideas": "A dancing monkey with a guitar",
          "submittedAt": "2025-09-13T10:02:42.537+10:00"
        }
      }
    ],
    "Upload Image to KIE API for Veo 3": [
      {
        "json": {
          "msg": "文件上传成功",
          "code": 200,
          "data": {
            "success": true,
            "fileName": "1757723352314-g4zn3e9r5bo.jpg",
            "filePath": "kieai/170309/images/1757723352314-g4zn3e9r5bo.jpg",
            "fileSize": 367798,
            "mimeType": "image/jpeg",
            "uploadedAt": "2025-09-13T00:29:14.071Z",
            "downloadUrl": "https://tempfile.redpandaai.co/kieai/170309/images/1757723352314-g4zn3e9r5bo.jpg"
          },
          "success": true
        }
      }
    ],
    "Generate Video (Veo 3) with KIE API": [
      {
        "json": {
          "msg": "success",
          "code": 200,
          "data": {
            "taskId": "984470c0e6b24db557ed9da81d520811"
          }
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3c261f6c-7e90-4a77-bec6-2fd2976f4cbf",
  "connections": {
    "Video Ready?": {
      "main": [
        [
          {
            "node": "Log to Google Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retry Delay (20s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry Delay (20s)": {
      "main": [
        [
          {
            "node": "Check Video Status (Veo 3)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Image Idea": {
      "main": [
        [
          {
            "node": "Generate Image Prompt (GPT-4.1)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Status (Veo 3)": {
      "main": [
        [
          {
            "node": "Video Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean Video Prompt (Remove \\n)": {
      "main": [
        [
          {
            "node": "Generate Video (Veo 3) with KIE API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video Prompt (GPT-4o)": {
      "main": [
        [
          {
            "node": "Upload Image to KIE API for Veo 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image Prompt (GPT-4.1)": {
      "main": [
        [
          {
            "node": "Generate Image (FLUX.1 Pro) with Dumpling AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Video Processing (80s)": {
      "main": [
        [
          {
            "node": "Check Video Status (Veo 3)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to KIE API for Veo 3": {
      "main": [
        [
          {
            "node": "Clean Video Prompt (Remove \\n)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Video (Veo 3) with KIE API": {
      "main": [
        [
          {
            "node": "Wait for Video Processing (80s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image (FLUX.1 Pro) with Dumpling AI": {
      "main": [
        [
          {
            "node": "Generate Video Prompt (GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 杂项, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流