π Analyze YouTube comments with OpenAI and send reports via email and chat
β‘ 16 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.
Description
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 IDfrom 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
commentThreadsandvideoresources 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"inEdit 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, orvideoidto 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
- WhatsApp: Chat on WhatsApp
- Discord: SpaGreen Community
- Facebook Group: SpaGreen Support
- Website: spagreen.net
- Developer Portfolio: Codecanyon SpaGreen
π Nodes Used
Telegram, Telegram Trigger, Google Drive, Gmail, Markdown, AI Agent
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File