YouTube to Google Sheets, comment sentiment sorted
YouTube comments pile up fast. Then you’re stuck skimming, guessing the “vibe,” and missing the one negative thread that turns into a bigger problem later.
This YouTube sentiment automation is a lifesaver for marketing managers pulling campaign reports, creators tracking audience reactions, and agency folks who need client-ready insights without the manual slog.
You’ll see how this workflow collects every comment from a video, scores sentiment with AI, and writes clean labels and confidence scores into Google Sheets so you can spot shifts early and report with receipts.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: YouTube to Google Sheets, comment sentiment sorted
flowchart LR
subgraph sg0["Manual Start Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Manual Start Trigger", pos: "b", h: 48 }
n1@{ icon: "mdi:robot", form: "rounded", label: "Emotion Scoring", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Comment Builder"]
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Separate Comment Items", pos: "b", h: 48 }
n4@{ icon: "mdi:database", form: "rounded", label: "Store Comment Rows", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check More Pages", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Assign Next Page Token", pos: "b", h: 48 }
n7@{ icon: "mdi:database", form: "rounded", label: "Retrieve Stored Comments", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Fetch API Comments"]
n9@{ icon: "mdi:swap-vertical", form: "rounded", label: "Set Video Identifier", pos: "b", h: 48 }
n10@{ icon: "mdi:swap-vertical", form: "rounded", label: "Iterate Comment Batches", pos: "b", h: 48 }
n11@{ icon: "mdi:database", form: "rounded", label: "Write Sentiment Results", pos: "b", h: 48 }
n12@{ icon: "mdi:brain", form: "rounded", label: "Gemini Chat Model", pos: "b", h: 48 }
n2 --> n3
n9 --> n8
n5 --> n6
n7 --> n10
n12 -.-> n1
n6 --> n8
n3 --> n4
n8 --> n5
n8 --> n2
n11 --> n10
n10 --> n1
n1 --> n11
n0 --> n7
n0 --> n9
end
subgraph sg1["Flow 2"]
direction LR
n13["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/quickChart.svg' width='40' height='40' /></div><br/>Utility: Generate Quick Chart"]
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n1 ai
class n12 aiModel
class n5 decision
class n4,n7,n11 database
class n8 api
class n2 code
classDef customIcon fill:none,stroke:none
class n2,n8,n13 customIcon
The Problem: Comment Sentiment Is Hard to Track at Scale
Reading YouTube comments works… until it doesn’t. A video gets a few hundred comments and suddenly “just skim them” becomes a half-day task, plus you still end up with a vague summary like “people liked it.” Even worse, your brain is not a database. You remember the loudest comments, not the most common sentiment. Meanwhile, you still need something shareable for a weekly update, a client report, or a post-launch review, and screenshots do not scale.
The friction compounds. It’s not one painful step, it’s the repeat work you do every single time a new video goes live.
- Copying comments by hand into a spreadsheet is slow, and it’s easy to miss replies or whole threads.
- Manual “sentiment” notes are inconsistent, which means trendlines are basically fiction.
- Pagination is a quiet killer because big videos have multiple pages of comments that you never fully pull.
- Without a “processed” marker, you re-check the same comments and waste time every week.
The Solution: Auto-Collect Comments, Score Sentiment, Sort It in Sheets
This workflow pulls every comment from a specific YouTube video, then uses an AI model to label each one as Positive, Neutral, or Negative. It doesn’t stop at a label. You also get a strength score and a confidence score, which makes reporting less hand-wavy and a lot more defensible. Comments are saved into Google Sheets as raw text first, then the workflow loops through them in batches, analyzes sentiment, and writes the results back to the sheet. It also checks for additional pages of comments and keeps going until it reaches the end, so you’re not stuck with partial data.
The workflow starts when you run it in n8n (manual trigger, or scheduled if you want). It fetches comments via the YouTube API, normalizes them into individual rows, and stores them in Google Sheets. Then the Gemini chat model plus the sentiment scoring step adds sentiment, strength, and confidence, and updates the same rows so you can filter and chart immediately.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you publish 3 videos a week and each one gets about 300 comments. Manually copying, scanning, and “summarizing sentiment” at maybe 1 minute per comment is about 5 hours per video, so roughly 15 hours weekly. With this workflow, you spend about 5 minutes dropping in the video ID and running the automation, then maybe 20 minutes reviewing the sheet and filtering negatives by confidence. You’re back to under an hour a week, and the data is organized enough to reuse in every report.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing comments and sentiment columns
- YouTube Data API to fetch comments for a video
- Gemini API credentials (get it from Google AI Studio / Google Cloud)
- YouTube API key (get it from Google Developers Console)
Skill level: Beginner. You’ll paste API keys, set a video ID, and map a few columns in Google Sheets.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Video ID kicks things off. You enter the YouTube video ID (or set it once) and start the workflow manually in n8n. If you want ongoing monitoring, you can schedule runs later.
Comments are pulled from the YouTube API. n8n uses an HTTP request to fetch comment threads, then checks if there are more pages. If there are, it assigns the next page token and keeps going until everything is retrieved.
Each comment becomes a spreadsheet row. A small “comment builder” step structures the text, then comments are split into individual items and written into Google Sheets (including a tracking column so you can mark what’s already processed).
AI scores sentiment and writes results back. The workflow batches rows, analyzes each comment with the Gemini chat model plus sentiment scoring, then updates Google Sheets with sentiment, strength, and confidence so you can filter instantly.
You can easily modify the sentiment labels or add extra fields (like “topic,” “request,” or “toxic”) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow with a manual trigger so you can run it on demand while setting up and testing.
- Add a Manual Start Trigger node and keep the default settings.
- Connect Manual Start Trigger so it outputs to both Retrieve Stored Comments and Set Video Identifier in parallel.
Step 2: Connect Google Sheets
Configure the Google Sheets nodes that store and retrieve comment data and sentiment results.
- Open Store Comment Rows and connect your spreadsheet destination.
- Open Retrieve Stored Comments and select the same spreadsheet or another sheet that contains raw comments.
- Open Write Sentiment Results and select the sheet where sentiment outputs will be written.
- Credential Required: Connect your Google Sheets credentials to all Google Sheets nodes (Store Comment Rows, Retrieve Stored Comments, Write Sentiment Results).
Step 3: Configure Comment Fetching and Pagination
Set the video identifier, call the API, and manage pagination for multiple pages of comments.
- In Set Video Identifier, set the video ID field(s) needed by the API request.
- In Fetch API Comments, configure the HTTP request URL, method, and any headers or query parameters required by the comments API.
- Ensure Fetch API Comments outputs to both Check More Pages and Comment Builder in parallel.
- Use Check More Pages to evaluate whether a next-page token exists.
- In Assign Next Page Token, map the next-page token into the request input for the next Fetch API Comments call.
- Credential Required: If your API needs authentication, add the appropriate credentials in Fetch API Comments.
Step 4: Build and Store Comment Items
Transform API response data into individual comment rows and store them for analysis.
- In Comment Builder, map the API response into a clean comment object structure.
- Use Separate Comment Items to split the array into single comment items.
- Connect Separate Comment Items to Store Comment Rows to append each comment to your sheet.
Step 5: Set Up Sentiment Processing and AI
Batch comments, score sentiment, and write the results back to Google Sheets.
- Connect Retrieve Stored Comments to Iterate Comment Batches to control batch size for analysis.
- Ensure Iterate Comment Batches routes items to Emotion Scoring for sentiment analysis.
- Verify Emotion Scoring outputs to Write Sentiment Results so scores are recorded.
- Connect Gemini Chat Model as the language model for Emotion Scoring (AI sub-node connection).
- Credential Required: Connect your Google Gemini credentials in Gemini Chat Model (credentials belong to the parent model node, not Emotion Scoring).
Step 6: Configure Visualization Output (Optional)
Generate a visual chart of sentiment distribution if needed.
- Open Utility: Generate Quick Chart and set your chart configuration data (labels and values).
- Credential Required: If your QuickChart usage requires an API key, add credentials in Utility: Generate Quick Chart.
Step 7: Test and Activate Your Workflow
Run a full test to confirm comments are fetched, stored, analyzed, and written back to Google Sheets.
- Click Execute Workflow on Manual Start Trigger to run the flow.
- Confirm Fetch API Comments retrieves data and Store Comment Rows adds rows to the sheet.
- Verify Emotion Scoring produces sentiment values and Write Sentiment Results writes results to the target sheet.
- When successful, toggle the workflow to Active for production use.
Common Gotchas
- YouTube Data API credentials can expire or lack quota access. If things break, check your Google Cloud API key restrictions and quota page first.
- If you’re using Wait nodes or external processing, run times vary. Bump up the wait duration if downstream nodes fail because the sheet rows are not written yet.
- Default prompts in AI nodes are generic. Add your brand definitions of “positive” and “negative” early or you will keep second-guessing the labels.
Frequently Asked Questions
About 30 minutes if your APIs are ready.
No. You’ll mostly paste API keys and match Google Sheet columns to the right fields.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Gemini API usage costs (usually small for comment text).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, but you’ll want to adjust the “Set Video Identifier” step so it reads video IDs from a Google Sheet instead of a fixed value. You can also extend the “Store Comment Rows” and “Write Sentiment Results” mapping to include channel name, publish date, or campaign tags. Common customizations include adding a “topic” label, detecting toxic comments, and routing high-confidence negatives to Telegram.
Most of the time it’s an expired Google authorization in n8n, so reconnect the account and reselect the target spreadsheet. Also confirm the sheet name and required columns exist (VIDEO_ID, COMMENTS, SENTIMENT, STRENGTH, CONFIDENCE, plus your tracking column). If you’re writing lots of rows, Google Sheets API limits can show up as intermittent failures, so batching helps.
A lot, because it paginates and processes in batches, but your practical limit is API quota and how big you want the sheet to get.
Often, yes, especially when you need pagination, looping, and a “don’t reprocess the same row” tracking column. Zapier and Make can do parts of this, but multi-page comment retrieval plus batch sentiment scoring gets clunky fast, and you’ll feel it in task counts. n8n also gives you the option to self-host, which is handy when you want higher volume without worrying about execution limits. The trade-off is setup: you have more control, so there are a few more knobs to turn. If you want someone to sanity-check your setup or adapt it for client reporting, Talk to an automation expert.
You end up with a living spreadsheet of audience sentiment that updates on demand. Honestly, once you have that, weekly reporting feels almost unfair.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.