{
  "name": "YouTube comment sentiment analysis with Google Gemini AI and Google Sheets",
  "nodes": [
    {
      "id": "511187aa-886f-47ac-852c-265a57c5d258",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1180,
        600
      ]
    },
    {
      "id": "ba78c8c6-9919-4aeb-a31a-038efed110c2",
      "name": "Sentiment Analysis",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        2200,
        820
      ]
    },
    {
      "id": "98fabfbd-5056-4689-bb7e-f402601df3ff",
      "name": "Comments",
      "type": "n8n-nodes-base.code",
      "position": [
        2100,
        120
      ]
    },
    {
      "id": "c73a4bc3-ff82-47a5-9543-88e1e4296d4f",
      "name": "Split comments",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2380,
        120
      ]
    },
    {
      "id": "7c5c1a93-aa59-4c72-afa5-2b4a3db8ac96",
      "name": "Save comments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2680,
        120
      ]
    },
    {
      "id": "7429d0be-8e6b-4c7d-a675-37cfb7c5f8a6",
      "name": "Multipage?",
      "type": "n8n-nodes-base.if",
      "position": [
        2300,
        380
      ]
    },
    {
      "id": "d9724597-4fc2-4260-a7fd-2879e9fc5b81",
      "name": "nextPageToken",
      "type": "n8n-nodes-base.set",
      "position": [
        2680,
        360
      ]
    },
    {
      "id": "4a351a8a-0fe1-4754-9af7-b7e283483b93",
      "name": "Get comments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1500,
        800
      ]
    },
    {
      "id": "2834427f-b9b6-4c8b-b397-d8d9fc9e6bdf",
      "name": "Get API Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1820,
        380
      ]
    },
    {
      "id": "d5eca980-83e2-4313-966a-9110452d0fc9",
      "name": "ID Video",
      "type": "n8n-nodes-base.set",
      "position": [
        1480,
        380
      ]
    },
    {
      "id": "e076838e-4b0a-4dc3-8992-542b195364ad",
      "name": "Loop Over Comments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1840,
        800
      ]
    },
    {
      "id": "d5872dff-4d3e-477d-804c-6b91867000d4",
      "name": "Update sentiment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2680,
        820
      ]
    },
    {
      "id": "19e8680b-522f-4fc3-9344-1ce74b0b3c67",
      "name": "Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2160,
        1060
      ]
    },
    {
      "id": "26f9f88d-94b7-425c-80c7-3fc1ff448240",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        120
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "8f4cc894-8bbb-4706-a2a6-ef1546eca495",
      "name": "QuickChart",
      "type": "n8n-nodes-base.quickChart",
      "position": [
        0,
        0
      ]
    }
  ],
  "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 ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get comments",
            "type": "main",
            "index": 0
          },
          {
            "node": "ID Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}