{
  "name": "Extract YouTube video statistics and save to Google Sheets",
  "nodes": [
    {
      "id": "de9aba98-7d3d-4de0-bcb2-020abe4775be",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -700,
        420
      ]
    },
    {
      "id": "05f35e6b-52ec-4998-a3ff-99f92d70ac6d",
      "name": "If - Check Success Response",
      "type": "n8n-nodes-base.if",
      "position": [
        180,
        120
      ]
    },
    {
      "id": "98fdd444-47af-43a0-a8d4-9df561a3eabe",
      "name": "Google Sheets - Update Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        120
      ]
    },
    {
      "id": "f0c76306-d47b-4442-935d-61a7c01bf0bc",
      "name": "Google Sheets - Update Data - Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        320
      ]
    },
    {
      "id": "0c71b117-aeae-45d3-806d-9e89ef1ffb39",
      "name": "HTTP - Find Video Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -40,
        145
      ]
    },
    {
      "id": "e8e9b10e-0456-4c5b-855c-79602c0f9f9d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1580,
        -160
      ],
      "parameters": {
        "width": 720,
        "height": 1480,
        "content": "## [Agent Circle's N8N Workflow] YouTube Video Statistics Crawler - Try It Out!\n\n**This N8N template makes it easy to extract key YouTube video data - including title, view count, like count, comment "
      }
    },
    {
      "id": "b9e277aa-b307-4a75-997c-6ef319b13e28",
      "name": "Google Sheets - Get Video URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -480,
        420
      ]
    },
    {
      "id": "331af5c0-428a-41a6-a9ca-268cf9b50da3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -140
      ],
      "parameters": {
        "width": 640,
        "height": 800,
        "content": "## 1. Read Video URLs from Google Sheets\n- We'll read all video URLs listed in your connected Google Sheet – typically from a tab named **Video URLs**. Only \n- The loop iterates over each row that's m"
      }
    },
    {
      "id": "9e1e2bb8-cf50-404f-a637-0f144b60af7f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -140
      ],
      "parameters": {
        "width": null,
        "height": 800,
        "content": "## 2. Fetch Video Statistics From YouTube API\nOnce a video URL is read, the workflow sends a request to the YouTube API to pull essential data for the corresponding video.\n"
      }
    },
    {
      "id": "295fa90d-029e-4b7d-a8e0-e40f8f791c0f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -140
      ],
      "parameters": {
        "width": 500,
        "height": 800,
        "content": "## 3. Write Results Back To Google Sheets\n- The API response is validated, in the connected Google Sheet:\n     - If successful: the video’s statistics are filled into the corresponding row, and the ro"
      }
    },
    {
      "id": "e33bf702-f7c8-4174-aedb-6ac0db968a26",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -260,
        420
      ]
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "HTTP - Find Video Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP - Find Video Data": {
      "main": [
        [
          {
            "node": "If - Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - Check Success Response": {
      "main": [
        [
          {
            "node": "Google Sheets - Update Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets - Update Data - Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Video URLs": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Video URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Data - Error": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}