Analyze YouTube comments automatically using Google Gemini AI. This specialized n8n workflow extracts comments, determines sentiment (positive/negative), and stores all results directly in Google Sheets. Install this n8n template today!
Download this n8n workflow template and start using it instantly.
Content Creators & Marketers: Those needing quick, scalable insights into audience reception.
Community Managers: Individuals who manage large volumes of user feedback and require automatic sentiment classification.
Data Analysts: Users looking for ready-made n8n templates to perform LLM-powered text analysis.
n8n Automation Specialists: Users deploying robust AI solutions using the n8n node ecosystem.
Manually reading and classifying sentiment across thousands of YouTube comments is impractical and time-consuming. This specialized n8n workflow solves this problem by providing a robust, automated solution. The n8n template leverages the power of the YouTube Data API to extract comments and pairs this data with the sophisticated analytical capabilities of the Google Gemini large language model (LLM). The entire process is orchestrated within this single n8n workflow. It not only fetches the comments but also handles API pagination automatically and ensures that the structured output, including the AI-determined sentiment, is consistently saved to Google Sheets, allowing for easy reporting and visualization. This is a highly efficient, production-ready n8n solution.
The entire process begins with a manual n8n trigger ('When clicking ‘Test workflow’').
ID Video n8n node, where the target YouTube video ID is set. Simultaneously, the Get comments n8n node retrieves the data from the designated Google Sheet (used for storing and tracking analysis progress).HTTP Request n8n node (Get API Comments) to call the YouTube API, requesting the comments for the specified video ID.If n8n node (Multipage?) checks the API response for a nextPageToken. If the token is present, the nextPageToken n8n node captures it and cycles the request back to the Get API Comments node, ensuring all pages of comments are fetched, regardless of the volume.Code n8n node (Comments) and then split into individual items (Split comments). These raw comments are immediately saved to a Google Sheet using the Save comments n8n node for archival.Get comments n8n node. The Loop Over Comments n8n node splits this data into manageable batches for efficient AI processing.Sentiment Analysis n8n node, which is configured to use the Google Gemini n8n node (a Langchain integration). This component determines the sentiment (e.g., positive, negative, neutral) for each comment.Update sentiment Google Sheets n8n node, which takes the analysis result (the determined sentiment) and writes it back to the corresponding row in the Google Sheet. This completes the full cycle of this powerful n8n workflow.To deploy this comprehensive n8n workflow template, follow these steps:
Get comments, Save comments, Update sentiment). Provide the necessary credentials and ensure you specify the correct Spreadsheet ID and Sheet Name for your operation.Get API Comments n8n node with your required YouTube Data API key and set up the video ID in the ID Video n8n node.Google Gemini n8n node with your appropriate API key to enable the AI capabilities required for the sentiment analysis n8n node. When clicking ‘Test workflow’ (Manual Trigger): Serves as the starting n8n trigger for testing and initiating the data collection process.
ID Video (Set n8n node): Essential n8n node used to define the specific YouTube video ID whose comments will be analyzed.
Get API Comments (HTTP Request n8n node): The crucial n8n node responsible for communicating with the YouTube Data API to fetch comment threads. Handles dynamic URL building based on the video ID and pagination tokens.
Multipage? (If n8n node): Implements flow control logic. This n8n node checks for the existence of a nextPageToken to determine if further API calls are required to complete the comment extraction.
Sentiment Analysis (Langchain n8n node): The core analysis n8n node. It leverages the provided text input (YouTube comments) and uses the connected language model to classify the emotional tone or sentiment.
Google Gemini (LM Chat Google Gemini n8n node): Provides the AI backend for the Langchain Sentiment Analysis n8n node. Ensures accurate and modern LLM-driven categorization.
Use this robust n8n workflow to automatically monitor a Google Sheet for new video IDs, scrape YouTube comments, perform advanced sentiment analysis using GPT-4o, and deliver a detailed report via Gmail.

Automate YouTube comment analysis using GPT-4o via this powerful n8n workflow. Get instant, summarized reports sent directly to your inbox using the Gmail n8n node.

Automate YouTube channel monitoring using an n8n workflow. Extract video transcripts via HTTP, summarize them with Gemini AI, and log rich data to Google Sheets.

Use this powerful n8n workflow to automate YouTube competitor analysis. Input a channel name, extract trending video metrics, calculate engagement, and seamlessly log all critical performance data into Google Sheets.

Automate sophisticated lead generation with this powerful n8n workflow. Scrape YouTube comments using Apify, and deploy an n8n AI Agent (Gemini) to autonomously enrich prospect data, finding social profiles and emails before storing everything neatly in Google Sheets.

Full-stack Web Developer based in Italy specialising in Marketing & AI-powered automations. For business enquiries, send me an email at [email protected] or add me on Linkedin.com/in/davideboizza







































