🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

YouTube to Google Sheets, sentiment you can act on

Lisa Granqvist Partner Workflow Automation Expert

You read comments in YouTube Studio, copy a few into a doc, and tell yourself you’ll “analyze it later.” Later never comes, and the most useful feedback gets buried under hot takes and one-word reactions.

This is where YouTube sentiment automation pays off. A social media manager needs weekly insights without living in comment threads. A creator wants to know what’s landing (and what’s irritating people). And a small brand team trying to protect a launch can’t afford to miss a wave of negative sentiment.

This workflow turns raw YouTube comments into a filterable Google Sheet with sentiment labels, so you can spot patterns fast and actually act on them.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: YouTube to Google Sheets, sentiment you can act on

The Problem: Comment “analysis” that never becomes insight

YouTube gives you comments. It doesn’t give you structure. So you end up scanning hundreds of messages, trying to remember what you saw last week, and guessing whether the vibe is improving or getting worse. The painful part isn’t reading a single thread. It’s the cumulative grind: checking multiple videos, missing context, and realizing you can’t compare anything because it’s not in one place. Meanwhile, decisions still get made. You pick topics, hooks, and CTAs based on gut feel because the data is messy.

It adds up fast. Here’s where it breaks down in real life.

  • You end up sampling a handful of comments, which quietly biases your conclusions.
  • Manual copy-paste into spreadsheets creates errors, duplicates, and missing details like the original video URL.
  • There’s no consistent “label,” so reporting turns into subjective debates instead of decisions.
  • By the time you summarize feedback, the moment to respond or adjust creative has already passed.

The Solution: A Google Sheets dataset of labeled YouTube comments

This n8n workflow pulls YouTube video URLs from a Google Sheet, fetches the latest comments for each video through the YouTube API, then runs each comment through an AI Agent that assigns a clear sentiment label (Positive, Neutral, or Negative). The results are written back into a “Results” tab, which becomes your running dataset for reporting and pattern-spotting. Just as important, the workflow updates each video’s status to “Finished” so it won’t be processed again in the next run. That means you can maintain a simple pipeline: drop URLs in, mark them Ready, and let the workflow do the heavy lifting. Honestly, this is the difference between “we read comments” and “we learn from comments.”

The workflow starts when you run it in n8n (manual trigger by default). It checks the Video URLs sheet for rows marked Ready, pulls comments via HTTP request, then analyzes sentiment with the AI Agent using a chat model (Google Gemini by default). Finally, it stores the labeled comments in Google Sheets and marks each URL as Finished.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you review comments for 10 videos each week, and each video has about 40 comments worth scanning. If you spend even 30 seconds per comment plus a little time copying highlights, that’s roughly 2 hours weekly. With this workflow, you paste the 10 URLs into Google Sheets, mark them Ready (about 5 minutes), then let n8n fetch and label everything in the background. You come back to a Results tab you can filter in minutes, so you’re mostly spending time interpreting patterns, not collecting data.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store URLs and results.
  • YouTube Data API to fetch comments for each video.
  • Google Gemini API key (get it from Google AI Studio / your Google Cloud project).

Skill level: Intermediate. You’ll connect APIs (YouTube, Google Sheets, Gemini) and confirm the right sheet tabs are mapped to the right nodes.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

You trigger a run from n8n. By default, you click “Execute Workflow,” which is perfect for weekly reporting or campaign check-ins. If you want it hands-off, you can swap in a Google Sheets trigger later.

Google Sheets provides the work queue. The workflow reads the “Video URLs” tab and only picks up rows marked Ready in Column A (with the URL in Column B). It also skips empty URLs so you don’t burn API calls.

YouTube comments are fetched and cleaned up. For each valid URL, n8n calls the YouTube API, verifies the response succeeded, then splits the payload into individual comment items. No comments on a video? The workflow simply marks that URL as Finished and moves on.

An AI Agent labels sentiment and saves the dataset. Each comment is classified as Positive, Neutral, or Negative using the configured chat model (Gemini by default, with an OpenAI option available). The labeled rows are inserted into the “Results” tab, then the original URL is marked Finished so it won’t get reprocessed next time.

You can easily modify the sentiment categories and the analysis prompt to match your brand voice or reporting needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

This workflow starts on demand and immediately loads video URLs to process.

  1. Add and open Manual Run Trigger.
  2. Keep default settings (this node has no parameters).
  3. Connect Manual Run Trigger to Retrieve Video Links to match the execution flow.

Execution Flow: Manual Run TriggerRetrieve Video Links

Step 2: Connect Google Sheets

Google Sheets is used for input video URLs and for storing comment insights and status updates.

  1. Open Retrieve Video Links and select your spreadsheet in Document and Sheet.
  2. Confirm the filter is set to retrieve rows where status equals =Ready.
  3. Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Video Links.
  4. Open Store Comment Insights and set Operation to appendOrUpdate.
  5. Credential Required: Connect your googleSheetsOAuth2Api credentials in Store Comment Insights.
  6. Open Set Video Status and set Operation to update.
  7. Credential Required: Connect your googleSheetsOAuth2Api credentials in Set Video Status.

Execution Flow: Retrieve Video LinksValidate Video URLBatch Iterate Items

Step 3: Configure YouTube Comment Retrieval

The workflow validates each URL, fetches comments from YouTube, verifies the response, and splits comments into individual items.

  1. Open Validate Video URL and confirm the condition checks for a non-empty URL: ={{ $json.video_url }}.
  2. Open Batch Iterate Items and keep default settings for batch processing.
  3. Open API Fetch Comments and set URL to https://www.googleapis.com/youtube/v3/commentThreads.
  4. Set query parameters in API Fetch Comments:
    • part: snippet
    • videoId: ={{ $json.video_url.match(/(?:v=|\/)([0-9A-Za-z_-]{11})/)[1] || ''}}
    • limit: 100
  5. Credential Required: Connect your youTubeOAuth2Api credentials in API Fetch Comments.
  6. Open Verify HTTP Success and confirm the check for ={{ $json.statusCode }} equals 200.
  7. Open Separate Items and set Field to Split Out to body.items.

Execution Flow: API Fetch CommentsVerify HTTP SuccessSeparate ItemsConfirm Comment Exists

⚠️ Common Pitfall: The videoId extraction relies on the regex in video_url.match(/(?:v=|\/)([0-9A-Za-z_-]{11})/)[1]. Ensure your sheet stores valid YouTube URLs.

Step 4: Set Up Analyze Comment Sentiment

This step runs sentiment analysis on each comment and passes the results to storage.

  1. Open Confirm Comment Exists and verify it checks for ={{ $json.snippet.videoId }} existence before analysis.
  2. Open Analyze Comment Sentiment and set Input Text to ={{ $json.snippet.topLevelComment.snippet.textOriginal }}.
  3. Ensure the sentiment categories are configured as Positive, Neutral, Negative in Analyze Comment Sentiment.
  4. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine (the language model powering Analyze Comment Sentiment).
  5. If you plan to use OpenAI Chat Engine, connect Credential Required: openAiApi and wire it to a processing node (it is currently not linked to the flow).

Execution Flow: Confirm Comment ExistsAnalyze Comment SentimentStore Comment Insights

Step 5: Configure Output Updates

Sentiment results are written to a results sheet, and each processed video is marked as finished.

  1. In Store Comment Insights, map columns using expressions such as:
    • sentiment: ={{ $json.sentimentAnalysis.category }}
    • comment: ={{ $json.snippet.topLevelComment.snippet.textOriginal }}
    • video_url: =https://www.youtube.com/watch?v={{ $json.snippet.videoId }}
    • published_at: ={{ $json.snippet.topLevelComment.snippet.publishedAt.toString().slice(0, 19).replace('T', ' ') }}
  2. In Set Video Status, set status to Finished.
  3. Set row_number to ={{ $('Retrieve Video Links').item.json.row_number }} and last_fetched_time to ={{ $now.toISO().toString().slice(0, 19).replace('T', ' ') }}.
  4. Confirm that Store Comment Insights outputs to Set Video Status, then to Batch Iterate Items for the next video.

Execution Flow: Store Comment InsightsSet Video StatusBatch Iterate Items

Final Step: Test and Activate Your Workflow

Run a manual test to validate data flow and ensure sheets are updated correctly.

  1. Click Execute Workflow from Manual Run Trigger to start the pipeline.
  2. Verify that Store Comment Insights appends or updates rows with sentiment data.
  3. Check that Set Video Status updates status to Finished and writes a timestamp.
  4. Once confirmed, toggle the workflow to Active to use it in production.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • YouTube API credentials can expire or lack the right scope. If calls fail, check your Google Cloud Console credentials and the n8n credential attached to the “HTTP Request – Get Comments” node first.
  • If you’re using Wait nodes or external processing, timing can drift. Increase the wait duration if downstream nodes try to analyze before comment data is fully available.
  • Default AI prompts are bland, and bland prompts create bland labels. Tighten the instructions inside “AI Agent – Analyze Sentiment Of Every Comment” so the model treats sarcasm, slang, and creator-specific context more reliably.

Frequently Asked Questions

How long does it take to set up this YouTube sentiment automation automation?

About an hour if your Google APIs are already enabled.

Do I need coding skills to automate YouTube sentiment automation?

No. You’ll mainly connect accounts and paste in API keys. The “logic” is already built into the workflow.

Is n8n free to use for this YouTube sentiment automation workflow?

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 (usually small for sentiment labeling) and YouTube API quota limits.

Where can I host n8n to run this automation?

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.

Can I customize this YouTube sentiment automation workflow for brand-specific sentiment categories?

Yes, and you should. In “AI Agent – Analyze Sentiment Of Every Comment,” change the instruction prompt and the allowed labels (for example, add “Feature Request” or “Bug Report” alongside Positive/Neutral/Negative). You can also swap the chat model by replacing the “Google Gemini Chat Model” with the “OpenAI Chat Model” node if that better matches your stack.

Why is my YouTube connection failing in this workflow?

Most of the time it’s quota limits or an API key/OAuth credential that doesn’t have the right access. Verify the YouTube Data API is enabled in Google Cloud Console, then confirm the credential attached to “HTTP Request – Get Comments” is the one you intended. Also check the actual video URL format in your sheet, because malformed URLs can lead to empty video IDs and failed requests. If it worked yesterday and fails today, regenerate the credential and re-save it in n8n.

How many comments can this YouTube sentiment automation automation handle?

A lot, but you’re constrained by YouTube API quota and how large your runs are. On n8n Cloud, your monthly execution limit depends on plan; on self-hosting, executions are only limited by your server. In practice, most teams process batches of videos (like 10–50 at a time), then review the sheet, then run again.

Is this YouTube sentiment automation automation better than using Zapier or Make?

Usually, yes for this use case. You’re doing multi-step logic (fetch, split into items, analyze each comment, write rows back, update statuses), and n8n handles that kind of branching cleanly. You also get the option to self-host, which is handy if you want high volume without paying per task. Zapier or Make can still work if you only need a very small setup, but sentiment labeling per comment gets expensive and fiddly fast. Talk to an automation expert if you want a quick recommendation for your volume.

Once this is running, your comment sentiment stops living in your head. It lives in a sheet you can filter, report on, and use to make the next decision.

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.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal