自动总结 YouTube 播放列表播客:转录 → AI 摘要 → 存入表格
输入 YouTube 播放列表 → 逐条提取视频并获取转录 → 用 Groq AI 生成结构化摘要 → 输出到 Google Sheets 逐行记录
- 给谁
- 需要批量消化播客或长视频、并想自动归档摘要的 n8n 用户
- 你会得到
- 播放列表中每个视频/播客自动转录、生成带章节和要点的 AI 摘要,并记录到 Google Sheets
- 你需要
- n8n · google-sheets
硬约束
前置条件:n8n 实例(云端或自托管)、YouTube OAuth2 凭证、Google Sheets OAuth2 凭证、Groq API 密钥、Supadata API 密钥。将模板导入 n8n 后,补全 REDACTED 的 playlistId、Google Sheets documentId/sheetName,以及各 API 密钥。触发方式可改为手动或定时。
他们做了什么
作者 ARRE 在 n8n 模板市场发布了一个工作流模板,用于自动处理 YouTube 播放列表中的播客或长视频。该模板通过 YouTube Data API 获取播放列表视频,经 Supadata 服务获取转录文本,利用 Groq 的 llama-3.1-8b-instant 模型生成结构化摘要,并将标题、转录、摘要和行号写入 Google Sheets。模板包含完整的节点连接、JavaScript 处理代码和 AI 提示词。
效果如何
模板在 n8n 平台显示为已发布状态,累计浏览量 10122 次(截至采集日)。作者声称该工作流可自动转录并生成清晰、全面的 AI 摘要,使用户无需完整观看即可掌握要点。效果数据为作者自述,未经本站实测验证。
值得知道
1. Code1 节点注释写"提取前 10 句",但代码实际为 `sentences.slice(0, 5)`,实际仅取 5 句,可能影响摘要覆盖度。2. Supadata API 需要有效的 x-api-key,模板中该值被 REDACTED,需用户自行申请并填入。3. Google Sheets 的 documentId 与 sheetName 在模板中亦为 REDACTED,需用户创建文档后配置。4. 工作流当前使用 Groq llama-3.1-8b-instant,作者提示可在 Groq Chat Model 节点更换其他模型。5. 转录服务依赖 Supadata,若该服务不可用或视频无字幕,则转录步骤会失败。6. 本站未实际导入运行此工作流,reproduction 状态为 not_tested。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- YouTube Playlist 节点:绑定YouTube OAuth2 凭证。
- Google Sheets3 节点:绑定Google Sheets OAuth2 凭证。
- Groq Chat Model 节点:绑定groqApi 凭证。
- 将 __UKH_BEARER_9__ 替换为实际密钥/令牌(原路径 /nodes/9/parameters/headerParameters/parameters/0/value;literal auth header)。
需要替换的配置
- 源模板来自 n8n 公开库 #5926(约 23 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。 另将 1 处字面量密钥替换为 __UKH_…__ 占位符。
模板获取日期: 2026-10-24
步骤
配置凭证与前置准备
在 n8n 中创建并关联三种凭证:youTubeOAuth2Api(YouTube Data API)、googleSheetsOAuth2Api(Google Sheets)、groqApi(Groq LLM)。另需在 Supadata HTTP Request 节点的 Header 中填入你的 x-api-key。创建目标 Google Sheets 文档并获取其 URL/ID。
设置 YouTube 播放列表触发
添加 Manual Trigger 或 Schedule Trigger,连接 YouTube Playlist 节点。在 YouTube Playlist 节点中填入你的 playlistId,选择 resource=playlistItem、operation=getAll、returnAll=true。运行后应返回播放列表中所有视频的原始数据。
搭建指导 · 来源原文。YouTube Playlist 节点参数说明;粘贴到节点备注或参考配置
📺 **YouTube Playlist** Fetches all videos from a specific YouTube playlist. **How to change:** Change the `playlistId` to use a different playlist. Adjust `part` to fetch different details. Change credentials for another YouTube account.
提取视频标题、URL 与 ID
使用 Function 节点(titles/URL)从 YouTube 返回的 snippet 中提取 videoId、title,生成完整 YouTube URL,并分配从 2 开始的行号 id。随后用 Code 节点(video ID)从 URL 中解析出纯 videoId,保留 id 与 title。最后用 Split Out 节点将数组拆分为单条记录,进入循环。
运行提示词 · 来源原文。titles/URL Function 节点的 functionCode 字段
// Extract video URLs, titles, and add an id starting from 2 return items.map((item, index) => { const videoId = item.json.snippet.resourceId.videoId; const title = item.json.snippet.title; return { json: { id: index + 2, url: `https://www.youtube.com/watch?v=${videoId}`, title: title } }; });运行提示词 · 来源原文。video ID Code 节点的 jsCode 字段
return items.map((item, index) => { // Get the URL and title from the input const url = item.json.url; const title = item.json.title || null; // Extract the video ID from the URL let videoId = null; if (url && url.includes('v=')) { videoId = url.split('v=')[1].split('&')[0]; } // id starts from 1; change to index+2 if you want to start from 2 return { json: { id: index + 2, videoId, title } }; });循环逐条处理视频
添加 Loop Over Items (Split In Batches) 节点,将上一步拆分的单条记录逐条送入下游。每条记录将依次经过转录、合并、摘要、保存,完成后再取下一条。
调用 Supadata 获取转录文本
在循环内添加 HTTP Request 节点(supadata),请求 URL 为 `https://api.supadata.ai/v1/transcript?url=https://youtu.be/{{ $json.videoId}}`,Header 中携带 `x-api-key`。成功返回后,下游应收到包含 content 数组(含分段 text)的 JSON。
搭建指导 · 来源原文。supadata HTTP Request 节点备注或配置参考
📝 **supadata (HTTP Request Node)** Calls the Supadata API to get the transcript for each video. **How to change:** Update the API URL or key if the service changes. Modify request headers or parameters for other APIs.
合并转录片段并提取前几句
先用 Code 节点(scirpt)遍历 content 数组,将所有 segment.text 拼接为单一字符串 script。再用 Code 节点(Code1)将 script 按句子切分,提取前 5 句(代码为 slice(0,5),但注释写 10,注意实际行为),输出为 firstTenSentences 供 AI Agent 使用。
运行提示词 · 来源原文。scirpt Code 节点的 jsCode 字段
// Combine all "text" fields from the content array into one string let script = ''; // Loop through all input items for (const item of items) { if (item.json.content && Array.isArray(item.json.content)) { for (const segment of item.json.content) { if (segment.text) { script += segment.text + ' '; } } } } script = script.trim(); return [ { json: { script } } ];运行提示词 · 来源原文。Code1 Code 节点的 jsCode 字段
// Get the script text const script = items[0].json.script || ""; // Split into sentences using a regular expression const sentences = script.match(/[^\.!\?]+[\.!\?]+/g) || []; // Get the first 10 sentences (or fewer if less than 10) const firstTen = sentences.slice(0, 5).join(' ').trim(); return [ { json: { firstTenSentences: firstTen } } ];用 Groq AI Agent 生成结构化摘要
添加 AI Agent 节点,promptType=define,将以下提示词填入 text 字段。同时添加 Groq Chat Model 子节点,选择模型 llama-3.1-8b-instant,并关联 groqApi 凭证。AI Agent 会接收 `{{ $json.firstTenSentences }}` 作为输入,输出结构化摘要到 `{{ $json.output }}`。
运行提示词 · 来源原文。AI Agent1 节点的 text 字段(promptType=define)
=Summarize the following podcast script. The summary must be clear, well-organized, and comprehensive. Include all important information, data, and key points from the script. Divide the summary into sections according to the main topics, ideas, or parts discussed in the podcast. For each section, list all main points, facts, examples, and arguments mentioned. Do not omit any significant information or insight. The summary should be detailed enough to give a full understanding of the podcast, but avoid unnecessary repetition or filler. Use headings and bullet points for clarity. The result should be useful for someone who has not listened to the podcast but wants to understand all its important content and insights. podcast: {{ $json.firstTenSentences }}运行提示词 · 来源原文。使用前确认粘贴位置、输入变量及输出格式。
📜 **scirpt (Code Node)** Combines the transcript segments into a single script string. **How to change:** Change logic to format or preprocess the script differently (e.g., filter out certain lines).
运行提示词 · 来源原文。使用前确认粘贴位置、输入变量及输出格式。
✂️ **Code1 (Code Node)** Extracts the first few sentences from the script for summarization. **How to change:** Adjust the number of sentences extracted. Change the splitting logic for different transcript formats.
将结果写入 Google Sheets
添加 Google Sheets 节点,operation=update,选择你的 documentId 与 sheetName。在 columns 中定义四列映射:video titles = `{{ $('Loop Over Items1').item.json.title }}`、script = `{{ $('scirpt').item.json.script }}`、summery = `{{ $json.output }}`、row_number = `{{ $('Loop Over Items1').item.json.id }}`。matchingColumns 设为 row_number,确保按行号更新。
激活并测试工作流
保存后先手动执行一次,检查 YouTube 数据获取、Supadata 转录、Groq 摘要生成、Google Sheets 写入是否全部正常。确认无误后可将触发器改为 Schedule 实现每日自动运行。【首次测试安全】建议先创建测试用 Google Sheets,将 documentId 临时指向测试表,或先在 Google Sheets 节点前加断点/IF,确认数据正确后再连接真实表格。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你正在搭建一个 n8n 自动化工作流:自动获取 YouTube 播放列表中的视频,逐条转录并生成 AI 摘要,最后归档到 Google Sheets。请先确认你已准备好 n8n 实例、YouTube OAuth2、Google Sheets OAuth2、Groq API 密钥和 Supadata API 密钥,然后按步骤导入模板并补全 REDACTED 参数。
如需修改摘要风格,可编辑 AI Agent1 的提示词;如需更换 LLM,可在 Groq Chat Model 节点切换模型。
来源
Get a summary of each podcast in your YouTube playlist daily automatically free · arre · n8n.io · 2025-07-13
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。