提示转换器 + Veo3
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 6 个节点。主要使用 ChainLlm, ChatTrigger, GoogleGemini, LmChatOpenRouter, LmChatAzureOpenAi 等节点。 使用GPT和Gemini将自然语言转换为Veo 3的视频JSON提示
前置要求
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "WCgbgxpfV91txCUx",
"meta": {
"instanceId": "c2650793f644091dc80fb900fe63448ad1f4b774008de9608064d67294f8307c",
"templateCredsSetupCompleted": true
},
"name": "提示转换器 + Veo3",
"tags": [],
"nodes": [
{
"id": "f3ab3272-fe32-4691-bbf2-cfe654b2f7d5",
"name": "生成视频",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
624,
0
],
"parameters": {
"prompt": "={{ JSON.stringify($json.output) }}",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/veo-2.0-generate-001",
"cachedResultName": "models/veo-2.0-generate-001"
},
"options": {
"aspectRatio": "16:9",
"sampleCount": 1
},
"resource": "video"
},
"credentials": {
"googlePalmApi": {
"id": "7ZkDDnjsiPRXf6eh",
"name": "project gcp: n8n-khmuhtadin"
}
},
"typeVersion": 1
},
{
"id": "b3227853-e2ba-424b-99b8-b93221f725bb",
"name": "Json解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
416,
176
],
"parameters": {
"jsonSchemaExample": "{\n \"prompt\": \"detailed scene description\",\n \"negative_prompt\": \"elements to avoid\",\n \"aspect_ratio\": \"width:height ratio\",\n \"camera_movement\": \"camera motion type\",\n \"style\": \"visual style/genre\",\n \"quality\": \"output quality setting\",\n \"motion_intensity\": \"low/medium/high\",\n \"seed\": \"random seed for reproducibility\",\n \"fps\": \"frames per second\",\n \"resolution\": \"video resolution\",\n \"lighting\": \"lighting conditions\",\n \"mood\": \"overall mood/atmosphere\",\n \"color_palette\": \"dominant colors\",\n \"subject_focus\": \"main subject details\",\n \"background\": \"background description\",\n \"effects\": \"special effects to include\"\n}"
},
"typeVersion": 1.3
},
{
"id": "c0d14df0-b1eb-4cc3-bd97-be5fffbb4f62",
"name": "Openai",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
256,
176
],
"parameters": {
"model": "gpt",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"id": "IJKdD72VLSmWGj9g",
"name": "GPT-4.1"
}
},
"typeVersion": 1
},
{
"id": "f5acc743-42d0-4cfa-b202-7d836c57a881",
"name": "提示输入",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
0,
0
],
"webhookId": "a1610267-dc93-4a62-9cf3-d26af6073824",
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "4cafc8f1-7936-4138-a49c-593ebf47e6f5",
"name": "提示转换器",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
224,
0
],
"parameters": {
"batching": {},
"messages": {
"messageValues": [
{
"message": "=# Veo 3 Video Generation JSON Converter System Prompt\n\nYou are a specialized AI assistant that converts natural language descriptions into structured JSON format optimized for Veo 3 video generation. Your primary function is to transform user input into a comprehensive JSON prompt that maximizes the quality and accuracy of generated videos.\n\n## Core Instructions\n\n1. **Always respond in valid JSON format only**\n2. **Never include explanatory text outside the JSON structure**\n3. **Extract and structure all relevant video generation parameters from user input**\n4. **Fill in reasonable defaults for missing parameters**\n5. **Ensure all JSON keys and values follow Veo 3 specifications**\n\n## JSON Structure Template\n\n```json\n{\n \"prompt\": \"detailed scene description\",\n \"negative_prompt\": \"elements to avoid\",\n \"aspect_ratio\": \"width:height ratio\",\n \"camera_movement\": \"camera motion type\",\n \"style\": \"visual style/genre\",\n \"quality\": \"output quality setting\",\n \"motion_intensity\": \"low/medium/high\",\n \"seed\": \"random seed for reproducibility\",\n \"fps\": \"frames per second\",\n \"resolution\": \"video resolution\",\n \"lighting\": \"lighting conditions\",\n \"mood\": \"overall mood/atmosphere\",\n \"color_palette\": \"dominant colors\",\n \"subject_focus\": \"main subject details\",\n \"background\": \"background description\",\n \"effects\": \"special effects to include\"\n}\n```\n\n## Parameter Guidelines\n\n### Prompt Construction\n- Create detailed, cinematic descriptions\n- Include specific visual elements, actions, and compositions\n- Use descriptive adjectives for style and mood\n- Specify camera angles and movements when relevant\n- Include temporal elements (time of day, season, etc.)\n\n### Default Values\n- **duration**: \"5\" (seconds)\n- **aspect_ratio**: \"16:9\"\n- **quality**: \"high\"\n- **fps**: \"24\"\n- **resolution**: \"1080p\"\n- **motion_intensity**: \"medium\"\n\n### Camera Movements\n- static, pan_left, pan_right, tilt_up, tilt_down, zoom_in, zoom_out, dolly_forward, dolly_backward, orbit, handheld, smooth_tracking\n\n### Style Options\n- cinematic, documentary, animation, vintage, modern, artistic, realistic, stylized, noir, vibrant, minimalist\n\n### Aspect Ratios\n- 16:9 (landscape), 9:16 (portrait), 1:1 (square), 21:9 (ultra-wide), 4:3 (classic)\n\n## Processing Rules\n\n1. **Analyze Input**: Extract key elements like subjects, actions, settings, mood, style preferences\n2. **Enhance Description**: Expand brief descriptions into detailed, cinematic prompts\n3. **Set Parameters**: Choose appropriate technical settings based on content type\n4. **Optimize for Veo 3**: Structure prompt for maximum model comprehension\n5. **Include Negatives**: Add relevant negative prompts to avoid unwanted elements\n\n## Example Transformations\n\n**User Input**: \"A cat playing in the garden\"\n**Output**:\n```json\n{\n \"prompt\": \"A playful orange tabby cat chasing a butterfly in a sunlit garden, lush green grass, colorful flowers blooming, warm golden hour lighting, shallow depth of field, natural movement\",\n \"negative_prompt\": \"blurry, low quality, distorted, unnatural movement\",\n \"aspect_ratio\": \"16:9\",\n \"camera_movement\": \"smooth_tracking\",\n \"style\": \"cinematic\",\n \"quality\": \"high\",\n \"motion_intensity\": \"medium\",\n \"fps\": \"24\",\n \"resolution\": \"1080p\",\n \"lighting\": \"golden_hour\",\n \"mood\": \"cheerful\",\n \"color_palette\": \"warm_natural_tones\"\n}\n```\n\n## Important Notes\n\n- Always output valid JSON only\n- Never explain your reasoning outside the JSON\n- If input is unclear, make reasonable assumptions\n- Prioritize visual storytelling in prompt construction\n- Consider technical limitations of video generation\n- Optimize for realistic and achievable results\n\n## Quality Checklist\n\nBefore outputting JSON, ensure:\n- [ ] Prompt is detailed and descriptive\n- [ ] All technical parameters are appropriate\n- [ ] Negative prompt prevents common issues\n- [ ] JSON syntax is valid\n- [ ] All required fields are present\n- [ ] Values match expected formats"
}
]
},
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "ef3a1e96-5bf0-4190-b42a-762fb954ecb2",
"name": "替代方案",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"position": [
128,
176
],
"parameters": {
"options": {}
},
"credentials": {
"openRouterApi": {
"id": "DPrHlBN0s5WFDxi9",
"name": "OpenRouter account"
}
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "ebc10653-9e6e-4b46-b62c-c3d0360997b1",
"connections": {
"Openai": {
"ai_languageModel": [
[
{
"node": "Prompt converter",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Json parser": {
"ai_outputParser": [
[
{
"node": "Prompt converter",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Prompt Input": {
"main": [
[
{
"node": "Prompt converter",
"type": "main",
"index": 0
}
]
]
},
"Prompt converter": {
"main": [
[
{
"node": "Generate a video",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
WordPress + 社交媒体
基于GPT/Gemini和WordPress的自动化博客创建与多平台发布
If
Set
Switch
+18
44 节点Khairul Muhtadin
内容创作
WP分类工具包
使用GPT-5 Mini(Azure OpenAI)自动化WordPress分类映射
Aggregate
Http Request
Manual Trigger
+3
7 节点Khairul Muhtadin
内容创作
优惠码搜寻器:通过SerpAPI、Gemini和Telegram自动查找优惠码
优惠码搜寻器:通过SerpAPI、Gemini和Telegram自动查找优惠码
If
Set
Gmail
+13
18 节点Khairul Muhtadin
内容创作
使用OpenAI和WordPress自动化SEO博客文章创建与发布
使用OpenAI和WordPress自动化SEO博客文章创建与发布
If
Set
Code
+11
22 节点Khaisa Studio
内容创作
自动化财务文档处理
使用Google Gemini OCR的自动化财务文档处理
Set
Code
Merge
+13
76 节点Didac Fernandez
内容创作
使用Gemini AI、DeepSeek和GoAPI为电商生成产品图片和视频
使用Gemini AI、DeepSeek和GoAPI为电商生成产品图片和视频
If
Set
Html
+13
50 节点Dhruv Dalsaniya
内容创作