n8nflow.net logo

YouTube Comment Scraper & Analyzer with GPT-4o + Email Summary Report

by Amit Mehtaโ€ขUpdated: Last update 4 months agoโ€ขSource: n8n.io
Loading workflow viewer...

Getting Started

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:

  • YouTubers monitoring audience sentiment
  • Marketing teams analyzing campaign feedback
  • Community managers summarizing engagement

Setup Instructions

1. Upload the Spreadsheet

  • File name: Youtube_Video
  • Sheet structure:
    | ID | Video Title | YouTube Video ID | Status |
  • Add video IDs and set their Status as Pending

2. Configure Google Sheets Nodes

Connect your Google account to:

  • Pick Video IDs from Google Sheet
  • Update Status on Google Sheet

3. Add API Credentials

  • YouTube API Key โ†’ for comment + video scraping nodes
  • OpenAI API Key โ†’ for analyzing comments
  • Gmail Account โ†’ for sending the summary email

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

  • Change the AI prompt for tone, length, or custom metrics
  • Send results to Slack or Telegram instead of Gmail
  • Export summaries to Notion, Airtable, or PDF
  • Schedule it daily/weekly for recurring analysis

๐Ÿ“’ 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

  • Add one test video with a valid YouTube video ID and status = Pending
  • Monitor the workflow logs to confirm API responses
  • Confirm summary delivery in your inbox
  • Verify that status updates in the sheet

๐Ÿท Suggested Tags & Categories

  • #YouTube
  • #OpenAI
  • #Automation
  • #Marketing
  • #Email
  • #Analytics