Skip to main content

Analyze YouTube comments with OpenAI and send reports via email and chat

Workflow preview

Workflow preview
100%
Analyze YouTube comments with OpenAI and send reports via email and chat preview
Open on n8n.io

1. Workflow Overview

Who it's for This advanced n8n workflow is designed for YouTube content creators , social media managers , digital marketers , and agency owners who need a deep, automated understanding of their vi...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.gmail, n8n-nodes-base.googledrive, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.noop, n8n-nodes-base.telegram, n8n-nodes-base.telegramtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by SpaGreen Creative.

Original n8n.io source

1.1 Workflow description

Title
Analyze YouTube comments with OpenAI and send reports via email and chat
Workflow name
Analyze YouTube comments with OpenAI and send reports via email and chat

Who it's for

This advanced n8n workflow is designed for YouTube content creators, social media managers, digital marketers, and agency owners who need a deep, automated understanding of their video performance. It acts as a virtual audience research analyst, automatically fetching video details, scraping all comments (handling pagination), and analyzing them with AI to extract sentiment, trends, and content ideas.

Features

  • Complete Comment Scraping: Fetches all YouTube comments using automatic API pagination.
  • Telegram Control: Start analysis directly from Telegram with Admin/User access checks and owner alerts.
  • Smart ID Extraction: Detects and extracts Video ID from different message formats automatically.
  • AI-Powered Analysis: Uses LangChain + OpenAI to generate insights on sentiment, audience, engagement, and content opportunities.
  • Multi-Format Reporting: Sends reports in HTML/Markdown through Gmail, Telegram, and WhatsApp simultaneously.
  • Cloud Archiving: Saves reports automatically to Google Drive with the video title as the document name.
  • Actionable Insights: Identifies viewer pain points, keyword ideas, and optimization opportunities for future videos.

Requirements

  • YouTube Data API v3: A valid Google API Key with access to the commentThreads and video resources is required for fetching data.
  • OpenAI API: Required for the LangChain Agent (using models like gpt-4.1-mini) to analyze the data and generate the comprehensive report.
  • Telegram API: For triggering the workflow and receiving the final report.
  • Gmail & Google Drive: Google OAuth2 credentials are needed to send the report email and save the file to your drive.
  • Rapiwa (WhatsApp): API credentials to send the report via WhatsApp messages.

Important Notes

  • API Key Configuration: Replace "add_your_google_API_key" in Edit Fields (Set API key) with your valid YouTube Data API key.
  • Telegram Setup: Add your Admin ID and Chat ID in the Telegram message nodes for correct notifications.
  • Video Input: Send a Telegram message containing VIDEO_ID, video id, or videoid to trigger the workflow.
  • Cost Management: Large videos with many comments can use high OpenAI token limits since all comments are analyzed.
  • Permissions: Make sure YouTube Data API v3 is enabled in your Google Cloud Project.

Support & Help

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Gmail Report

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Save Report to Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 5 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 6 - Code (Check Video ID & if exist then Separate it)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - No Operation, do nothing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 8 - If (Check Admin)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 9 - If (Check Perfect Message for 'SEO Analysis')

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 10 - If (Check User Message)

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 11 - Send a alert message to Admin

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 12 - Telegram Trigger1

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 13 - Sticky Note15

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Split Out Comments

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 15 - Combine Comments

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1

Block 16 - Create One JSON Object

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 17 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Send a text message

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 19 - Rapiwa

Type / Role
n8n-nodes-rapiwa.rapiwa - rapiwa
Config choices
Version 1

Block 20 - Edit Fields (Set API key)

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Code (Make Video Comments Pagination)

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - YouTube Video Report AI

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 23 - Markdown to HTML Format

Type / Role
n8n-nodes-base.markdown - markdown
Config choices
Version 1

Block 24 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Analyze YouTube comments with OpenAI and send reports via email and chat
Complexity advanced
Nodes 25
Categories Market Research, AI Summarization
Author SpaGreen Creative
Published 19 May 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15806/15806.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze YouTube comments with OpenAI and send reports via email and chat do?

Who it's for This advanced n8n workflow is designed for YouTube content creators , social media managers , digital marketers , and agency owners who need a deep, automated understanding of their vi...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.