{
  "name": "🚀 YouTube comment sentiment analyzer with Google Sheets & OpenAI",
  "nodes": [
    {
      "id": "0bacd739-7ea3-42f5-8986-2f7d47628ee9",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        820,
        -40
      ]
    },
    {
      "id": "236aaaab-6a9a-42d7-8645-980bf8c3254d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1080,
        180
      ]
    },
    {
      "id": "c1eda3a6-9fbe-4150-8086-c3ffebaeb2e1",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        380,
        140
      ]
    },
    {
      "id": "d28f3fbf-6013-47af-ba84-3bdd9800fd3b",
      "name": "Get Video Urls from Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -200,
        -40
      ]
    },
    {
      "id": "0ac06530-cfe7-4f1c-8c0a-8def2126df0f",
      "name": "check next fetch time is available or not",
      "type": "n8n-nodes-base.if",
      "position": [
        -20,
        -40
      ]
    },
    {
      "id": "ba42f450-3b0c-41a3-8e72-d2a38b97cfc7",
      "name": "check next fetch time is before the current time",
      "type": "n8n-nodes-base.if",
      "position": [
        160,
        80
      ]
    },
    {
      "id": "aad11f42-b976-41d7-b771-151da60391d6",
      "name": "Get Comments for video urls",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        360,
        -60
      ]
    },
    {
      "id": "4cf1ebd0-e260-4e53-bc26-be1db2f6e7f2",
      "name": "Analyze sentiment of every comment",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        1060,
        -40
      ]
    },
    {
      "id": "f306c5cd-6b6b-46fa-b7ef-f3ccef960931",
      "name": "Format fields as required to save in google sheet",
      "type": "n8n-nodes-base.set",
      "position": [
        1500,
        -40
      ]
    },
    {
      "id": "6cd20a6e-8bcc-44c7-a62d-e3c3c75e6d9a",
      "name": "Insert and update comment in google sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1720,
        -40
      ]
    },
    {
      "id": "ea240f38-1462-402b-8db2-36b3e8664c2f",
      "name": "Update last fetched time and next_fetch_time",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1940,
        -40
      ]
    },
    {
      "id": "610fa83c-a626-42c0-aa8b-1ebb1a6bcf44",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        820,
        140
      ]
    },
    {
      "id": "30570a68-78b8-434e-bb20-ea85a0689a63",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -380,
        -40
      ]
    },
    {
      "id": "4fe79a97-fc39-41c0-9d2f-f07865deef5e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -440,
        -160
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0ccb85d8-d29e-44a7-b644-49b3dcc6ce9b",
      "name": "Check Success Response",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        -60
      ]
    },
    {
      "id": "880f570f-6300-4659-9dcf-d47880140131",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1100,
        -500
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "Analyze sentiment of every comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze sentiment of every comment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Success Response": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Comments for video urls": {
      "main": [
        [
          {
            "node": "Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Urls from Google Sheet": {
      "main": [
        [
          {
            "node": "check next fetch time is available or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Video Urls from Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze sentiment of every comment": {
      "main": [
        [
          {
            "node": "Format fields as required to save in google sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format fields as required to save in google sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format fields as required to save in google sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert and update comment in google sheet": {
      "main": [
        [
          {
            "node": "Update last fetched time and next_fetch_time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check next fetch time is available or not": {
      "main": [
        [
          {
            "node": "Get Comments for video urls",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "check next fetch time is before the current time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update last fetched time and next_fetch_time": {
      "main": [
        []
      ]
    },
    "check next fetch time is before the current time": {
      "main": [
        [
          {
            "node": "Get Comments for video urls",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format fields as required to save in google sheet": {
      "main": [
        [
          {
            "node": "Insert and update comment in google sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}