基于Replicate的Wan 2.5 UGC视频生成
高级
这是一个Content Creation、Multimodal AI领域的自动化工作流,包含 21 个节点。主要使用 If、Set、Code、Wait、HttpRequest 等节点。 基于Replicate的Wan 2.5 UGC视频生成
前置要求
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "12e6f290a974a1eee154f8d915aade185e90e826260e6aeab8a087ba7386a1bc"
},
"nodes": [
{
"id": "9e9e3163-7fe1-4fe7-8123-a57397e21ccd",
"name": "手动触发器",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1024,
-80
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e22274c3-af22-4fab-9094-452bfcd8f0ff",
"name": "设置 API 令牌",
"type": "n8n-nodes-base.set",
"position": [
-656,
-48
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "api_token",
"name": "api_token",
"type": "string",
"value": "=YOUR_REPLICATE_API"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "5a16dd08-746e-493a-8fd3-fd733ec4cc9b",
"name": "等待5秒",
"type": "n8n-nodes-base.wait",
"position": [
240,
-32
],
"webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
"parameters": {
"unit": "seconds",
"amount": 5
},
"typeVersion": 1
},
{
"id": "5bc13e03-b6b2-495a-8b53-ec82e69dba0c",
"name": "检查状态",
"type": "n8n-nodes-base.httpRequest",
"position": [
432,
-32
],
"parameters": {
"url": "=https://api.replicate.com/v1/predictions/{{ $('Create Video').item.json.id }}",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "1b0a24be-a1eb-4289-ba63-d0733220275d",
"name": "是否完成?",
"type": "n8n-nodes-base.if",
"position": [
672,
-112
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "succeeded"
}
]
}
},
"typeVersion": 2
},
{
"id": "7bd9709d-50d9-4884-9b17-c9d8114abfb9",
"name": "是否失败?",
"type": "n8n-nodes-base.if",
"position": [
928,
16
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "d1bfd044-3a07-4c18-b55f-72d192596139",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "failed"
}
]
}
},
"typeVersion": 2
},
{
"id": "69b0068c-89d0-494c-b2eb-c4bcc4ff7830",
"name": "**结果:** 整理好的商家电子邮件数据库,准备用于外联",
"type": "n8n-nodes-base.set",
"position": [
912,
-224
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "success-response",
"name": "response",
"type": "object",
"value": "={{ { success: true, result_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Other generated successfully' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "428b52fb-ef45-481b-b7be-3669173d8d9f",
"name": "错误响应",
"type": "n8n-nodes-base.set",
"position": [
1424,
240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "error-response",
"name": "response",
"type": "object",
"value": "={{ { success: false, error: $json.error || 'Other generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate other' } }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "190eab8d-bdb5-4649-b0e4-03af2df26e75",
"name": "显示结果",
"type": "n8n-nodes-base.set",
"position": [
1728,
-80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "final-result",
"name": "final_result",
"type": "object",
"value": "={{ $json.response }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "e64a49e0-6233-483e-b28f-769826cf9585",
"name": "记录请求",
"type": "n8n-nodes-base.code",
"position": [
240,
-224
],
"parameters": {
"jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('digitalhera/heranathalie Request:', {\n timestamp: new Date().toISOString(),\n prediction_id: data.id,\n model_type: 'other'\n});\n\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "6f057fbe-173a-41db-af95-eaf01134da0c",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1888,
-208
],
"parameters": {
"color": 4,
"width": 804,
"height": 432,
"content": "将输出转换为 JSON"
},
"typeVersion": 1
},
{
"id": "22f27f0a-4405-4584-83a3-65129c738032",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1920,
288
],
"parameters": {
"color": 4,
"width": 589,
"height": 1958,
"content": "插入数据"
},
"typeVersion": 1
},
{
"id": "1ff77c8a-fe78-4d16-b394-6ece7807c13a",
"name": "创建视频",
"type": "n8n-nodes-base.httpRequest",
"position": [
-96,
-48
],
"parameters": {
"url": "https://api.replicate.com/v1/models/wan-video/wan-2.5-i2v/predictions",
"method": "POST",
"options": {
"response": {
"response": {
"neverError": true,
"responseFormat": "json"
}
}
},
"jsonBody": "={\n \"input\": {\n \"image\": \"{{ $json.Seed_image }}\",\n \"prompt\": \"{{ $json.Prompt }}\"\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
},
{
"name": "Prefer",
"value": "wait"
}
]
}
},
"typeVersion": 4.1
},
{
"id": "f33f16a7-5e34-42c6-8c05-ae88775f1dd7",
"name": "使其成为 JSON",
"type": "n8n-nodes-base.set",
"position": [
-352,
-32
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "924b6590-46a4-4ad5-b58d-0804991c633e",
"name": "Seed_image",
"type": "string",
"value": "https://replicate.delivery/pbxt/NllgibhEDDtjRmPSLSDvXnkiobQCJDeoI4PwWdJ0bdXIeZbP/AG1_1.png"
},
{
"id": "76ad3bd8-da89-413b-b5ab-f031d4d221f4",
"name": "Prompt",
"type": "string",
"value": "5-Second AG1 'Game Changer' Video Prompt Scene Setup: Woman in modern kitchen (white cropped hoodie, olive green leggings), holding AG1 package with both hands at chest level, green smoothie in blender visible to the side Action (0-5 seconds): 0-1 sec: Start with her looking down at the AG1 package 1-2 sec: She looks up at camera with growing smile (like discovering something amazing) 2-4 sec: Holds package up slightly higher, direct eye contact: 'This is an absolute GAME changer!' 4-5 sec: Quick confident nod while bringing package back to chest level, maintaining smile Camera: Static shot or very subtle push-in Frame from waist up (like reference photo) Bright, natural lighting Kitchen background slightly blurred for focus on her and product Energy: Authentic excitement, like she's sharing a secret with her best friend - natural, not overly polished"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e7fec34c-0237-4fea-8ca6-d45400082db5",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-720,
-144
],
"parameters": {
"height": 416,
"content": "计划:每 30 分钟(抓取和记录)"
},
"typeVersion": 1
},
{
"id": "7caa345e-4986-48fa-a13f-6ff37afa1b48",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
-144
],
"parameters": {
"height": 336,
"content": "配置代币"
},
"typeVersion": 1
},
{
"id": "366a180c-cc7b-419a-bdde-cf0e454375f8",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
192
],
"parameters": {
"height": 400,
"content": "构建代币项目"
},
"typeVersion": 1
},
{
"id": "2f1c8f38-2973-49cc-afc2-45f03c35a46d",
"name": "遍历项目",
"type": "n8n-nodes-base.splitInBatches",
"position": [
-928,
1072
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "9c6d90f8-e1ae-4f6d-815a-1c613972f77d",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1680,
-208
],
"parameters": {
"height": 432,
"content": "对于每个代币"
},
"typeVersion": 1
},
{
"id": "173e58da-2595-499c-a2e6-072c0cc3873d",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1216,
528
],
"parameters": {
"width": 544,
"height": 752,
"content": "抓取 CoinGecko (Decodo)"
},
"typeVersion": 1
},
{
"id": "9fe706b2-a214-4165-8cd7-e1af7c3e4a41",
"name": "解析代币指标 (LLM)",
"type": "n8n-nodes-base.wait",
"position": [
800,
224
],
"webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
"parameters": {
"unit": "seconds",
"amount": 90
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Wait 5s": {
"main": [
[
{
"node": "Check Status",
"type": "main",
"index": 0
}
]
]
},
"Wait 90s": {
"main": [
[
{
"node": "Check Status",
"type": "main",
"index": 0
}
]
]
},
"Has Failed?": {
"main": [
[
{
"node": "Error Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 90s",
"type": "main",
"index": 0
}
]
]
},
"Log Request": {
"main": [
[
{
"node": "Wait 5s",
"type": "main",
"index": 0
}
]
]
},
"Check Status": {
"main": [
[
{
"node": "Is Complete?",
"type": "main",
"index": 0
}
]
]
},
"Create Video": {
"main": [
[
{
"node": "Log Request",
"type": "main",
"index": 0
}
]
]
},
"Is Complete?": {
"main": [
[
{
"node": "Success Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Has Failed?",
"type": "main",
"index": 0
}
]
]
},
"Set API Token": {
"main": [
[
{
"node": "Add Seed Image and Prompt",
"type": "main",
"index": 0
}
]
]
},
"Display Result": {
"main": [
[]
]
},
"Error Response": {
"main": [
[
{
"node": "Display Result",
"type": "main",
"index": 0
}
]
]
},
"Manual Trigger": {
"main": [
[
{
"node": "Set API Token",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[],
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Success Response": {
"main": [
[
{
"node": "Display Result",
"type": "main",
"index": 0
}
]
]
},
"Add Seed Image and Prompt": {
"main": [
[
{
"node": "Create Video",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Content Creation、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Replicate上的OpenAI SORA-2将文本转换为UGC视频
使用Replicate上的OpenAI SORA-2将文本转换为UGC视频
If
Set
Code
+5
21 节点Yaron Been
Content Creation
字节跳动/Seedream-3 - 图像生成器
字节跳动 Seedream 3:文本到图像转换模板
If
Set
Code
+4
15 节点Yaron Been
Content Creation
Dessix Moss Ttsd 文本生成器
使用Replicate Moss-TTSD将对话脚本转换为自然语音
If
Set
Code
+4
9 节点Yaron Been
Content Creation
ibm-granite/granite-speech-3.3-8b - 文本生成器
通过Replicate API使用IBM Granite 3.3 8B模型将语音转换为文本
If
Set
Code
+4
15 节点Yaron Been
Content Creation
moicarmonas/2ndmoises_generator - 其他生成器
使用2nd Moises生成器和Replicate从文本提示创建图片
If
Set
Code
+4
15 节点Yaron Been
Content Creation
moicarmonas/3rdmoises_generator_oldversion - 其他生成器
使用3rd Moises生成器和Replicate从文本提示创建图片
If
Set
Code
+4
15 节点Yaron Been
Content Creation
工作流信息
难度等级
高级
节点数量21
分类2
节点类型8
作者
Yaron Been
@yaron-nofluffBuilding AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos
外部链接
在 n8n.io 上查看 →
分享此工作流