重新利用 YouTube 视频
高级
这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 47 个节点。主要使用 If, Code, Merge, Discord, Webhook 等节点。 使用 Gemini AI 和 ContentDrips 在社交媒体上重新利用 YouTube 视频
前置要求
- •Discord Bot Token 或 Webhook
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
使用的节点 (47)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "fxWUeIE9Gz6cj2FA",
"meta": {
"instanceId": "33f20a7a5f09fe57061a704385c30a2d94962d55c3ce61b95c74d8e2704840c6",
"templateCredsSetupCompleted": true
},
"name": "重新利用 YouTube 视频",
"tags": [],
"nodes": [
{
"id": "9b3b6baa-ec80-4ad2-a9e7-ff9285c1bb8d",
"name": "点击\"执行工作流\"时",
"type": "n8n-nodes-base.manualTrigger",
"disabled": true,
"position": [
2128,
1408
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fcd53179-853c-478a-a8db-b1c4f7b4d918",
"name": "📋 工作流概述",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
1488
],
"parameters": {
"color": 6,
"width": 800,
"height": 436,
"content": "## 🎬 YouTube 频道自动通知系统"
},
"typeVersion": 1
},
{
"id": "59aae255-48e0-4f43-a666-f502c00d7e18",
"name": "🔐 订阅设置",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
1024
],
"parameters": {
"color": 6,
"width": 808,
"height": 420,
"content": "## 🔐 订阅设置流程"
},
"typeVersion": 1
},
{
"id": "1773188a-8bcd-4886-8358-5aadbb4043cc",
"name": "🎯 处理流水线",
"type": "n8n-nodes-base.stickyNote",
"position": [
1072,
1968
],
"parameters": {
"color": 6,
"width": 800,
"height": 420,
"content": "## 🎯 自动处理流水线"
},
"typeVersion": 1
},
{
"id": "f4e7d86a-c7fc-475e-abfb-e066572e34ff",
"name": "📡 订阅 YouTube 通知",
"type": "n8n-nodes-base.httpRequest",
"disabled": true,
"position": [
2592,
1344
],
"parameters": {
"url": "https://pubsubhubbub.appspot.com/subscribe",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "hub.callback",
"value": "https://n8n.glamoursuiting.com/webhook/youtube-trigger"
},
{
"name": "hub.topic",
"value": "https://www.youtube.com/feeds/videos.xml?channel_id=UC6ZligwnOYKDjgKFHEPTXzg"
},
{
"name": "hub.verify",
"value": "async"
},
{
"name": "hub.mode",
"value": "subscribe"
},
{
"name": "hub.verify_token",
"value": "shayan_ali_bakhsh"
},
{
"name": "hub.secret",
"value": "shayan_ali_bakhsh"
},
{
"name": "hub.lease_seconds",
"value": "864000"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/x-www-form-urlencoded"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "12b8e0c6-8bfc-4c5f-8407-956cb1275a44",
"name": "🎣 YouTube Webhook 监听器",
"type": "n8n-nodes-base.webhook",
"disabled": true,
"position": [
2144,
1632
],
"webhookId": "9a52c0db-7902-45d3-8640-fa8693bb620c",
"parameters": {
"path": "youtube-trigger",
"options": {},
"responseMode": "responseNode",
"multipleMethods": true
},
"typeVersion": 2
},
{
"id": "323cfcbe-ef49-4af4-a87b-147dc6671495",
"name": "✅ 发送验证响应",
"type": "n8n-nodes-base.respondToWebhook",
"disabled": true,
"position": [
2768,
1616
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.challenge }}"
},
"typeVersion": 1.3
},
{
"id": "ffdbe5fd-9a7b-44df-87ad-8d8ebda0cdc3",
"name": "🔐 验证安全令牌",
"type": "n8n-nodes-base.code",
"disabled": true,
"position": [
2544,
1616
],
"parameters": {
"jsCode": "const query = $input.first().json.query;\nconst verifyToken = query['hub.verify_token'];\nconst challenge = query['hub.challenge'];\nconst mode = query['hub.mode'];\n\n// Verify the token matches what you sent (yours is \"lakshit\")\nif (verifyToken === 'shayan_ali_bakhsh' && mode === 'subscribe') {\n return [{\n json: {\n challenge: challenge,\n status: 200,\n message: 'Verification successful'\n }\n }];\n} else {\n return [{\n json: {\n challenge: 'Forbidden',\n status: 403,\n message: 'Invalid verification'\n }\n }];\n}"
},
"typeVersion": 2
},
{
"id": "27b62c94-994d-4b96-80b5-1fe62ed05d74",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
1968,
1008
],
"parameters": {
"width": 1184,
"height": 1136,
"content": "# 使用 PUBSUBHUBHUB 订阅 YouTube RSS 源"
},
"typeVersion": 1
},
{
"id": "f4d12ca8-7bc6-4102-9da7-8c1654ca2b0d",
"name": "每 5 天触发一次",
"type": "n8n-nodes-base.scheduleTrigger",
"disabled": true,
"position": [
2144,
1248
],
"parameters": {
"rule": {
"interval": [
{
"daysInterval": 5
}
]
}
},
"typeVersion": 1.2
},
{
"id": "0bc80a1e-896a-4711-b008-ea3c799db25c",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1952,
-704
],
"parameters": {
"width": 1232,
"height": 1120,
"content": "# YouTube 视频触发器"
},
"typeVersion": 1
},
{
"id": "76fd1340-43b4-4a4a-8a0c-09a814280a28",
"name": "记录响应",
"type": "n8n-nodes-base.code",
"disabled": true,
"position": [
2544,
1824
],
"parameters": {
"jsCode": "const data = $input.all()\nconsole.log(\"Data received : \",data)\nreturn $input.all();"
},
"typeVersion": 2
},
{
"id": "1e424fc7-5247-4365-adf8-4c2573f57fdf",
"name": "每 10 分钟运行",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
2080,
-80
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 10
}
]
}
},
"typeVersion": 1.2
},
{
"id": "22064e2c-9b71-44c7-8869-abb54c2e34ef",
"name": "获取 YouTube 频道视频",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
2320,
-80
],
"parameters": {
"url": "https://www.youtube.com/feeds/videos.xml?channel_id=UC6ZligwnOYKDjgKFHEPTXzg",
"options": {
"customFields": "media:group"
}
},
"typeVersion": 1.2
},
{
"id": "6331aa57-bc47-49c8-893f-731eff2ce5e3",
"name": "组织项目",
"type": "n8n-nodes-base.code",
"position": [
2560,
-80
],
"parameters": {
"jsCode": "const data = $getWorkflowStaticData('global'); // Correct static data helper\n\n// Get the first (latest) item only\nconst item = $input.first().json;\nconst mediaGroup = item[\"media:group\"] || {};\nconst rawThumb = mediaGroup[\"media:thumbnail\"]?.[0]?.[\"$\"]?.url || null;\nconst thumbnail = rawThumb ? rawThumb.replace(\"hqdefault\", \"mqdefault\") : null;\n\nconst latest = {\n title: item.title || null,\n link: item.link || null,\n author: item.author || null,\n publishedAt: item.pubDate || null,\n videoId: (item.id || \"\").replace(\"yt:video:\", \"\"),\n description: mediaGroup[\"media:description\"]?.[0] || null,\n thumbnail,\n views: mediaGroup[\"media:community\"]?.[0]?.[\"media:statistics\"]?.[0]?.[\"$\"]?.views || null,\n rating: mediaGroup[\"media:community\"]?.[0]?.[\"media:starRating\"]?.[0]?.[\"$\"]?.average || null,\n ratingCount: mediaGroup[\"media:community\"]?.[0]?.[\"media:starRating\"]?.[0]?.[\"$\"]?.count || null,\n};\n\n// Compare with last saved videoId\nif (!data.lastVideoId) {\n data.lastVideoId = latest.videoId;\n return [{ json: { new: true, item: latest } }];\n}\n\nif (data.lastVideoId !== latest.videoId) {\n data.lastVideoId = latest.videoId;\n return [{ json: { new: true, item: latest } }];\n}\n\nreturn [{ json: { new: false, item: latest } }];\n"
},
"typeVersion": 2
},
{
"id": "5b9e82a1-9642-43e0-9bd6-88e4419f994d",
"name": "停止",
"type": "n8n-nodes-base.noOp",
"position": [
3008,
128
],
"parameters": {},
"retryOnFail": false,
"typeVersion": 1
},
{
"id": "e251b461-3138-4b86-9a55-a0006e1baa9f",
"name": "如果是新视频",
"type": "n8n-nodes-base.if",
"position": [
2800,
-80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6d9e9eef-92c5-42f3-9fda-9474a21ba675",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.new }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "cabd2507-02f7-425d-a97c-bab0ae9390b0",
"name": "销毁访问令牌",
"type": "n8n-nodes-base.httpRequest",
"position": [
7040,
96
],
"parameters": {
"url": "https://socialbu.com/api/v1/auth/logout",
"method": "POST",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('SocialBu Access Token').first().json.authToken }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "76a5b7be-46f3-4945-97bd-20069469e671",
"name": "获取账户",
"type": "n8n-nodes-base.httpRequest",
"position": [
5152,
112
],
"parameters": {
"url": "https://socialbu.com/api/v1/accounts",
"options": {},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $json.authToken }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "0c1b8517-4d07-4dab-acdc-d57c72c85c91",
"name": "获取上传 URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
5152,
-208
],
"parameters": {
"url": "https://socialbu.com/api/v1/upload_media",
"method": "POST",
"options": {},
"jsonBody": "{\n\"name\": \"image.png\",\n\"mime_type\": \"image/png\"\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $json.authToken }}"
}
]
}
},
"notesInFlow": false,
"typeVersion": 4.2
},
{
"id": "964b1b3f-0196-4444-b796-15e153d76c22",
"name": "上传 PDF",
"type": "n8n-nodes-base.httpRequest",
"position": [
5664,
-384
],
"parameters": {
"url": "={{ $json.signed_url }}",
"method": "PUT",
"options": {},
"sendBody": true,
"contentType": "binaryData",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "image/png"
},
{
"name": "x-amz-acl",
"value": "=private"
}
]
},
"inputDataFieldName": "=image.png"
},
"typeVersion": 4.2
},
{
"id": "4f639d19-c264-43e7-a0a2-e48861006716",
"name": "下载图像",
"type": "n8n-nodes-base.httpRequest",
"position": [
5456,
-384
],
"parameters": {
"url": "={{ $('Content drips Create Image').item.json.export_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file",
"outputPropertyName": "=image.png"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "7e0e96c0-bb71-461d-999a-65b566253c2d",
"name": "合并",
"type": "n8n-nodes-base.merge",
"position": [
6224,
96
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "bc1d5f1b-a618-46f5-b569-fbe6af4e74e4",
"name": "错误消息",
"type": "n8n-nodes-base.discord",
"position": [
7728,
-304
],
"webhookId": "c8c5577f-1ff7-4295-8b35-e7a594f12f1b",
"parameters": {
"content": "=There was an Error in your execution\nNode: {{ $json.execution.mode }}\nError: {{ $json.execution.error.message }}\nWorkflow Name: {{ $json.workflow.name }}\nWorkflow ID: {{ $json.workflow.id }}",
"guildId": {
"__rl": true,
"mode": "id",
"value": "1383872015349452971"
},
"options": {},
"resource": "message",
"channelId": {
"__rl": true,
"mode": "list",
"value": "1383872016851144786",
"cachedResultUrl": "https://discord.com/channels/1383872015349452971/1383872016851144786",
"cachedResultName": "general"
},
"authentication": "oAuth2"
},
"credentials": {
"discordOAuth2Api": {
"id": "gSUrBs4kjpB5UCtY",
"name": "Discord account"
}
},
"typeVersion": 2
},
{
"id": "c6f2dc17-2e90-496f-a48d-87fad6feb081",
"name": "成功消息",
"type": "n8n-nodes-base.discord",
"position": [
7728,
96
],
"webhookId": "c8c5577f-1ff7-4295-8b35-e7a594f12f1b",
"parameters": {
"content": "=Successfully Posted YouTube update on all Platforms",
"guildId": {
"__rl": true,
"mode": "id",
"value": "1383872015349452971"
},
"options": {},
"resource": "message",
"channelId": {
"__rl": true,
"mode": "list",
"value": "1383872016851144786",
"cachedResultUrl": "https://discord.com/channels/1383872015349452971/1383872016851144786",
"cachedResultName": "general"
},
"authentication": "oAuth2"
},
"credentials": {
"discordOAuth2Api": {
"id": "gSUrBs4kjpB5UCtY",
"name": "Discord account"
}
},
"typeVersion": 2
},
{
"id": "2dc4a7fe-3a7d-451a-ab11-83f99b185fc9",
"name": "停止和错误",
"type": "n8n-nodes-base.stopAndError",
"position": [
6016,
-192
],
"parameters": {
"errorMessage": "Could not Upload Image to Social BU after 4 retries"
},
"typeVersion": 1
},
{
"id": "588e2ee8-fa5f-4d57-b820-3dfa2cad856a",
"name": "错误触发器",
"type": "n8n-nodes-base.errorTrigger",
"position": [
7456,
-304
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a93facdb-6b84-4e0e-96ad-225a3e1cb978",
"name": "组织输出",
"type": "n8n-nodes-base.code",
"position": [
3760,
-96
],
"parameters": {
"jsCode": "const unstructuredJson = $input.first().json.content?.parts?.[0]?.text || \"\";\n\n// Clean up markdown fences if they exist\nconst cleaned = unstructuredJson\n .replace(/^```json\\s*/i, \"\")\n .replace(/```$/i, \"\")\n .trim();\n\nlet finalJson;\n\ntry {\n finalJson = JSON.parse(cleaned);\n} catch (error) {\n // fallback in case parsing fails\n finalJson = {\n short_description: null,\n post_text: null,\n error: \"Failed to parse AI response\",\n raw: unstructuredJson\n };\n}\n\nreturn finalJson;"
},
"typeVersion": 2
},
{
"id": "35901d01-12f6-4c40-b4fd-5c7f5f6b4933",
"name": "Content drips 创建图片",
"type": "n8n-nodes-contentdrips.contentdrips",
"onError": "continueErrorOutput",
"position": [
4256,
-96
],
"parameters": {
"branding": {
"bio": "n8n Expert",
"name": "Shayan Ali Bakhsh",
"handle": "@shayan_ali_bakhsh",
"website_url": "https://testwebsite.com",
"avatar_image_url": "https://media.licdn.com/dms/image/v2/D4D03AQFhXWoowk7OfA/profile-displayphoto-shrink_800_800/B4DZb4DiJ_GYAg-/0/1747918401685?e=1759968000&v=beta&t=3NZvitbqo8XVtg4oO9-N9IsQ2052zFhNDe3G2cF4gZo"
},
"operation": "generateGraphicSync",
"templateId": "154452",
"pollingConfig": {
"maxWaitTime": 10,
"pollInterval": 10
},
"contentUpdates": {
"updates": [
{
"label": "description",
"value": "={{ $json.short_description }}"
},
{
"type": "image",
"label": "thumbnail",
"value": "={{ $('Organize Items').item.json.item.thumbnail }}"
},
{
"label": "bio",
"value": "n8n Expert"
}
]
},
"includeBranding": true
},
"credentials": {
"contentdripsApi": {
"id": "wGVYQUtI67S1pHMv",
"name": "Contentdrips account"
}
},
"typeVersion": 1
},
{
"id": "e743360b-c93e-4667-9a78-b2b690337997",
"name": "SocialBu 访问令牌",
"type": "n8n-nodes-base.httpRequest",
"position": [
4768,
-112
],
"parameters": {
"url": "https://socialbu.com/api/v1/auth/get_token",
"method": "POST",
"options": {},
"jsonBody": "{\n \"email\": \"super_famous@trust_me_bro.com\",\n \"password\": \"a secret password that not even your wife knows\"\n}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
},
{
"id": "dcdf9d1b-c6d9-4fc6-ac33-f18deaac5779",
"name": "检查图片是否已上传",
"type": "n8n-nodes-base.code",
"position": [
5456,
-208
],
"parameters": {
"jsCode": "let retry = 0;\n\nwhile (retry < 4) {\n await new Promise(resolve => setTimeout(resolve, 5000));\n\n const apiCall = await this.helpers.httpRequest({\n method: 'GET',\n url: `https://socialbu.com/api/v1/upload_media/status`,\n qs: {\n key: $input.first().json.key,\n },\n headers: {\n Authorization: `Bearer ${$('SocialBu Access Token').first().json.authToken}`\n },\n json: true,\n });\n\n // Check success\n if (apiCall?.success === true) {\n return [{ json: { success: true, data: apiCall } }];\n }\n\n // Increment retry\n retry++;\n}\n\n// After all retries failed\nreturn [{ json: { success: false } }];"
},
"typeVersion": 2
},
{
"id": "0b8833ca-6ed2-41f4-b99c-1b5ddc01df4f",
"name": "图片已上传",
"type": "n8n-nodes-base.if",
"position": [
5664,
-208
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2efc43b6-92cc-4ca2-b86b-9450549f82d7",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.success }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "0cf02af1-9e1d-46d1-8148-07622cc834a1",
"name": "组织对象",
"type": "n8n-nodes-base.code",
"position": [
6480,
96
],
"parameters": {
"jsCode": "const allData = $input.all();\n\n// Format JS Date to \"YYYY-MM-DD HH:mm:ss\" (UTC)\nfunction formatDateToUTCString(date) {\n const pad = (n) => (n < 10 ? '0' + n : n);\n\n return (\n date.getUTCFullYear() + '-' +\n pad(date.getUTCMonth() + 1) + '-' +\n pad(date.getUTCDate()) + ' ' +\n pad(date.getUTCHours()) + ':' +\n pad(date.getUTCMinutes()) + ':' +\n pad(date.getUTCSeconds())\n );\n}\n\n// Publish time: current UTC + 1 minute\nconst publishAt = formatDateToUTCString(new Date(Date.now() + 60 * 1000));\n\n// Extract upload_token from the first item\nconst uploadToken = $input.first().json.data.upload_token;\n\n// Collect active accounts that support PNG\nconst accountsThatAcceptPNG = allData\n .slice(1) // skip first item (upload info)\n .filter(item => item.json.active && item.json.attachment_types?.includes(\"png\"))\n .map(item => item.json.id);\n\n// Final output\nreturn {\n json: {\n accounts: accountsThatAcceptPNG,\n attachment: uploadToken,\n publish_at: publishAt,\n }\n};"
},
"typeVersion": 2
},
{
"id": "da0d22ef-ef82-4ef7-87eb-84f913e4f17d",
"name": "发布到 SocialBu 连接的账户",
"type": "n8n-nodes-base.httpRequest",
"position": [
6768,
96
],
"parameters": {
"url": "https://socialbu.com/api/v1/posts",
"method": "POST",
"options": {},
"jsonBody": "={\n \"accounts\": {{ JSON.stringify($json.accounts) }},\n \"publish_at\": \"{{ $json.publish_at }}\",\n \"content\": \"{{ $('Organaize Output').first().json.post_text }}\",\n \"draft\": true,\n \"existing_attachments\": [\n {\n \"upload_token\": \"{{ $json.attachment }}\"\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Bearer {{ $('SocialBu Access Token').first().json.authToken }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ad7822d3-1d43-414d-a837-840a1393edfb",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
7296,
-688
],
"parameters": {
"width": 832,
"height": 1104,
"content": "## 在 Discord 上发送更新"
},
"typeVersion": 1
},
{
"id": "5c6ea61b-3292-4807-bd91-8fffcf239853",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
4640,
-704
],
"parameters": {
"width": 2576,
"height": 1120,
"content": "## 使用 SocialBu 发布到所有平台"
},
"typeVersion": 1
},
{
"id": "a064034a-b3eb-478e-b098-155533f49a55",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3280,
-704
],
"parameters": {
"width": 736,
"height": 1120,
"content": "## 生成描述"
},
"typeVersion": 1
},
{
"id": "65310b3a-b0f6-4da4-9cac-01d011f92c1f",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
4096,
-704
],
"parameters": {
"width": 448,
"height": 1120,
"content": "## 使用 ContentDrips 生成内容图片"
},
"typeVersion": 1
},
{
"id": "8f04b82a-33f1-4ca9-85c5-7d7284d87e29",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1664,
-704
],
"parameters": {
"content": "## 信息"
},
"typeVersion": 1
},
{
"id": "786bfe04-53eb-490f-b087-b6c25722787d",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1664,
-512
],
"parameters": {
"color": 3,
"content": "## 需要更新"
},
"typeVersion": 1
},
{
"id": "27e0e96e-5e4c-4d4d-87a5-f24b8d4d5437",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
2224,
-176
],
"parameters": {
"color": 3,
"width": 304,
"height": 320,
"content": "## 更新频道 RSS 链接"
},
"typeVersion": 1
},
{
"id": "d1d74066-c0f8-45b2-9826-0c1feff351c2",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
3312,
-224
],
"parameters": {
"color": 3,
"width": 384,
"height": 368,
"content": "## 更新 Gemini 访问令牌"
},
"typeVersion": 1
},
{
"id": "4d2d6e6b-f7a2-431a-9e83-aee8042d137d",
"name": "生成描述",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
3376,
-96
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.5-flash",
"cachedResultName": "models/gemini-2.5-flash"
},
"options": {},
"messages": {
"values": [
{
"content": "=You are given information about a YouTube video:\n- Title: \"{{ $json.item.title }}\"\n- Description: \"{{ $json.item.description }}\"\n- Link: \"{{ $json.item.link }}\"\n\nYour task:\n1. Generate a short description (one sentence, around 10 words, not exceeding 15) that summarizes the video.\n2. Generate a short paragraph announcing the new video. It should say \"new video is out,\" briefly explain what it’s about in a casual tone, and include the YouTube link at the end.\n\nOutput format: JSON with two keys:\n{\n \"short_description\": \"...\",\n \"post_text\": \"...\"\n}\n\nExamples:\n\nInput:\nTitle: \"Peaceful Mountains and Sea 🌊 | 10s Relaxing Nature Clip\"\nDescription: \"Enjoy a calm 10-second clip of the sea gently meeting the mountains.\"\nLink: https://www.youtube.com/watch?v=NupfPpGO3j8\n\nOutput:\n{\n \"short_description\": \"A peaceful 10-second clip showing calm sea and mountains.\",\n \"post_text\": \"A new video is out! 🌊 This short clip captures the peaceful meeting of mountains and sea, perfect for a quick relaxing break. Watch here: https://www.youtube.com/watch?v=NupfPpGO3j8\"\n}\n\n---\n\nInput:\nTitle: \"Desert video | 10 seconds\"\nDescription: \"A short clip of a moving desert shot taken from Pexels.\"\nLink: https://www.youtube.com/watch?v=6lcOzFx_JXI\n\nOutput:\n{\n \"short_description\": \"A calming short desert clip with stunning golden sandy views.\",\n \"post_text\": \"New video is up! 🏜️ Check out this 10-second desert clip that captures the still beauty of endless sands. Watch it now: https://www.youtube.com/watch?v=6lcOzFx_JXI\"\n}\n\nNow generate the output in the exact JSON format for the provided video info."
}
]
}
},
"credentials": {
"googlePalmApi": {
"id": "MQASX02thChmCCKm",
"name": "Google Gemini(PaLM) Api account"
}
},
"retryOnFail": true,
"typeVersion": 1
},
{
"id": "4d17b898-447e-4a72-9aae-ae004c57413a",
"name": "便签 10",
"type": "n8n-nodes-base.stickyNote",
"position": [
4128,
-336
],
"parameters": {
"color": 3,
"width": 384,
"height": 480,
"content": "## 更新 Content Drips 凭据"
},
"typeVersion": 1
},
{
"id": "0b24d43f-0bd9-43b9-946a-1585eb63ff18",
"name": "便签 11",
"type": "n8n-nodes-base.stickyNote",
"position": [
4672,
-320
],
"parameters": {
"color": 3,
"width": 304,
"height": 448,
"content": "## 在此处更新您的邮箱和密码"
},
"typeVersion": 1
},
{
"id": "4cb5ee3f-2e75-47a3-a5b8-283b2d197eb8",
"name": "便签12",
"type": "n8n-nodes-base.stickyNote",
"position": [
7632,
-464
],
"parameters": {
"color": 3,
"width": 304,
"height": 784,
"content": "## 更新您的 Discord API 凭据"
},
"typeVersion": 1
},
{
"id": "425661f1-5b57-4b1b-a7d1-20c9c692e3fe",
"name": "🔐 订阅设置1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1952,
-1200
],
"parameters": {
"color": 6,
"width": 808,
"height": 436,
"content": "# 关于此工作流"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "fxWUeIE9Gz6cj2FA",
"executionOrder": "v1"
},
"versionId": "525d63fb-cf85-4ccc-827f-3e4d49b3e3b6",
"connections": {
"Merge": {
"main": [
[
{
"node": "Organize Object",
"type": "main",
"index": 0
}
]
]
},
"Get Accounts": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"If new video": {
"main": [
[
{
"node": "Generate Description",
"type": "main",
"index": 0
}
],
[
{
"node": "Stop",
"type": "main",
"index": 0
}
]
]
},
"Error Trigger": {
"main": [
[
{
"node": "Error Message",
"type": "main",
"index": 0
}
]
]
},
"Download Image": {
"main": [
[
{
"node": "Upload PDF",
"type": "main",
"index": 0
}
]
]
},
"Get Upload URL": {
"main": [
[
{
"node": "Download Image",
"type": "main",
"index": 0
},
{
"node": "Check if Image Uploaded",
"type": "main",
"index": 0
}
]
]
},
"Image Uploaded": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
],
[
{
"node": "Stop and Error",
"type": "main",
"index": 0
}
]
]
},
"Organize Items": {
"main": [
[
{
"node": "If new video",
"type": "main",
"index": 0
}
]
]
},
"Organize Object": {
"main": [
[
{
"node": "Post to SocialBu Connected Accounts",
"type": "main",
"index": 0
}
]
]
},
"Organaize Output": {
"main": [
[
{
"node": "Content drips Create Image",
"type": "main",
"index": 0
}
]
]
},
"Destroy Access Token": {
"main": [
[
{
"node": "Success Message",
"type": "main",
"index": 0
}
]
]
},
"Generate Description": {
"main": [
[
{
"node": "Organaize Output",
"type": "main",
"index": 0
}
]
]
},
"Run every 10 minutes": {
"main": [
[
{
"node": "Fetch Youtube Channel Videos",
"type": "main",
"index": 0
}
]
]
},
"Trigger every 5 days": {
"main": [
[
{
"node": "📡 Subscribe to YouTube Notifications",
"type": "main",
"index": 0
}
]
]
},
"SocialBu Access Token": {
"main": [
[
{
"node": "Get Accounts",
"type": "main",
"index": 0
},
{
"node": "Get Upload URL",
"type": "main",
"index": 0
}
]
]
},
"Check if Image Uploaded": {
"main": [
[
{
"node": "Image Uploaded",
"type": "main",
"index": 0
}
]
]
},
"Content drips Create Image": {
"main": [
[
{
"node": "SocialBu Access Token",
"type": "main",
"index": 0
}
]
]
},
"Fetch Youtube Channel Videos": {
"main": [
[
{
"node": "Organize Items",
"type": "main",
"index": 0
}
]
]
},
"🔐 Validate Security Token": {
"main": [
[
{
"node": "✅ Send Verification Response",
"type": "main",
"index": 0
}
]
]
},
"🎣 YouTube Webhook Listener": {
"main": [
[
{
"node": "🔐 Validate Security Token",
"type": "main",
"index": 0
}
],
[
{
"node": "Log Response",
"type": "main",
"index": 0
}
]
]
},
"Post to SocialBu Connected Accounts": {
"main": [
[
{
"node": "Destroy Access Token",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "📡 Subscribe to YouTube Notifications",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 杂项, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
灵活新闻聚合器 - 多源集成、AI分析和可设置频道
多源新闻策展系统,集成Mistral AI分析、摘要和自定义频道
If
Set
Xml
+32
120 节点Hybroht
内容创作
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
每日 WhatsApp 群组智能分析:GPT-4.1 分析与语音消息转录
If
Set
Code
+20
52 节点Daniel Lianes
杂项
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
使用Gemini AI视觉分析与Telegram警报监控X平台品牌提及
使用Gemini AI视觉分析与Telegram警报监控X平台品牌提及
If
Set
Code
+13
24 节点Atta
杂项
使用PageSpeed Insights监控网站性能并保存到Google Sheets并发送警报
使用PageSpeed Insights监控网站性能,发送警报到Google Sheets
If
Set
Code
+8
20 节点Dahiana
开发运维
科技新闻聚合器:The Verge和TechCrunch RSS到Notion,含GPT-4摘要
科技新闻聚合器:The Verge和TechCrunch RSS到Notion,含GPT-4摘要
If
Code
Html
+11
37 节点moosa
杂项