📊 YouTube comment scraper & analyzer with GPT-4o + email summary report

2,860 views · 📊 Market Research & Insights

💡 Pro Tip — YouTube’s API quotas can be a bottleneck when you’re pulling data at scale. ScraperNode is a community node with dedicated scrapers for channels, videos, and comments — no quota limits, just structured data.

View All Scrapers

Description

How it Works

This workflow automates the collection and analysis of YouTube comments from a video and sends a summary report via email, using Google Sheets, the YouTube API, OpenAI (GPT-4o), and Gmail.

Whether you’re a content creator, brand manager, or social media analyst, this workflow helps you automate sentiment analysis and receive insights directly in your inbox — all triggered from a simple spreadsheet.

🎯 Use Case

Ideal for:

Setup Instructions

1. Upload the Spreadsheet

2. Configure Google Sheets Nodes

Connect your Google account to:

3. Add API Credentials

4. Activate the Workflow

Once live, the workflow will:

  1. Watch for new or updated rows in the spreadsheet
  2. Scrape comments using the YouTube API
  3. Analyze sentiment and key themes via GPT-4o
  4. Send a formatted HTML email with the summary
  5. Update the spreadsheet status to Mail sent

🔁 Workflow Logic

  1. Trigger: New/updated row in Google Sheet
  2. Retrieve: YouTube video metadata + comments
  3. Analyze: Comments using GPT-4o
  4. Email: Summary report via Gmail
  5. Update: Spreadsheet status to Mail sent

🧩 Node Descriptions

Node NameDescription
Pick Video IDs from Google SheetWatches the spreadsheet and retrieves pending video IDs
IfChecks whether status is ‘Pending’
LimitRestricts the number of processed rows
Set Video DetailsPrepares video info (e.g., title, channel)
Get YouTube Video DetailsFetches metadata (title, channel, etc.)
Get YouTube Video CommentsPulls top-level comments using YouTube API
Prepare Comments DataFormats comment text for OpenAI
AI AgentSummarizes comments using OpenAI’s GPT-4o
Prepare HTML for EmailConverts summary into HTML for email body
Gmail Account ConfigurationSends the email report via Gmail
Update Status on Google SheetMarks the row as ‘Mail sent’

🛠️ Customization Tips

📒 Suggested Sticky Notes for Workflow

Node/SectionSticky Note Content
Pick Video IDs from Google Sheet”Triggers on new YouTube videos in your spreadsheet”
AI Agent”Uses OpenAI to generate an analysis summary – customize prompt as needed”
Gmail”Sends summary report – you can update subject, recipients, or style”
Update Status”Marks video as processed to avoid duplicate runs”

📎 Required Files

File NamePurpose
Youtube_VideoGoogle Sheet to hold YouTube video IDs and status
Youtube_Comment_Scraper.jsonMain n8n workflow export for this automation

🧪 Testing Tips

🏷 Suggested Tags & Categories

🔗 Nodes Used

Google Sheets, HTTP Request, Gmail, YouTube, Google Sheets Trigger, AI Agent

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup