{
  "name": "Extract and store YouTube video comments in Google Sheets",
  "nodes": [
    {
      "id": "7677397f-8b7b-4428-84c9-b25a0e8f6fe9",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -620,
        340
      ]
    },
    {
      "id": "ecc0c645-7297-4279-be21-7f623d84dd6d",
      "name": "If - Check Success Response",
      "type": "n8n-nodes-base.if",
      "position": [
        -840,
        500
      ]
    },
    {
      "id": "f0d9fee0-dded-486e-90a6-0992c14c4731",
      "name": "Google Sheets - Update Status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        340,
        480
      ]
    },
    {
      "id": "47690f02-9a22-4bc7-8ee7-112b1c9d9b0b",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1440,
        480
      ]
    },
    {
      "id": "ab7d7339-f848-4ea3-9370-4d9c6a36515a",
      "name": "If - Check Video Url is Not Empty",
      "type": "n8n-nodes-base.if",
      "position": [
        -1800,
        500
      ]
    },
    {
      "id": "3b3e13e1-1ac9-4e86-b1b5-b67547a4fc80",
      "name": "HTTP Request - Get Comments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1220,
        500
      ]
    },
    {
      "id": "b1c18c3c-8eb7-42a8-b2dd-1d98199a20f3",
      "name": "If - Check Comment Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -420,
        340
      ]
    },
    {
      "id": "993d9d75-9db9-4ef6-98aa-7598ca390bd3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3080,
        -140
      ],
      "parameters": {
        "width": 700,
        "height": 1420,
        "content": "## [Agent Circle's N8N Workflow] YouTube Video Comment Crawler - Try It Out!\n\n**This n8n template demonstrates how to use the tool to crawl comments from a YouTube video and simply get all the results"
      }
    },
    {
      "id": "95fa0de2-7dbd-4ce3-be2b-1f3aa0a25f9b",
      "name": "Google Sheets - Get Video URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1960,
        500
      ]
    },
    {
      "id": "4aab513c-f3f7-4014-92e7-95a584f8d35b",
      "name": "Google Sheets - Insert/Update Comment",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        140,
        340
      ]
    },
    {
      "id": "b22f440c-caac-4812-8ec4-02ee4aaeb85a",
      "name": "Test Workflow",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2140,
        500
      ]
    },
    {
      "id": "893156f1-ef54-42dd-9aa6-5f3c8fc4d6ce",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2180,
        120
      ],
      "parameters": {
        "width": 580,
        "height": 720,
        "content": "## 1. Read Video URLs From Connected Google Sheet\n\n- We’ll start by pulling a list of YouTube video URLs from your connected Google Sheet. Only the rows where the status is set to **Ready** will be pi"
      }
    },
    {
      "id": "efc99293-f219-40e4-9980-ca96ed1ff156",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1500,
        120
      ],
      "parameters": {
        "width": 480,
        "height": 720,
        "content": "## 2. Fetch Comments Via YouTube API\n\n- Each video URL is passed through a request to the YouTube API in a loop.\n- You just need to make sure your YouTube API key is correctly set in the **HTTP Reques"
      }
    },
    {
      "id": "0254b9d7-ad4a-42b9-b1f2-d412184b67d4",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -920,
        100
      ],
      "parameters": {
        "width": 860,
        "height": 720,
        "content": "## 3. Validate Response And Split Comments\n\n- Once the workflow receives a response from the YouTube API, it first checks if the request was successful.\n- If everything looks good, it splits the retur"
      }
    },
    {
      "id": "d66bf88b-b703-4d41-b328-363e9fd2aa7e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        100
      ],
      "parameters": {
        "width": 480,
        "height": 720,
        "content": "## 4. Save Comments And Update URL Status In Google Sheets\n\n- All collected comments are inserted into the **Results** tab in your connected Google Sheet.\n- After each video is processed, its original"
      }
    },
    {
      "id": "29abcb72-024c-43bb-a726-ba513f12f0fb",
      "name": "Google Sheets - Update Status - Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        140,
        580
      ]
    }
  ],
  "connections": {
    "Split Out": {
      "main": [
        [
          {
            "node": "If - Check Comment Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Test Workflow": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Video URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "HTTP Request - Get Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Check Comment Exists": {
      "main": [
        [
          {
            "node": "Google Sheets - Insert/Update Comment",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets - Update Status - Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get Comments": {
      "main": [
        [
          {
            "node": "If - Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Check Success Response": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets - Update Status - Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Status": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Video URLs": {
      "main": [
        [
          {
            "node": "If - Check Video Url is Not Empty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Check Video Url is Not Empty": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Insert/Update Comment": {
      "main": [
        [
          {
            "node": "Google Sheets - Update Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Status - Error": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}