n8n YouTube Comment Sentiment Analyzer: Automate Emotion Tracking in 2026
Build a free n8n workflow to analyze YouTube comment sentiment using Google Sheets, HTTP Request, and If nodes. Step-by-step guide with JSON template for marketers and developers.
n8n YouTube Comment Sentiment Analyzer: Automate Emotion Tracking in 2026
In 2026, manual comment monitoring on YouTube is obsolete. With n8n workflow automation, you can build a YouTube comment sentiment analyzer that processes hundreds of comments in seconds—categorizing them as positive, negative, or neutral—and storing insights directly in Google Sheets. Whether you're a content creator, agency, or enterprise marketer, this guide delivers a production-ready solution using only free tools.
What Is YouTube Comment Sentiment Analysis?
Sentiment analysis is the process of using natural language processing (NLP) to determine the emotional tone behind text. Applied to YouTube comments, it helps you:
- Identify brand perception trends
- Detect PR crises early
- Measure campaign effectiveness
- Prioritize community engagement
Without automation, analyzing thousands of comments weekly is impossible. That’s where n8n—a powerful open-source workflow automation platform—comes in.
Why Use n8n for This Workflow?
n8n outperforms alternatives like Zapier or Make for technical users because it offers:
| Feature | n8n | Zapier | Make |
|---|---|---|---|
| Cost | Free self-hosted | Paid plans required | Limited free tier |
| Custom Logic | If, NoOp, SplitOut nodes | Basic filters | Visual but rigid |
| Code Access | Full JSON export/import | Closed system | Partial export |
| YouTube API Depth | Full control via HTTP Request | Limited triggers | Moderate flexibility |
For B2B agencies managing multiple clients or B2C creators scaling their presence, n8n provides unmatched flexibility at zero cost.
Required n8n Nodes Explained
This workflow uses six core n8n nodes. Here’s what each does:
1. Manual Trigger
Starts the workflow on demand—ideal for testing or scheduled runs.
2. HTTP Request Node
Calls the YouTube Data API v3 to fetch comments from any video using its ID.
3. SplitOut Node
Breaks the array of comments into individual items for per-comment processing.
4. If Node
Applies conditional logic—e.g., skip empty comments or filter by keyword.
5. Set Node
Formats data before output—adding timestamps, cleaning text, or enriching with metadata.
6. Google Sheets Node
Writes results to a spreadsheet with columns: Comment Text, Sentiment Score, Label, Timestamp.
Bonus: The NoOp node acts as a debug placeholder—useful during development to inspect data without side effects.
Step-by-Step Setup Guide
Step 1: Get Your YouTube API Key
- Go to Google Cloud Console
- Create a new project or select existing
- Enable YouTube Data API v3
- Create credentials → API key
- Restrict key to YouTube API only
Step 2: Prepare Your Google Sheet
Create a sheet with headers:
• Comment Text
• Sentiment Score
• Sentiment Label
• Video ID
• Timestamp
Share it with your n8n service account email (if using OAuth).
Step 3: Build the n8n Workflow
Follow this sequence:
- Manual Trigger → Input video ID
- HTTP Request → GET https://www.googleapis.com/youtube/v3/commentThreads
Params:part=snippet&videoId={{$json["videoId"]}}&key=YOUR_API_KEY - SplitOut → Split
itemsarray - If Node → Condition:
{{$json["snippet"]["topLevelComment"]["snippet"]["textDisplay"]}} !== "" - HTTP Request (NLP) → POST to Google Natural Language API
Body:{"document":{"type":"PLAIN_TEXT","content":"{{$json["snippet"]["topLevelComment"]["snippet"]["textDisplay"]}}"}} - Set Node → Map fields:
- Comment Text → NLP response
- Sentiment Score →documentSentiment.score
- Label → IF(score > 0.25, "Positive", IF(score < -0.25, "Negative", "Neutral")) - Google Sheets → Append row
Pro Tip: Add a Sticky Note node labeled “Error Handling” to document rate limits (YouTube API allows ~10,000 units/day).
Step 4: Import the Free JSON Template
Skip manual setup—import our pre-built workflow:
Click to expand n8n JSON template
{
"nodes": [
{
"parameters": { "triggerMode": "manual" },
"name": "Manual Trigger",
"type": "n8n-nodes-base.manualTrigger"
},
{
"parameters": {
"url": "https://www.googleapis.com/youtube/v3/commentThreads",
"method": "GET",
"parameters": {
"part": "snippet",
"videoId": "={{$json[\"videoId\"]}}",
"key": "YOUR_API_KEY"
}
},
"name": "Fetch YouTube Comments",
"type": "n8n-nodes-base.httpRequest"
},
{
"parameters": { "fieldToSplitOut": "items" },
"name": "Split Comments",
"type": "n8n-nodes-base.splitOut"
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"snippet\"][\"topLevelComment\"][\"snippet\"][\"textDisplay\"]}}",
"operation": "isEmpty",
"value2": false
}
]
}
},
"name": "Filter Empty Comments",
"type": "n8n-nodes-base.if"
},
{
"parameters": {
"url": "https://language.googleapis.com/v1/documents:analyzeSentiment",
"method": "POST",
"bodyParameters": {
"document.type": "PLAIN_TEXT",
"document.content": "={{$json[\"snippet\"][\"topLevelComment\"][\"snippet\"][\"textDisplay\"]}}"
},
"authentication": "predefinedCredentialType",
"nodeCredentialType": "googleApi"
},
"name": "Analyze Sentiment",
"type": "n8n-nodes-base.httpRequest"
},
{
"parameters": {
"values": {
"string": [
{ "name": "Comment Text", "value": "={{$json[\"documentSentiment\"]}}" },
{ "name": "Sentiment Score", "value": "={{$json[\"documentSentiment\"][\"score\"]}}" },
{ "name": "Sentiment Label", "value": "={{ $json[\"documentSentiment\"][\"score\"] > 0.25 ? \"Positive\" : ($json[\"documentSentiment\"][\"score\"] < -0.25 ? \"Negative\" : \"Neutral\") }}" }
]
}
},
"name": "Format Output",
"type": "n8n-nodes-base.set"
},
{
"parameters": {
"operation": "append",
"sheetId": "YOUR_SHEET_ID",
"range": "A:E"
},
"name": "Save to Google Sheets",
"type": "n8n-nodes-base.googleSheets"
}
],
"connections": { /* ... */ }
}Download the full JSON file here (GitHub link).
Advanced: Add Error Handling & Scalability
For production use:
- Rate Limiting: Add a NoOp node with a 1-second delay between NLP calls to avoid 429 errors.
- Empty Responses: Use the If node to check
documentSentimentexists before writing to Sheets. - Multi-Video Support: Replace Manual Trigger with Cron schedule + Google Sheets input (video IDs in column A).
B2B Use Cases: Agency & Enterprise Applications
Agencies managing 50+ client channels use this workflow to:
• Generate weekly sentiment reports
• Trigger Slack alerts for negative spikes
• Feed data into BI tools (Looker, Tableau)
• Benchmark against competitors
Enterprises integrate it with CRM systems to track product launch feedback in real time.
FAQ: People Also Ask
Q: Can n8n analyze YouTube comment emotions (not just positive/negative)?
A: Yes—replace Google NLP with AWS Comprehend or Azure Text Analytics for granular emotions (joy, anger, fear).
Q: Is this workflow free?
A: Absolutely. n8n is open-source, and Google NLP offers 5,000 free units/month. YouTube API costs are negligible (<$1/month for 100 videos).
Q: How accurate is the sentiment analysis?
A: Google NLP achieves ~85% accuracy on short social text. For higher precision, fine-tune with domain-specific training data.
Continue Reading
Deepen your knowledge with related articles
n8n Google Sheets Workflow: Automate Data Sync in 5 Steps (2026 Guide)
Master n8n Google Sheets automation with step-by-step workflows, error handling, multi-app pipelines (Supabase, Gmail), and downloadable JSON templates. Rank #1 in 2026.
n8n Workflow: Auto-Remove Background from Google Drive Images (Free JSON Template)
Download a ready-to-use n8n workflow that automatically removes backgrounds from Google Drive images using editImage & Remove.bg API. Includes error handling, batch processing & GDPR compliance.
n8n ManualTrigger Workflow: Complete 2026 Guide + Free JSON Template
Master n8n manualTrigger workflows. Get step-by-step setup, real use cases, JSON template, and expert tips to automate without code. Optimized for 2026 SEO.
Topics & Guidelines
Found this helpful?