自动化 YouTube 视频转博客文章,集成 Gemini AI 转录
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 12 个节点。主要使用 Set, Webhook, ReadWriteFile, ExecuteCommand, Agent 等节点。 自动化 YouTube 视频转博客文章,集成 Gemini AI 转录
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •Google Gemini API Key
使用的节点 (12)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "afca6c018fd85ecd6bb793dc620b1f9d2de9ea7edb2532dd2708b1a0cf01d640",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "e45b22bd-caa4-4adc-8da0-5229cea720cf",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
624,
-112
],
"parameters": {
"text": "=Please create a blog post from the following video transcript. Identify the key themes, structure the content logically, and generate a title, category, and tags.\n\nTranscript:\n{{ $json.content.parts[0].text }}",
"options": {
"systemMessage": "=You are an expert content strategist and editor. Your task is to transform a raw video transcript into a well-structured and engaging blog post.\n\nYou must adhere to the following rules:\n1. Your entire response must be a single JSON object enclosed in a markdown code block (```json ... ```).\n2. Do NOT include any introductory phrases, explanations, apologies, or any text whatsoever outside of the JSON markdown block.\n3. The tone should be informative, clear, and engaging, transforming the conversational transcript into polished written content.\n4. The language of all generated text in the output JSON must match the primary language of the input transcript.\n5. The JSON object must have this exact structure:\n{\n \"category\": \"A single, top-level category based on the content.\",\n \"tags\": [\n \"An array of 3 to 5 relevant, lowercase string tags.\"\n ],\n \"title\": \"A creative, compelling title for the blog post.\",\n \"short_description\": \"A concise, one-to-two sentence summary of the blog post, optimized for search engines (around 150-160 characters).\",\n \"body\": \"The full blog post content formatted in HTML, including <h1>, <h2>, and <p> tags.\"\n}\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "b5606a62-9672-41f0-9a97-26994256e409",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
672,
240
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "vppVWKsiofTY92Ht",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "74a9a1c6-af62-4e4e-8295-86550691525f",
"name": "多表:您可以连接多个表以实现有组织的数据结构",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
768,
96
],
"parameters": {
"autoFix": true,
"jsonSchemaExample": "{\n \"category\": \"Travel\",\n \"tags\": [\n \"breda\",\n \"summer travel\",\n \"netherlands\",\n \"city trip\",\n \"north brabant\"\n ],\n \"title\": \"Soaking Up the Last Days of Summer: A Weekend Guide to Breda\",\n \"short_description\": \"Don't let summer slip away! Discover the best things to do in Breda for a perfect late-summer weekend, from historic sites to vibrant terrace cafes.\",\n \"body\": \"<h1>Soaking Up the Last Days of Summer: A Weekend Guide to Breda</h1><p>As the golden light of late August settles over the Netherlands, there's no better place to capture the final, perfect moments of the season than Breda. This historic city in North Brabant, with its relaxed atmosphere and beautiful scenery, is the ideal destination for a memorable summer weekend. Here’s how to make the most of it.</p><h2>Morning: History and Coffee on the Grote Markt</h2><p>Start your day in the heart of the city, the Grote Markt. The square is dominated by the impressive Grote Kerk (Great Church), a must-see landmark. After exploring the church, find a spot at one of the many bustling terrace cafes. Ordering a coffee and watching the city wake up is a quintessential Breda experience.</p><h2>Afternoon: A Royal Stroll in Valkenberg Park</h2><p>Escape the midday heat with a walk through the shady paths of Valkenberg Park. This stunning park, once the garden of the Castle of Breda, is filled with ancient trees, fountains, and remnants of the old city fortifications. It's the perfect place for a picnic or simply to relax with a book and enjoy the sunshine.</p><h2>Evening: Sunset by the Harbor</h2><p>As the day winds down, head to Breda's charming harbor (Haven). The waterfront comes alive in the evening, with boats gently bobbing and restaurant lights reflecting on the water. Enjoy dinner with a view or simply take a stroll along the dock to watch a beautiful late-summer sunset.</p>\"\n}"
},
"typeVersion": 1.3
},
{
"id": "e81db094-9445-4953-81c6-45ddf7c8f68f",
"name": "下载 YouTube 音频",
"type": "n8n-nodes-base.executeCommand",
"position": [
-176,
-112
],
"parameters": {
"command": "=yt-dlp -x --audio-format mp3 -o output-{{ $json.now_unix }}.mp3 '{{ $('Get Youtube Url').item.json.body.videoUrl }}'\n"
},
"typeVersion": 1
},
{
"id": "362d280b-bf10-4ad6-9d9a-2274ed2747fb",
"name": "读取输出 MP3 二进制数据",
"type": "n8n-nodes-base.readWriteFile",
"position": [
32,
-112
],
"parameters": {
"options": {},
"fileSelector": "=output-{{ $('Get Time').item.json.now_unix }}.mp3"
},
"typeVersion": 1
},
{
"id": "d37ff911-4ebf-4acc-9d66-1be48921d71a",
"name": "回复博客文章",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1376,
-112
],
"parameters": {
"options": {}
},
"typeVersion": 1.4
},
{
"id": "09d024f5-9c8e-4332-bbb6-5a58d735152d",
"name": "获取 YouTube 网址",
"type": "n8n-nodes-base.webhook",
"position": [
-704,
-112
],
"webhookId": "57fddbda-a118-4546-a223-8e91a7d53ff6",
"parameters": {
"path": "57fddbda-a118-4546-a223-8e91a7d53ff6",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2.1
},
{
"id": "3e1d9f4b-a1e0-4f02-9928-4ddab3a474dc",
"name": "转录录音",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
320,
-112
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-1.5-flash",
"cachedResultName": "models/gemini-1.5-flash"
},
"options": {},
"resource": "audio",
"inputType": "binary"
},
"credentials": {
"googlePalmApi": {
"id": "vppVWKsiofTY92Ht",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "646309f5-7b01-41d1-be78-67894e062540",
"name": "将视频网址添加到输出",
"type": "n8n-nodes-base.set",
"position": [
1136,
-112
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f7f8a432-f6a3-4594-8048-53e170b46db6",
"name": "videoUrl",
"type": "string",
"value": "={{ $('Get Youtube Url').item.json.body.url }}"
},
{
"id": "b441eb26-15bb-43c6-afea-fa4733a100b5",
"name": "fulltext",
"type": "string",
"value": "={{ $('Transcribe a recording').item.json.content.parts[0].text }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "04bc9c1f-e198-42f9-9fb1-31fa391aed43",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
-256
],
"parameters": {
"color": 3,
"width": 464,
"height": 336,
"content": "## 获取 YouTube 视频音频"
},
"typeVersion": 1
},
{
"id": "f1c784d9-01f4-4219-876e-1fa2da37d687",
"name": "获取时间",
"type": "n8n-nodes-base.set",
"position": [
-464,
-112
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "1573616e-c70d-468b-ba22-1e0a337dbfa0",
"name": "now_unix",
"type": "number",
"value": "={{ new Date().getTime() }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "1c821513-2683-48bf-a015-67f02d5c671a",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
-288
],
"parameters": {
"color": 5,
"width": 512,
"height": 688,
"content": "## 准备博客文章"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"e45b22bd-caa4-4adc-8da0-5229cea720cf": {
"main": [
[
{
"node": "646309f5-7b01-41d1-be78-67894e062540",
"type": "main",
"index": 0
}
]
]
},
"f1c784d9-01f4-4219-876e-1fa2da37d687": {
"main": [
[
{
"node": "e81db094-9445-4953-81c6-45ddf7c8f68f",
"type": "main",
"index": 0
}
]
]
},
"09d024f5-9c8e-4332-bbb6-5a58d735152d": {
"main": [
[
{
"node": "f1c784d9-01f4-4219-876e-1fa2da37d687",
"type": "main",
"index": 0
}
]
]
},
"362d280b-bf10-4ad6-9d9a-2274ed2747fb": {
"main": [
[
{
"node": "3e1d9f4b-a1e0-4f02-9928-4ddab3a474dc",
"type": "main",
"index": 0
}
]
]
},
"3e1d9f4b-a1e0-4f02-9928-4ddab3a474dc": {
"main": [
[
{
"node": "e45b22bd-caa4-4adc-8da0-5229cea720cf",
"type": "main",
"index": 0
}
]
]
},
"646309f5-7b01-41d1-be78-67894e062540": {
"main": [
[
{
"node": "d37ff911-4ebf-4acc-9d66-1be48921d71a",
"type": "main",
"index": 0
}
]
]
},
"b5606a62-9672-41f0-9a97-26994256e409": {
"ai_languageModel": [
[
{
"node": "e45b22bd-caa4-4adc-8da0-5229cea720cf",
"type": "ai_languageModel",
"index": 0
},
{
"node": "74a9a1c6-af62-4e4e-8295-86550691525f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"74a9a1c6-af62-4e4e-8295-86550691525f": {
"ai_outputParser": [
[
{
"node": "e45b22bd-caa4-4adc-8da0-5229cea720cf",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"e81db094-9445-4953-81c6-45ddf7c8f68f": {
"main": [
[
{
"node": "362d280b-bf10-4ad6-9d9a-2274ed2747fb",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Veo-3、Perplexity和FFmpeg自动生成并发布1080p短视频
使用Veo-3、Perplexity和FFmpeg自动生成并发布1080p短视频
If
Set
Wait
+
If
Set
Wait
21 节点Sulieman Said
内容创作
基于AI的社交媒体内容生成器,采用GPT-4模型的策略方法
基于AI的社交媒体内容生成器,采用GPT-4模型的策略方法
Set
Code
Webhook
+
Set
Code
Webhook
22 节点inderjeet Bhambra
内容创作
卡路里追踪与饮食记录(Telegram、Gemini AI和数据表)
卡路里追踪与饮食记录(Telegram、Gemini AI和数据表)
If
Set
Code
+
If
Set
Code
73 节点Gerald Denor
内容创作
使用Google Gemini、Kokoro
使用Google Gemini、Kokoro TTS和FFmpeg将RSS源转换为播客
If
Set
Code
+
If
Set
Code
34 节点Jonas
内容创作
基于Gemini AI、Supabase和Nano-Banana的端到端博客创建自动化
使用Gemini AI、Supabase和Nano-Banana实现端到端博客创建自动化
If
Set
Code
+
If
Set
Code
51 节点Muhammad Asadullah
内容创作
使用Gemini AI、DeepSeek和GoAPI为电商生成产品图片和视频
使用Gemini AI、DeepSeek和GoAPI为电商生成产品图片和视频
If
Set
Html
+
If
Set
Html
50 节点Dhruv Dalsaniya
内容创作
工作流信息
难度等级
中级
节点数量12
分类2
节点类型10
作者
Atta
@attakhalighiHi 👋 I design automation workflows with n8n, AI, and custom APIs. My focus is on building reliable systems that save time and boost productivity. Always happy to answer questions about my templates.
外部链接
在 n8n.io 查看 →
分享此工作流