Skip to main content

Analyze YouTube comments sentiment with Gemini AI and Google Sheets

Workflow preview

Workflow preview
100%
Analyze YouTube comments sentiment with Gemini AI and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow demonstrates how to use this AI Agent to extract, process, and analyze YouTube video comments to understand your audience beyond the view count. Use cases are many: Whether you're...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.splitout, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.splitinbatches, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Agent Circle.

Original n8n.io source

1.1 Workflow description

Title
Analyze YouTube comments sentiment with Gemini AI and Google Sheets
Workflow name
Analyze YouTube comments sentiment with Gemini AI and Google Sheets

This n8n workflow demonstrates how to use this AI Agent to extract, process, and analyze YouTube video comments to understand your audience beyond the view count.

Use cases are many: Whether you're a YouTube creator exploring feedback, a social media manager fine-tuning engagement strategy, a brand team monitoring campaign sentiment, or a marketing agency conducting audits – this tool brings audience voice to the forefront with structured insights.

How It Works

  • The workflow starts when you manually click Test Workflow or Execute Workflow in n8n.
  • It collects all the rows marked as Ready in Column A in the Video URLs tab of your connected Google Sheet.
  • The tool checks if the URLs are not empty first, then it loops through each valid video URL and sends a GET request to the YouTube API to fetch its comments.
  • It checks the response from the YouTube API. If the call is successful, the comment data is extracted and split into individual entries.
  • The tool then checks whether the video URL has any comment.
  • If no comment is found, the video URL’s status in Column A in the Video URLs tab is updated to Finished right away.
  • If comments are available, they are passed to the AI Agent - Analyze Sentiment Of Every Comment using the Google Gemini chat model, where each comment is analyzed and classified by sentiment: Positive, Neutral, or Negative.
  • Next, the analysis results are saved to the Results tab in your connected Google Sheet.
  • Finally, the original video URL’s status in Column A in the Video URLs tab is updated to Finished, ensuring it won’t be reprocessed in the loop.

How To Set Up

  • Download the working package and import it into your n8n interface.
  • Duplicate the YouTube Comment Analyzer Google Sheet template to your Google Sheets account.
  • Set up necessary credentials for tools access and usability:
    • For Google Sheets access, ensure each node is properly connected to the correct tab in your connected Google Sheet template: Node Get Video URLs → connected to the Video URLs tab Node Insert Comment Data & Analysis → connected to the Results tab Node Update Video Status → connected to the Video URLs tab
    • For YouTube access, connect to its API in the following node: Node HTTP Request - Get Comments
    • For Google Gemini access, connect to its API in the following node: Node Google Gemini Chat Model
  • Enter video URLs in Column B in the Video URLs tab in your connected Google Sheet and mark their status in Column A as Ready.
  • Click Test Workflow or Execute Workflow to run the process.
  • Check the results in the Results tab of the connected Google Sheet template to view all collected comments along with their sentiment analysis.

Requirements

  • Basic setup in Google Cloud Console (OAuth or API Key method enabled) with enabled access to YouTube and Google Sheets.
  • API access to Google Gemini for sentiment analysis.

How To Customize

  • By default, the workflow is manually triggered in N8N. However, you can automate the process by adding a Google Sheets trigger that monitors new entries in your connected Google Sheet template and starts the workflow automatically.
  • In the AI Agent - Analyze Sentiment Of Every Comment node, you can also change the AI chat model. By default, it uses Google Gemini, but you can easily replace it with any other compatible provider such as Deepseek, Grok, etc.
  • You can customize the sentiment categories and instruction prompt for the AI Agent in the AI Agent – Analyze Sentiment Of Every Comment node following your needs. Then, the Agent can return sentiment results that align more closely with your intended use case.
  • Also, feel free to integrate additional nodes (like Telegram or Email) to notify you and your team whenever updates and analysis succeed or fail.

Need Help?

If you’d like this workflow customized, or if you’re looking to build a tailored AI Agent for your own business - please feel free to reach out to Agent Circle. We’re always here to support and help you to bring automation ideas to life.

Join our community on different platforms for assistance, inspiration and tips from others.

Website: https://www.agentcircle.ai/ Etsy: https://www.etsy.com/shop/AgentCircle Gumroad: http://agentcircle.gumroad.com/ Discord Global: https://discord.gg/d8SkCzKwnP FB Page Global: https://www.facebook.com/agentcircle/ FB Group Global: https://www.facebook.com/groups/aiagentcircle/ X: https://x.com/agent_circle YouTube: https://www.youtube.com/@agentcircle LinkedIn: https://www.linkedin.com/company/agentcircle

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 4 - HTTP Request - Get Comments

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 5 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 6 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 8 - Check If Video URL is Not Empty

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Check If - Success Response

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Check If - Comment Exists

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Update Video Status

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Get Video URLs

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 13 - Insert Comment Data & Analysis

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 14 - AI Agent - Analyze Sentiment Of Every Comment

Type / Role
@n8n/n8n-nodes-langchain.sentimentAnalysis - sentimentAnalysis
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Analyze YouTube comments sentiment with Gemini AI and Google Sheets
Complexity advanced
Nodes 17
Categories Market Research, AI Summarization
Author Agent Circle
Published 17 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6086/6086.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze YouTube comments sentiment with Gemini AI and Google Sheets do?

This n8n workflow demonstrates how to use this AI Agent to extract, process, and analyze YouTube video comments to understand your audience beyond the view count. Use cases are many: Whether you're...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.