8
n8n 中文网amn8n.com

使用OpenAI和Gmail生成播客转录摘要和关键词

中级

这是一个Content Creation, AI Summarization领域的自动化工作流,包含 6 个节点。主要使用 Set, Gmail, OpenAi, ManualTrigger 等节点。 使用OpenAI和Gmail生成播客转录摘要和关键词

前置要求
  • Google 账号和 Gmail API 凭证
  • OpenAI API Key

使用的节点 (6)

工作流预览
可视化展示节点连接关系,支持缩放和平移

无法加载工作流预览

导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "nodes": [
    {
      "name": "手动触发器",
      "type": "n8n-nodes-base.manualTrigger",
      "notes": {
        "text": "### 1. Start Workflow\n\nThis `Manual Trigger` node is used for easy testing of the content processing part.\n\n**To trigger the workflow manually:** Click the 'Execute Workflow' button in the top right.\n\n**For production (Advanced):** In a real-world scenario, this would likely be triggered by:\n* An `RSS Feed` node (for new podcast episodes).\n* A `Webhook` node (when a transcription service completes its job).\n* An `HTTP Request` node (to download audio and send to a transcription API, which is a more complex setup for later).\n\nFor this template, we focus on processing a pre-obtained transcript.",
        "position": "right"
      },
      "position": [
        240,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "name": "输入原始转录文本",
      "type": "n8n-nodes-base.set",
      "notes": {
        "text": "### 2. Input Raw Transcript\n\nThis `Set` node is where you'll provide the full, unedited transcript of your podcast episode, webinar, or video.\n\n**How to use:**\n* **For testing:** Paste your transcript into the 'Value' field for `rawTranscript`.\n* **For automation (Advanced):** In a full setup, this node would receive the transcript text from a previous node (e.g., an `HTTP Request` node that fetches results from a transcription API like AssemblyAI, or a file reader node).\n\n**Crucial:** The quality of the AI output depends heavily on the quality and completeness of this input transcript.",
        "position": "right"
      },
      "position": [
        460,
        300
      ],
      "parameters": {
        "values": [
          {
            "name": "rawTranscript",
            "value": "Welcome to our podcast episode today. We're diving deep into the world of AI in customer support. Historically, customer support has been a bottleneck for many businesses. Long wait times, repetitive queries, and human error often lead to frustrated customers. But with the advent of artificial intelligence, this landscape is rapidly changing. AI-powered chatbots can handle a significant volume of routine questions, freeing up human agents for more complex issues. We've seen companies like Zendesk and Salesforce integrating more sophisticated AI tools into their CRM platforms. These tools use natural language processing to understand customer intent and provide relevant, immediate answers. Furthermore, predictive analytics, another facet of AI, can anticipate customer needs before they even arise, allowing businesses to proactively address potential issues. This leads to a smoother, more efficient customer journey. However, it's not all sunshine and rainbows. There are challenges, such as ensuring the AI provides empathetic responses, handling edge cases, and the initial setup cost. Training these models requires vast amounts of data. But the ROI in terms of customer satisfaction and operational efficiency is often significant. Future trends suggest more personalized AI interactions, integration with virtual reality for immersive support, and even AI-driven sentiment analysis to gauge customer mood in real-time. This isn't about replacing humans but augmenting their capabilities. The human touch will always be crucial, especially for complex problem-solving and emotional intelligence. We hope you've enjoyed this deep dive. Don't forget to like, share, and subscribe!"
          }
        ],
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "name": "AI:生成摘要",
      "type": "n8n-nodes-base.openAi",
      "notes": {
        "text": "### 3. AI: Generate Summary\n\nThis `OpenAI` node uses AI to create a concise summary of the `rawTranscript`.\n\n**Setup:**\n1.  **OpenAI Credential:** Click on 'Credentials' (above the 'Model' dropdown) and select 'New Credential'. Provide your OpenAI API Key (starts with `sk-`). Save it.\n2.  **Model:** You can change `gpt-3.5-turbo` to `gpt-4o` (or `gpt-4`) for potentially better and more nuanced summaries (but at a higher cost).\n3.  **Prompt:** The system prompt guides the AI on the desired tone, focus, and output format for the summary.\n\n**Output:** The generated summary will be in `{{ $node[\"AI: Generate Summary\"].json.choices[0].message.content }}`.",
        "position": "right"
      },
      "position": [
        700,
        220
      ],
      "parameters": {
        "model": "gpt-3.5-turbo",
        "options": {},
        "messages": [
          {
            "role": "system",
            "content": "You are a highly skilled summarizer. Your task is to provide a concise, comprehensive, and engaging summary of the provided text, focusing on the main arguments, key insights, and conclusions. The summary should be suitable for a blog post introduction or show notes. Do not include a conversational opening (e.g., \"This episode discusses...\")."
          },
          {
            "role": "user",
            "content": "Summarize the following podcast transcript:\n\n{{ $json.rawTranscript }}"
          }
        ]
      },
      "credentials": {
        "openAiApi": {
          "id": "YOUR_OPENAI_CREDENTIAL_ID",
          "resolve": false
        }
      },
      "typeVersion": 1
    },
    {
      "name": "AI:提取关键词",
      "type": "n8n-nodes-base.openAi",
      "notes": {
        "text": "### 4. AI: Extract Keywords\n\nThis `OpenAI` node runs a separate AI process to extract critical keywords and topics from the same `rawTranscript`.\n\n**Setup:**\n1.  **OpenAI Credential:** Select the same OpenAI credential you used for 'AI: Generate Summary'.\n2.  **Model:** Ensure this matches your preference.\n3.  **Prompt:** The system prompt guides the AI to focus on keywords and provides the desired output format (comma-separated list).\n\n**Output:** The extracted keywords will be in `{{ $node[\"AI: Extract Keywords\"].json.choices[0].message.content }}`.",
        "position": "right"
      },
      "position": [
        700,
        380
      ],
      "parameters": {
        "model": "gpt-3.5-turbo",
        "options": {},
        "messages": [
          {
            "role": "system",
            "content": "You are an expert content analyzer and SEO specialist. Your task is to extract a list of 5-10 key topics and keywords from the provided text that are relevant for SEO, content tagging, and categorization. Provide them as a comma-separated list."
          },
          {
            "role": "user",
            "content": "Extract keywords from the following podcast transcript:\n\n{{ $json.rawTranscript }}"
          }
        ]
      },
      "credentials": {
        "openAiApi": {
          "id": "YOUR_OPENAI_CREDENTIAL_ID",
          "resolve": false
        }
      },
      "typeVersion": 1
    },
    {
      "name": "整合输出",
      "type": "n8n-nodes-base.set",
      "notes": {
        "text": "### 5. Consolidate Output\n\nThis `Set` node gathers the summary and keywords from the two AI nodes and consolidates them into clearly named fields (`episodeSummary`, `episodeKeywords`). This makes it easier to use them in the final output step.\n\n**No specific configuration needed here**, it just maps the data from the previous AI nodes.",
        "position": "right"
      },
      "position": [
        940,
        300
      ],
      "parameters": {
        "values": [
          {
            "name": "episodeSummary",
            "value": "={{ $node[\"AI: Generate Summary\"].json.choices[0].message.content }}"
          },
          {
            "name": "episodeKeywords",
            "value": "={{ $node[\"AI: Extract Keywords\"].json.choices[0].message.content }}"
          }
        ],
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "name": "邮件发送结果",
      "type": "n8n-nodes-base.gmail",
      "notes": {
        "text": "### 6. Email Results\n\nThis `Gmail` node sends you an email containing the AI-generated summary and keywords.\n\n**Setup:**\n1.  **Gmail Credential:** Click 'Credentials' and select 'New Credential'. Choose 'Gmail API'. Follow the n8n instructions to connect your Gmail account.\n2.  **From Email:** Enter your Gmail address (this must be the same account you authenticated).\n3.  **To Email:** **IMPORTANT: Change `YOUR_RECIPIENT_EMAIL@example.com` to your actual email address!**\n4.  **Subject & Text:** These fields are pre-filled with expressions to pull data from the 'Consolidate Output' node.\n\n**After setting up, click 'Execute Workflow' (from the 'Manual Trigger' node) to test sending an email!**",
        "position": "right"
      },
      "position": [
        1180,
        300
      ],
      "parameters": {
        "text": "Hello!\n\nYour automated podcast content repurposer has finished its work.\n\n### Episode Summary:\n\n{{ $json.episodeSummary }}\n\n### Keywords:\n\n{{ $json.episodeKeywords }}\n\n---\n\n*This content was generated automatically by n8n.*",
        "options": {},
        "subject": "New Podcast Content: Summary & Keywords Ready!",
        "toEmail": "YOUR_RECIPIENT_EMAIL@example.com",
        "fromEmail": "YOUR_GMAIL_EMAIL@gmail.com"
      },
      "credentials": {
        "gmailApi": {
          "id": "YOUR_GMAIL_CREDENTIAL_ID",
          "resolve": false
        }
      },
      "typeVersion": 2
    }
  ],
  "pinData": {},
  "version": 1,
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Input Raw Transcript",
            "type": "main"
          }
        ]
      ]
    },
    "Consolidate Output": {
      "main": [
        [
          {
            "node": "Email Results",
            "type": "main"
          }
        ]
      ]
    },
    "AI: Extract Keywords": {
      "main": [
        [
          {
            "node": "Consolidate Output",
            "type": "main"
          }
        ]
      ]
    },
    "AI: Generate Summary": {
      "main": [
        [
          {
            "node": "Consolidate Output",
            "type": "main"
          }
        ]
      ]
    },
    "Input Raw Transcript": {
      "main": [
        [
          {
            "node": "AI: Generate Summary",
            "type": "main"
          },
          {
            "node": "AI: Extract Keywords",
            "type": "main"
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 内容创作, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量6
分类2
节点类型4
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Piotr Sobolewski

Piotr Sobolewski

@piotrsobolewski

AI PhD with 7 years experience as a game dev CEO, currently teaching, helping others and building something new.

外部链接
在 n8n.io 查看

分享此工作流