使用AI将Reddit帖子转换为短视频
高级
这是一个AI, Marketing领域的自动化工作流,包含 43 个节点。主要使用 If, Set, Code, Wait, Merge 等节点,结合人工智能技术实现智能自动化。 使用AI将Reddit帖子转换为短视频
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (43)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "2718e70d3927cc6f222cd0fca1f41929053688eb8b4504451ee7746fdfef7be1"
},
"nodes": [
{
"id": "c82ef841-c864-4980-9319-6e2e0a7985ce",
"name": "分割片段",
"type": "n8n-nodes-base.itemLists",
"position": [
-2720,
1100
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7e329005-5824-4818-878a-ec5ab97031dc",
"name": "Pexels 查询",
"type": "n8n-nodes-base.httpRequest",
"maxTries": 5,
"position": [
-2020,
880
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "618a6bf4-31ec-4f4b-ad02-1fd0bd9b5565",
"name": "OpenAI (ChatGPT)",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-3080,
1100
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1.8,
"waitBetweenTries": 5000
},
{
"id": "f364947c-6b24-4bd3-ad9d-009f2990d04a",
"name": "获取视频URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
-940,
880
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "4e1467f2-2798-4bd3-a339-9063bab63e42",
"name": "每项提取3个视频",
"type": "n8n-nodes-base.code",
"position": [
-1760,
880
],
"parameters": {},
"typeVersion": 2
},
{
"id": "6129fe06-3b3b-42dd-8247-509f155eb974",
"name": "将3个合并为1个",
"type": "n8n-nodes-base.code",
"position": [
-620,
880
],
"parameters": {},
"typeVersion": 2
},
{
"id": "b81b9351-19d8-429e-af0f-34dbd093aeb9",
"name": "获取reddit令牌",
"type": "n8n-nodes-base.httpRequest",
"position": [
-4380,
880
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "ece8f40e-318e-4d76-b237-1b26545c8e9c",
"name": "获取reddit帖子",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3800,
980
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "ee6cd394-6714-4ae5-88c7-36950915a0b4",
"name": "创建带视频的时间线",
"type": "n8n-nodes-base.code",
"position": [
100,
1100
],
"parameters": {},
"typeVersion": 2
},
{
"id": "f488889c-c7c1-4f11-9101-124a46943534",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2060,
780
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "68e0f4de-c7cd-4c95-b864-216e8451ee16",
"name": "合并媒体、音频和字幕",
"type": "n8n-nodes-base.merge",
"position": [
-100,
1100
],
"parameters": {},
"typeVersion": 3
},
{
"id": "7daba492-81a4-4f21-a521-34b482d52272",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-4800,
1160
],
"webhookId": "20b7de62-79f3-4d89-9589-c824fd456195",
"parameters": {},
"typeVersion": 2
},
{
"id": "b16d8e2f-d0c1-4822-83cd-569dbfd60d01",
"name": "分离TTS设置",
"type": "n8n-nodes-base.splitOut",
"position": [
-4380,
1440
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6b018650-f54b-4bcb-b927-971221e280e5",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
-2240,
1420
],
"parameters": {},
"typeVersion": 2
},
{
"id": "e4818147-e130-43ea-800d-a2ac42c40324",
"name": "分离reddit链接",
"type": "n8n-nodes-base.splitOut",
"position": [
-4380,
1080
],
"parameters": {},
"typeVersion": 1
},
{
"id": "9d1aa00d-31fd-4137-b788-64d48427e8e0",
"name": "将URL转换为reddit API URL",
"type": "n8n-nodes-base.code",
"position": [
-4180,
1080
],
"parameters": {},
"typeVersion": 2
},
{
"id": "9d0d572c-c3db-40f3-996e-c248e2b98bc5",
"name": "合并令牌和URL",
"type": "n8n-nodes-base.merge",
"position": [
-3980,
980
],
"parameters": {},
"typeVersion": 3
},
{
"id": "b9498f9c-d3ea-4136-84e4-051ee823204a",
"name": "分离视频长度",
"type": "n8n-nodes-base.splitOut",
"position": [
-4380,
1260
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e47fb3b0-e092-426a-9cb0-fad609097515",
"name": "合并长度和reddit JSON",
"type": "n8n-nodes-base.merge",
"position": [
-3520,
1100
],
"parameters": {},
"typeVersion": 3
},
{
"id": "4d417707-6153-451b-8cb4-e55b219272dd",
"name": "响应Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
800,
1220
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "05621977-50bc-4008-a58c-551b119326a2",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2060,
1080
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "24b67449-d896-4a66-ab9b-18cbda213f61",
"name": "提取文本字段",
"type": "n8n-nodes-base.code",
"position": [
-1340,
1100
],
"parameters": {},
"typeVersion": 2
},
{
"id": "6d9334d4-547d-4bc5-99fe-fb56ebe6845f",
"name": "合并片段和TTS设置",
"type": "n8n-nodes-base.merge",
"position": [
-2420,
1420
],
"parameters": {},
"typeVersion": 3
},
{
"id": "4c58be43-96d0-4d5c-b3df-f0d774a35c64",
"name": "如果状态=就绪则继续",
"type": "n8n-nodes-base.if",
"position": [
-800,
1320
],
"parameters": {},
"executeOnce": false,
"typeVersion": 2.2
},
{
"id": "615d4153-2cea-467e-9867-af6448d298ca",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2060,
1240
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f8efb701-d8ae-4c71-a3af-c95f83743739",
"name": "生成TTS",
"type": "@n8n/n8n-nodes-langchain.openAi",
"maxTries": 5,
"position": [
-2040,
1420
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1.8,
"waitBetweenTries": 5000
},
{
"id": "70dde8c7-53d9-4e01-a470-a8778c5224cf",
"name": "重命名键",
"type": "n8n-nodes-base.renameKeys",
"position": [
-620,
1300
],
"parameters": {},
"typeVersion": 1
},
{
"id": "2dd7c499-6cae-414d-9d2c-3eb36b396ebb",
"name": "等待输入",
"type": "n8n-nodes-base.merge",
"position": [
-1300,
1320
],
"parameters": {},
"typeVersion": 3
},
{
"id": "3face551-4170-4370-b476-ee88cafaba43",
"name": "合并上传链接和TTS音频",
"type": "n8n-nodes-base.merge",
"position": [
-1660,
1400
],
"parameters": {},
"typeVersion": 3
},
{
"id": "a0d13f64-c61d-409b-958e-c6d60028b467",
"name": "获取音频URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
-960,
1320
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "70b15057-d0a7-4a1a-9921-916c231c27cd",
"name": "获取上传链接",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1860,
1300
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "2b2e26cc-bed5-4ead-9327-8b1674031541",
"name": "上传TTS到Shotstack",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1460,
1400
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "b2631555-e873-4ea1-a951-5001f7bbad09",
"name": "上传视频到ShotStack",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1500,
880
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "6b429842-ca6d-4d3e-a068-8bfe976cb5e8",
"name": "等待 10 秒",
"type": "n8n-nodes-base.wait",
"position": [
-1200,
880
],
"webhookId": "99f6aa0e-1a5e-4e24-932d-aeb3c1f376d9",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "4155cf71-654c-427b-90ec-6c044b5c37cb",
"name": "等待15秒",
"type": "n8n-nodes-base.wait",
"position": [
-1120,
1320
],
"webhookId": "1b88ec57-52b1-4844-ac33-19b79c333c24",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "92fe5007-125b-4283-bcd8-0b29e518bf72",
"name": "当点击\"测试工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-4800,
1380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "93a5d875-8fe8-4933-a72c-42b1b7432ad1",
"name": "限制评论长度",
"type": "n8n-nodes-base.code",
"position": [
-3280,
1100
],
"parameters": {},
"typeVersion": 2
},
{
"id": "1d0aac60-8b34-4c8f-b1ca-fec9c0ce4ed3",
"name": "合并时间线和HTTP请求",
"type": "n8n-nodes-base.merge",
"position": [
540,
1220
],
"parameters": {},
"typeVersion": 3
},
{
"id": "4fec0793-bcfb-4a44-a4f6-7a01ed55a654",
"name": "渲染视频",
"type": "n8n-nodes-base.httpRequest",
"position": [
300,
1000
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "9100ba52-a06b-4979-9d24-419b0c2f8a82",
"name": "等待",
"type": "n8n-nodes-base.wait",
"position": [
560,
920
],
"webhookId": "47e08c23-7695-4a6a-be3b-f98fcd4334a0",
"parameters": {},
"typeVersion": 1.1
},
{
"id": "175c2522-b666-48b2-bb68-2ab3fd866923",
"name": "获取视频链接",
"type": "n8n-nodes-base.httpRequest",
"position": [
780,
920
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "ddeca417-8dbe-4beb-b22d-a18674793329",
"name": "如果已渲染",
"type": "n8n-nodes-base.if",
"position": [
980,
920
],
"parameters": {},
"executeOnce": false,
"typeVersion": 2.2
},
{
"id": "0280d3cf-b162-4a0b-a599-de041c245154",
"name": "获取URL",
"type": "n8n-nodes-base.set",
"position": [
1260,
900
],
"parameters": {},
"executeOnce": true,
"typeVersion": 3.4
}
],
"pinData": {
"When clicking ‘Test workflow’": [
{
"body": {
"voice": "nova",
"ttsSpeed": 1,
"redditLink": "https://www.reddit.com/r/Entrepreneur/comments/1ixokgx/is_it_normal_to_feel_behind_at_29_years_old_when",
"videoLength": 60
}
}
]
},
"connections": {
"Code": {
"main": [
[
{
"node": "Generate TTS",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get video link",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Split Out TTS settings",
"type": "main",
"index": 0
},
{
"node": "get reddit token",
"type": "main",
"index": 0
},
{
"node": "Split Out videoLength",
"type": "main",
"index": 0
},
{
"node": "Split Out redditLink",
"type": "main",
"index": 0
}
]
]
},
"Wait 10s": {
"main": [
[
{
"node": "Get video urls",
"type": "main",
"index": 0
}
]
]
},
"Wait 15s": {
"main": [
[
{
"node": "Get audio URLs",
"type": "main",
"index": 0
}
]
]
},
"If rendered": {
"main": [
[
{
"node": "Get the URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Rename Keys": {
"main": [
[
{
"node": "Merge media, audio and subtitles",
"type": "main",
"index": 2
}
]
]
},
"Split Clips": {
"main": [
[
{
"node": "extract text field",
"type": "main",
"index": 0
},
{
"node": "Merge clips and TTS settings",
"type": "main",
"index": 0
},
{
"node": "Pexels Query",
"type": "main",
"index": 0
}
]
]
},
"Generate TTS": {
"main": [
[
{
"node": "Merge upload links and TTS audio",
"type": "main",
"index": 1
},
{
"node": "Get upload links",
"type": "main",
"index": 0
}
]
]
},
"Pexels Query": {
"main": [
[
{
"node": "Extract 3 videos per item",
"type": "main",
"index": 0
}
]
]
},
"Get audio URLs": {
"main": [
[
{
"node": "If Status=Ready then continue",
"type": "main",
"index": 0
}
]
]
},
"Get video link": {
"main": [
[
{
"node": "If rendered",
"type": "main",
"index": 0
}
]
]
},
"Get video urls": {
"main": [
[
{
"node": "Combine 3 into 1",
"type": "main",
"index": 0
}
]
]
},
"Wait for inputs": {
"main": [
[
{
"node": "Wait 15s",
"type": "main",
"index": 0
}
]
]
},
"Combine 3 into 1": {
"main": [
[
{
"node": "Merge media, audio and subtitles",
"type": "main",
"index": 0
}
]
]
},
"Get upload links": {
"main": [
[
{
"node": "Merge upload links and TTS audio",
"type": "main",
"index": 0
},
{
"node": "Wait for inputs",
"type": "main",
"index": 0
}
]
]
},
"OpenAI (ChatGPT)": {
"main": [
[
{
"node": "Split Clips",
"type": "main",
"index": 0
}
]
]
},
"Render the video": {
"main": [
[
{
"node": "Merge timeline and HTTP req",
"type": "main",
"index": 0
},
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"get reddit token": {
"main": [
[
{
"node": "combine token and url",
"type": "main",
"index": 0
}
]
]
},
"get reddit thread": {
"main": [
[
{
"node": "Merge length and reddit json",
"type": "main",
"index": 0
}
]
]
},
"extract text field": {
"main": [
[
{
"node": "Merge media, audio and subtitles",
"type": "main",
"index": 1
}
]
]
},
"Split Out redditLink": {
"main": [
[
{
"node": "Convert url to reddit api url",
"type": "main",
"index": 0
}
]
]
},
"Limit comments length": {
"main": [
[
{
"node": "OpenAI (ChatGPT)",
"type": "main",
"index": 0
}
]
]
},
"Split Out videoLength": {
"main": [
[
{
"node": "Merge length and reddit json",
"type": "main",
"index": 1
}
]
]
},
"combine token and url": {
"main": [
[
{
"node": "get reddit thread",
"type": "main",
"index": 0
}
]
]
},
"Split Out TTS settings": {
"main": [
[
{
"node": "Merge clips and TTS settings",
"type": "main",
"index": 1
}
]
]
},
"Upload TTS to Shotstack": {
"main": [
[
{
"node": "Wait for inputs",
"type": "main",
"index": 1
}
]
]
},
"Extract 3 videos per item": {
"main": [
[
{
"node": "Upload videos to ShotStack",
"type": "main",
"index": 0
}
]
]
},
"Upload videos to ShotStack": {
"main": [
[
{
"node": "Wait 10s",
"type": "main",
"index": 0
}
]
]
},
"create timeline with video": {
"main": [
[
{
"node": "Render the video",
"type": "main",
"index": 0
},
{
"node": "Merge timeline and HTTP req",
"type": "main",
"index": 1
}
]
]
},
"Merge timeline and HTTP req": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Merge clips and TTS settings": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Merge length and reddit json": {
"main": [
[
{
"node": "Limit comments length",
"type": "main",
"index": 0
}
]
]
},
"Convert url to reddit api url": {
"main": [
[
{
"node": "combine token and url",
"type": "main",
"index": 1
}
]
]
},
"If Status=Ready then continue": {
"main": [
[
{
"node": "Rename Keys",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 15s",
"type": "main",
"index": 0
}
]
]
},
"Merge media, audio and subtitles": {
"main": [
[
{
"node": "create timeline with video",
"type": "main",
"index": 0
}
]
]
},
"Merge upload links and TTS audio": {
"main": [
[
{
"node": "Upload TTS to Shotstack",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "get reddit token",
"type": "main",
"index": 0
},
{
"node": "Split Out redditLink",
"type": "main",
"index": 0
},
{
"node": "Split Out videoLength",
"type": "main",
"index": 0
},
{
"node": "Split Out TTS settings",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 人工智能, 营销
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
WordPress 内容生成器 v3
WordPress 内容生成器 v3
If
Set
Code
+21
102 节点Alex Kim
人工智能
WordPress终极内容生成器 v2 - AlexK1919
WordPress终极内容生成器
If
Set
Code
+17
61 节点Alex Kim
人工智能
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
WordPress博客自动化专业版(SEO主题)v2
WordPress自动博客专业版 - SEO主题内容自动化机器
If
Set
Xml
+21
63 节点Daniel Ng
人工智能
WordPress博客自动化专业版(深度研究)v1
WordPress自动博客专业版 - 含深度研究的内容自动化机器
If
Set
Xml
+24
77 节点Daniel Ng
人工智能
[模板] AI宠物店 v8
🐶 AI宠物店助手 - 集成GPT-4o、Google日历和WhatsApp/Instagram/Facebook
If
N8n
Set
+38
244 节点Amanda Benks
销售