Automate YouTube comment analysis using a powerful n8n workflow. Integrate OpenAI for sentiment classification (Positive/Negative/Neutral) and store results automatically in Google Sheets. Utilize this specialized n8n template for data logging.
Download this n8n workflow template and start using it instantly.
Digital Marketing Agencies: Monitoring public reception and campaign effectiveness across YouTube content.
Content Creators & YouTubers: Automatically tracking audience feedback and sentiment across their video library.
Market Researchers: Collecting structured, classified social data for analysis.
Automation Specialists: Seeking advanced examples of using conditional logic and API pagination within a complex n8n workflow.
Analyzing hundreds or thousands of YouTube comments manually is tedious and time-consuming. This specialized n8n workflow solves this problem by creating an automated pipeline that connects the YouTube Data API, OpenAI's powerful language models, and Google Sheets for structured storage.
This comprehensive n8n template is designed to be highly efficient, featuring internal rate-limiting logic that checks a nextfetchtime timestamp stored in Google Sheets before executing the resource-intensive YouTube API calls. Once new comments are fetched, the workflow uses the LangChain Sentiment Analysis n8n node, powered by OpenAI, to categorize each comment as Positive, Neutral, or Negative. Finally, the categorized data is persisted in a Google Sheet, ensuring that you always have up-to-date, actionable sentiment data without manual intervention. This entire process demonstrates the power and flexibility of a robust n8n automation solution.
The execution of this n8n workflow begins with the Manual Trigger (which should be replaced by a Cron n8n trigger for scheduled operation).
nextfetchtime). It uses two 'If' n8n node checks ('check next fetch time is available or not' and 'check next fetch time is before the current time') to implement throttling, ensuring API calls are made only after a waiting period (5 minutes, as defined in the final step).gpt-4o-mini model to determine and output the sentiment category (Positive, Neutral, or Negative).appendOrUpdate operation on the main result sheet using the comment ID as the unique key, preventing duplicate entries. This step ensures consistent data logging.lastfetchedtime and scheduling the next permitted execution time (5 minutes in the future). This sophisticated flow ensures reliable, scheduled operation of the n8n workflow.To deploy this expert n8n workflow template, follow these steps:
commentId, sentiment, videourl, etc.).lastfetchedtime, nextfetch_time). When clicking ‘Test workflow’ (Manual Trigger): The initiating n8n trigger. Used for testing, but typically replaced by a scheduling n8n node for production.
Get Video Urls from Google Sheet (Google Sheets): Reads the list of YouTube URLs and timing data from the designated configuration sheet (Sheet2) using a service account.
check next fetch time is available or not (If): Core logic n8n node. Determines if the workflow is permitted to proceed based on whether the nextfetchtime has been set previously.
Get Comments for video urls (HTTP Request): Connects to the YouTube Data API. Extracts the video ID from the URL and fetches up to 100 comments per request, utilizing custom pagination logic to retrieve large datasets efficiently.
Check Success Response (If): Ensures the YouTube API request returned a successful status code (200) before processing the returned data.
Split Out (Split Out): Crucial n8n node for iteration. It breaks the array of comments received from the API into separate items so that each comment can be analyzed individually by the AI.
OpenAI Chat Model (LangChain Chat OpenAI): Provides the AI engine (using gpt-4o-mini) required by the subsequent sentiment analysis component.
Analyze sentiment of every comment (LangChain Sentiment Analysis): Executes the core AI task. It takes the raw comment text and classifies its emotional tone into Positive, Neutral, or Negative. This specialized n8n node streamlines interaction with large language models.
Insert and update comment in google sheet (Google Sheets): The destination n8n node. Appends new comments or updates existing ones based on the unique commentId in the primary results sheet (Sheet1).
Update last fetched time and nextfetchtime (Google Sheets): The final step of this n8n workflow. It updates the configuration sheet (Sheet2) with the current timestamp and schedules the next run 5 minutes later, enforcing rate limiting.
Automate podcast-to-TikTok conversion using this advanced n8n workflow. It uses Gemini AI for highlight extraction, AssemblyAI for transcription, and auto-posts viral clips to TikTok. Install this n8n templates now.

Automate your short-form video marketing using this advanced n8n workflow. It leverages OpenAI for scripting, integrates media generation services (like Replicate), handles video rendering, and offers multi-channel publishing options, including direct TikTok upload.

Use this powerful n8n workflow to automatically scrape YouTube transcripts via Apify, process the text, and upsert the data into Pinecone using OpenAI embeddings for RAG applications.

Automate proof-of-delivery tracking using this sophisticated n8n workflow. Capture GPS, photos, and shipment numbers via Telegram, upload to Google Drive, and notify the team via Gmail and Google Sheets. Ideal n8n templates for logistics.

Use this powerful n8n workflow to automatically extract shipment data from Gmail, calculate CO2 emissions using the Carbon Interface API, and log results in Google Sheets. Accelerate your sustainability reporting with these n8n templates.









































