AutomationFlowsAI & RAG › Youtube Comment Sentiment Analysis with Google Gemini AI and Google Sheets

Youtube Comment Sentiment Analysis with Google Gemini AI and Google Sheets

ByDavide Boizza @n3witalia on n8n.io

This workflow automatically collects all comments from a specified YouTube video and analyzes the sentiment of each comment using an AI model (e.g., GPT, Claude or Gemini). The sentiment (Positive, Neutral, or Negative), its strength, and confidence score are extracted and saved…

Event trigger★★★★☆ complexityAI-powered15 nodesSentiment AnalysisGoogle SheetsHTTP RequestGoogle Gemini ChatQuick Chart
AI & RAG Trigger: Event Nodes: 15 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #3936 — we link there as the canonical source.

This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "SFcUKSlMqxy2Mp1m",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Analyzes YouTube comments using AI to detect sentiment automatically",
  "tags": [],
  "nodes": [
    {
      "id": "511187aa-886f-47ac-852c-265a57c5d258",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1180,
        600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ba78c8c6-9919-4aeb-a31a-038efed110c2",
      "name": "Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        2200,
        820
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "98fabfbd-5056-4689-bb7e-f402601df3ff",
      "name": "Comments",
      "type": "n8n-nodes-base.code",
      "position": [
        2100,
        120
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "c73a4bc3-ff82-47a5-9543-88e1e4296d4f",
      "name": "Split comments",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2380,
        120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7c5c1a93-aa59-4c72-afa5-2b4a3db8ac96",
      "name": "Save comments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2680,
        120
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "7429d0be-8e6b-4c7d-a675-37cfb7c5f8a6",
      "name": "Multipage?",
      "type": "n8n-nodes-base.if",
      "position": [
        2300,
        380
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "d9724597-4fc2-4260-a7fd-2879e9fc5b81",
      "name": "nextPageToken",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        360
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4a351a8a-0fe1-4754-9af7-b7e283483b93",
      "name": "Get comments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1500,
        800
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "2834427f-b9b6-4c8b-b397-d8d9fc9e6bdf",
      "name": "Get API Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1820,
        380
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "d5eca980-83e2-4313-966a-9110452d0fc9",
      "name": "ID Video",
      "type": "n8n-nodes-base.set",
      "position": [
        1480,
        380
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "e076838e-4b0a-4dc3-8992-542b195364ad",
      "name": "Loop Over Comments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1840,
        800
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "d5872dff-4d3e-477d-804c-6b91867000d4",
      "name": "Update sentiment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2680,
        820
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "19e8680b-522f-4fc3-9344-1ce74b0b3c67",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2160,
        1060
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "26f9f88d-94b7-425c-80c7-3fc1ff448240",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        120
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8f4cc894-8bbb-4706-a2a6-ef1546eca495",
      "name": "QuickChart",
      "type": "n8n-nodes-base.quickChart",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9ce04150-1ad5-40bd-89a8-cf8a5e1babdb",
  "connections": {
    "Comments": {
      "main": [
        [
          {
            "node": "Split comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ID Video": {
      "main": [
        [
          {
            "node": "Get API Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Multipage?": {
      "main": [
        [
          {
            "node": "nextPageToken",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get comments": {
      "main": [
        [
          {
            "node": "Loop Over Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Sentiment Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Save comments": {
      "main": [
        []
      ]
    },
    "nextPageToken": {
      "main": [
        [
          {
            "node": "Get API Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split comments": {
      "main": [
        [
          {
            "node": "Save comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get API Comments": {
      "main": [
        [
          {
            "node": "Multipage?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update sentiment": {
      "main": [
        [
          {
            "node": "Loop Over Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Comments": {
      "main": [
        [],
        [
          {
            "node": "Sentiment Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sentiment Analysis": {
      "main": [
        [
          {
            "node": "Update sentiment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update sentiment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Get comments",
            "type": "main",
            "index": 0
          },
          {
            "node": "ID Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automatically collects all comments from a specified YouTube video and analyzes the sentiment of each comment using an AI model (e.g., GPT, Claude or Gemini). The sentiment (Positive, Neutral, or Negative), its strength, and confidence score are extracted and saved…

Source: https://n8n.io/workflows/3936/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow automates sentiment analysis of Reddit posts related to Apple's WWDC25 event. It extracts data, categorizes posts, analyzes sentiment of comments, and updates a Google Sheet with the res

HTTP Request, Text Classifier, Google Gemini Chat +2
AI & RAG

OpenAI Analytics 노드 사용법. Uses httpRequest, quickChart, n8n-nodes-openai-analytics, googleSheets. Event-driven trigger; 25 nodes.

HTTP Request, Quick Chart, N8N Nodes Openai Analytics +2
AI & RAG

This workflow scrapes the top 10 pages on SERP and conducts an in-depth analysis of the keyword intent for each ranking keyword, saving the information to a Google Sheet for further analysis. We add o

HTTP Request, Google Sheets, Text Classifier +1
AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5