从 Drive 自动化发布 YouTube 视频,集成 GPT 和 Gemini 元数据生成
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 23 个节点。主要使用 Code, Wait, YouTube, Telegram, GoogleDrive 等节点。 从 Drive 自动化发布 YouTube 视频,集成 GPT 和 Gemini 元数据生成
前置要求
- •Telegram Bot Token
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
- •Google Gemini API Key
使用的节点 (23)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "bb58de5a5031a6915d56b6838fb3b3b84efbdb51f48c823505ab47d6641ee185",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "d343874d-2389-40c9-ab46-47f02a7ea77d",
"name": "下载新视频",
"type": "n8n-nodes-base.googleDrive",
"position": [
272,
-128
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('New Video?').item.json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "GxtbT8g7MSIFmjgF",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "84c6f604-08f9-407c-9935-b4e8c9b03add",
"name": "有新视频?",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
-928,
-208
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "list",
"value": "1vAZ6zUlbqqaFv2_sPZXx_yeNQcjrfcvy",
"cachedResultUrl": "https://drive.google.com/drive/folders/1vAZ6zUlbqqaFv2_sPZXx_yeNQcjrfcvy",
"cachedResultName": "All Motivatioanl video"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "GxtbT8g7MSIFmjgF",
"name": "Google Drive account 2"
}
},
"typeVersion": 1
},
{
"id": "28445d38-79c3-4d7c-8aaa-9a30ee298bfe",
"name": "创建描述",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-624,
-224
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-nano",
"cachedResultName": "GPT-4.1-NANO"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are a professional copywriter.\nYou receive the transcript of an economics-related video.\n\nYour task is to write a detailed but concise summary (in paragraphs) about the content of the video. The output will be used as the YouTube video description.\n\n✍️ Writing Guidelines:\n\nStart with an engaging opening like:\n“In this video…” or “In this episode…”\n\nWrite entirely from my perspective, using phrases such as “in my opinion,” “in my view,” “I explain why,” or “I discuss how.”\n\nNever say phrases like “the speaker says,” “they mention,” or “in this episode, I learn.” Everything must sound like my own explanation.\n\nUse clear, assertive, and confident statements — avoid uncertain terms such as “might,” “could,” “possibly,” or “maybe.”\n\nInclude 2–4 relevant emojis to make the tone more dynamic and expressive.\n\nEnd with 2–5 broad, relevant hashtags (e.g., #economics #business #money #success #motivation).\n\n⚙️ Input:\n\nThe transcript will come from the uploaded video (added separately).\n\n🎯 Output:\n\nA polished, first-person YouTube description that summarizes the video’s key economic or motivational insights — confident, engaging, and ready to publish."
},
{
"content": "=Here is the Scence:{{ $json.originalFilename }}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "FsX9JrZqhSEHtkmm",
"name": "OpenAi account"
}
},
"typeVersion": 1.7
},
{
"id": "b0cbd1ba-77ca-4874-bdfd-cd76c2a56892",
"name": "2.5FlashPrev",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-352,
-64
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.0-flash"
},
"credentials": {
"googlePalmApi": {
"id": "xcpoBH67frp9oHY2",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "0b75f8c6-64a2-447e-bae4-05c5d4e8a0c3",
"name": "YouTube标签",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-352,
-224
],
"parameters": {
"text": "=Now follows the actual topic/transcript. Give me the YouTube tags for it:\n{{ $json.message.content }}",
"options": {
"systemMessage": "You are a YouTube SEO and motivational content specialist.\nYour task is to generate only YouTube tags (no description, no hashtags) based on the given video topic or transcript.\n\n✍️ Guidelines:\n\nOutput only comma-separated tags — no extra text, no formatting.\n\nTags should combine motivation, mindset, life lessons, money, success, and economics themes depending on the input.\n\nFocus on high-performing, searchable keywords that match motivational and economic growth content.\n\nInclude a mix of broad and specific tags (e.g., motivation, mindset, personal growth, economics, success, wealth, discipline, resilience).\n\nKeep total tags around 20–30 per response.\n\n⚙️ Input:\n\nVideo topic or transcript (added separately).\n\n🎯 Output:\n\nOnly a clean list of YouTube tags, comma-separated — no hashtags, no extra commentary."
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "2d1d7fb2-95e0-4190-a7fc-4947d097745a",
"name": "YouTube标题",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-80,
-224
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-nano",
"cachedResultName": "GPT-4.1-NANO"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are a professional copywriter for SEO-optimized YouTube titles."
},
{
"content": "=Write me a suitable SEO YouTube title for the transcript of the following video transcript. Only the title, nothing else. Max 40 characters, so keep it short."
}
]
}
},
"credentials": {
"openAiApi": {
"id": "FsX9JrZqhSEHtkmm",
"name": "OpenAi account"
}
},
"typeVersion": 1.7
},
{
"id": "ddc63e6b-8cff-4949-b97a-747d481c2253",
"name": "上传到YouTube",
"type": "n8n-nodes-base.youTube",
"position": [
-592,
224
],
"parameters": {
"title": "={{ $json.message.content }}",
"options": {
"description": "=🚀 Self-hosted n8n setup — 100% working like n8n.io cloud.\nHosted on your server, fully configured & ready to automate.\nVisit: Evalinfo.com\nWhatsApp: +923250754569 | +923321997882\n\n{{ $('Create Description').item.json.message.content }}\n\n\n#myreelgen #evalinfo #muhammadnouman #ai #aiagents #n8n #selfhostedn8n\n\n{{ $('YT Tags').item.json.output }}",
"privacyStatus": "public"
},
"resource": "video",
"operation": "upload",
"categoryId": "22",
"regionCode": "IN",
"binaryProperty": "=data"
},
"credentials": {
"youTubeOAuth2Api": {
"id": "13qYzNIjCJpMx9GK",
"name": "Eval info"
}
},
"typeVersion": 1
},
{
"id": "e352184f-beb2-4e07-9eb3-d7aaafd83b6a",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1008,
-368
],
"parameters": {
"color": 6,
"width": 352,
"height": 416,
"content": "## 从Drive文件夹获取视频"
},
"typeVersion": 1
},
{
"id": "ef946b76-9232-4d4e-b970-f8f24b38a336",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
-368
],
"parameters": {
"color": 3,
"width": 816,
"height": 416,
"content": "## 生成元数据"
},
"typeVersion": 1
},
{
"id": "59aa6d9e-9e07-414d-9159-676f365c9a8e",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
192,
-368
],
"parameters": {
"color": 3,
"width": 224,
"height": 416,
"content": "## 下载视频"
},
"typeVersion": 1
},
{
"id": "5281a05f-2357-4881-a996-ac9d9dc17c19",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-640,
64
],
"parameters": {
"color": 3,
"width": 816,
"height": 416,
"content": "## 上传视频"
},
"typeVersion": 1
},
{
"id": "e631fb6d-a7a3-485f-a7b8-c535275cb9f7",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
192,
64
],
"parameters": {
"color": 3,
"width": 224,
"height": 416,
"content": "## 删除视频"
},
"typeVersion": 1
},
{
"id": "5e6af056-bd53-4a85-a10f-c30416a039a0",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
432,
64
],
"parameters": {
"color": 6,
"width": 352,
"height": 416,
"content": "## 发送通知"
},
"typeVersion": 1
},
{
"id": "5d150d6e-8d28-4503-9565-cd42fc08d4ed",
"name": "从上传文件夹1删除视频",
"type": "n8n-nodes-base.googleDrive",
"position": [
256,
224
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $('New Video?').item.json.id }}"
},
"options": {},
"operation": "deleteFile"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "GxtbT8g7MSIFmjgF",
"name": "Google Drive account 2"
}
},
"typeVersion": 3
},
{
"id": "3a7f4655-5fef-4209-93f8-e50fa3fecb44",
"name": "发送文本消息",
"type": "n8n-nodes-base.telegram",
"position": [
512,
224
],
"webhookId": "6544dd10-e8a9-47f2-8c98-5c0c3a839928",
"parameters": {
"text": "=🎬 Your video has been uploaded to YouTube channel **\"Eval Info\"!**\n\n• 🆔 Upload ID: {{ $('Upload to youtube').item.json.uploadId }}\n• 🗑️ Drive file deleted: {{ $json.success ? '✅ Yes' : '❌ No' }}\n• 🎯 Title: {{ $('YT Title').item.json.message.content }}\n",
"chatId": "6727168479",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "2cLY9VvUkHDGd3Yx",
"name": "uploaded to YT Evaal info"
}
},
"typeVersion": 1.2
},
{
"id": "223440f4-14e1-4d87-914e-a148ff75639f",
"name": "发布到Instagram",
"type": "n8n-nodes-base.httpRequest",
"position": [
-608,
640
],
"parameters": {
"url": "https://graph.facebook.com/v19.0/<YOUR PAGE ID HERE>/media",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "image_url",
"value": "<YOUR IMAGE URL HERE>"
},
{
"name": "caption",
"value": "<YOUR CAPTION HERE>"
}
]
},
"nodeCredentialType": "facebookGraphApi"
},
"typeVersion": 4.2
},
{
"id": "952eb838-7b36-4169-9c97-1660a4d7c139",
"name": "发布Instagram帖子",
"type": "n8n-nodes-base.httpRequest",
"position": [
-272,
640
],
"parameters": {
"url": "https://graph.facebook.com/v19.0/17841404935066235/media_publish",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "creation_id",
"value": "={{ $json.id }}"
}
]
},
"nodeCredentialType": "facebookGraphApi"
},
"typeVersion": 4.2
},
{
"id": "6663b262-9207-4d34-8470-a60f9e783294",
"name": "发布到Facebook",
"type": "n8n-nodes-base.httpRequest",
"position": [
240,
640
],
"parameters": {
"url": "https://graph.facebook.com/v19.0/266271423823110/photos",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "form-urlencoded",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "url",
"value": "https://images.pexels.com/photos/5475816/pexels-photo-5475816.jpeg?auto=compress&cs=tinysrgb&fit=crop&h=627&w=1200"
},
{
"name": "caption",
"value": "This is the caption for the post"
},
{
"name": "access_token",
"value": "={{ $json.data[0].access_token }}"
}
]
},
"nodeCredentialType": "facebookGraphApi"
},
"typeVersion": 4.2
},
{
"id": "a94f3725-1eaf-4491-8958-d812f83fe35b",
"name": "使用系统令牌获取页面令牌",
"type": "n8n-nodes-base.httpRequest",
"position": [
-96,
640
],
"parameters": {
"url": "https://graph.facebook.com/v19.0/me/accounts",
"options": {},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "facebookGraphApi"
},
"typeVersion": 4.2
},
{
"id": "22179199-f09d-4456-bf1c-45bb7a2531f3",
"name": "获取正确的页面令牌",
"type": "n8n-nodes-base.code",
"position": [
64,
640
],
"parameters": {
"jsCode": "const page = $json.data.find(p => p.id === '266271423823110');\nreturn [{ json: { access_token: page.access_token } }];\n"
},
"typeVersion": 2
},
{
"id": "f3f681e0-cea6-48ce-9891-c7a4c62dcaee",
"name": "等待2秒",
"type": "n8n-nodes-base.wait",
"position": [
-448,
640
],
"webhookId": "c40b180e-016c-4648-898a-5942b8a9b00d",
"parameters": {
"amount": 2
},
"typeVersion": 1.1
},
{
"id": "7caacc2c-fcf6-4b39-ad05-81235611e68f",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-656,
496
],
"parameters": {
"color": 5,
"width": 1072,
"height": 360,
"content": "使用永久不过期令牌"
},
"typeVersion": 1
},
{
"id": "0541f012-b217-4854-9b11-f04636165f20",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1360,
112
],
"parameters": {
"width": 680,
"height": 1220,
"content": "如何创建永久系统用户令牌(推荐)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"YT Tags": {
"main": [
[
{
"node": "YT Title",
"type": "main",
"index": 0
}
]
]
},
"YT Title": {
"main": [
[
{
"node": "Download New Video",
"type": "main",
"index": 0
}
]
]
},
"New Video?": {
"main": [
[
{
"node": "Create Description",
"type": "main",
"index": 0
}
]
]
},
"2.5FlashPrev": {
"ai_languageModel": [
[
{
"node": "YT Tags",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Wait 2 Second": {
"main": [
[
{
"node": "Publish instagram post",
"type": "main",
"index": 0
}
]
]
},
"Post to Instagram": {
"main": [
[
{
"node": "Wait 2 Second",
"type": "main",
"index": 0
}
]
]
},
"Upload to youtube": {
"main": [
[
{
"node": "Delete video from Upload Folder1",
"type": "main",
"index": 0
}
]
]
},
"Create Description": {
"main": [
[
{
"node": "YT Tags",
"type": "main",
"index": 0
}
]
]
},
"Download New Video": {
"main": [
[
{
"node": "Upload to youtube",
"type": "main",
"index": 0
}
]
]
},
"Send a text message": {
"main": [
[]
]
},
"Get Correct Page Token": {
"main": [
[
{
"node": "Post to Facebook",
"type": "main",
"index": 0
}
]
]
},
"Publish instagram post": {
"main": [
[
{
"node": "Use System token to get page token",
"type": "main",
"index": 0
}
]
]
},
"Delete video from Upload Folder1": {
"main": [
[
{
"node": "Send a text message",
"type": "main",
"index": 0
}
]
]
},
"Use System token to get page token": {
"main": [
[
{
"node": "Get Correct Page Token",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
AI驱动的邮件分诊与自动回复系统,集成OpenAI代理和Gmail
If
Set
Gmail
+20
68 节点Abdullahi Ahmed
内容创作
💥 使用NanoBanana、Seedream 4、ChatGPT Image和Veo 3自动化视频广告 - VIDE
使用AI(NanoBanana、Seedream、GPT-4o、Veo 3)自动化和发布视频广告活动
Set
Code
Wait
+16
63 节点Dr. Firas
内容创作
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
内容创作
使用OpenAI、ElevenLabs和Hedra创建病毒式婴儿播客YouTube短视频
使用OpenAI、ElevenLabs和Hedra创建病毒式婴儿播客YouTube短视频
Code
Wait
Merge
+12
38 节点Electrabot
内容创作
AI驱动的学术作业生成器
使用Google Gemini生成学术作业并通过Telegram/PDF交付
Set
Code
Wait
+9
17 节点Davidson Ahuruezenma
内容创作
LinkedIn潜在客户个性化(Google Drive、Apify与AI)
LinkedIn潜在客户个性化(Google Drive、Apify与AI)
If
Set
Code
+12
25 节点Mariela Slavenova
内容创作