{
  "name": "Extract YouTube channel videos to Google Sheets with metadata tracking",
  "nodes": [
    {
      "id": "1de1cc62-f33f-4d27-b69b-e4fcb2369baf",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1620,
        350
      ]
    },
    {
      "id": "0759bfd3-5a95-4bd2-9bbb-b4204cceeb1b",
      "name": "If - Check Success Response",
      "type": "n8n-nodes-base.if",
      "position": [
        140,
        179
      ]
    },
    {
      "id": "c0413724-8cd9-4b66-a978-49ec5c072b79",
      "name": "Google Sheets - Update Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        580,
        0
      ]
    },
    {
      "id": "78b83f9d-6c3d-4377-a6a5-f269b49ea5d2",
      "name": "Google Sheets - Update Data - Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        360,
        400
      ]
    },
    {
      "id": "978bdd9e-613b-4f89-bd21-6ff6c679e813",
      "name": "HTTP Request - Get Channel ID",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -520,
        200
      ]
    },
    {
      "id": "05209d93-d96a-4cfc-9fa2-ba9e574702f4",
      "name": "Fields - Set Channel Username",
      "type": "n8n-nodes-base.set",
      "position": [
        -740,
        200
      ]
    },
    {
      "id": "ed273bcd-5222-4316-9e5d-475bd83effcf",
      "name": "HTTP Request - Get Channel Videos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        179
      ]
    },
    {
      "id": "b236306b-1834-4aee-9d1b-f44efb3ce71b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2540,
        -540
      ],
      "parameters": {
        "width": 680,
        "height": 1780,
        "content": "## [Agent Circle's N8N Workflow] YouTube Channel Videos Crawler - Try It Out!\n\n**This N8N template demonstrates how to use our tool to collect a list of videos from any YouTube channel - including vid"
      }
    },
    {
      "id": "d69bf1ad-3aff-4b38-b211-69136560c2ba",
      "name": "Google Sheets - Get Channel URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1400,
        350
      ]
    },
    {
      "id": "8967115c-baa3-4931-8669-44d5ae5dbca9",
      "name": "Google Sheets - Update Data - Success",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        360,
        200
      ]
    },
    {
      "id": "2d531a54-c4e4-4622-acc5-d4810cd7d44d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1720,
        -220
      ],
      "parameters": {
        "width": 500,
        "height": 840,
        "content": "## 1. Read Channel URLs/IDs From Google Sheets\n- We’ll start by pulling a list of full channel URLs, custom channel URLs or channel IDs from your connected Google Sheet. Only the rows where the status"
      }
    },
    {
      "id": "9c34b1ac-56cd-4f2c-91a7-5436458866cb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        -220
      ],
      "parameters": {
        "width": 780,
        "height": 840,
        "content": "## 2. Detect Input Type And Normalize It\n- A Switch node checks whether each input is a:\n     - Raw channel ID\n     - Full channel URL or custom channel URL\n- Depending on the input type:\n     - If it"
      }
    },
    {
      "id": "a8d67e3f-aef7-4801-abad-64a72c69c928",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -220
      ],
      "parameters": {
        "width": 720,
        "height": 840,
        "content": "## 4. Check API Response And Update Results\nThe API response is validated, in the connected Google Sheet:\n- If successful, the data is split into individual videos, and each video’s data is saved to t"
      }
    },
    {
      "id": "2e8c5bb7-99e6-4ceb-995b-a83742a0e57e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -220
      ],
      "parameters": {
        "width": 440,
        "height": 840,
        "content": "## 3. Fetch Videos Using YouTube API\nOnce the valid **channel ID** is ready, the workflow sends a request to the YouTube API to retrieve that channel’s public videos."
      }
    },
    {
      "id": "5098ce70-fd30-470f-be61-08953beab4a5",
      "name": "Split Out - Videos",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        360,
        0
      ]
    },
    {
      "id": "e2abab80-8fd9-497c-904f-adb5190b8ac7",
      "name": "Switch - Detect Channel ID or Channel URL",
      "type": "n8n-nodes-base.switch",
      "position": [
        -960,
        137
      ]
    },
    {
      "id": "23faa7ba-557a-45fb-95e8-c7907a331f24",
      "name": "Fields - Set Channel ID 1",
      "type": "n8n-nodes-base.set",
      "position": [
        -300,
        0
      ]
    },
    {
      "id": "1f1eb136-81ba-4a39-8d15-cd10db9c34f4",
      "name": "Fields - Set Channel ID 2",
      "type": "n8n-nodes-base.set",
      "position": [
        -300,
        200
      ]
    },
    {
      "id": "68fce9d8-c9ae-40a7-81de-8f6953ab31ee",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -960,
        421
      ]
    },
    {
      "id": "d7f206a7-1d1c-4376-a463-6c629f7f7ddd",
      "name": "Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1180,
        350
      ]
    }
  ],
  "connections": {
    "Loop": {
      "main": [
        [],
        [
          {
            "node": "Switch - Detect Channel ID or Channel URL",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - Videos": {
      "main": [
        [
          {
            "node": "Google Sheets - Update Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fields - Set Channel ID 1": {
      "main": [
        [
          {
            "node": "HTTP Request - Get Channel Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fields - Set Channel ID 2": {
      "main": [
        [
          {
            "node": "HTTP Request - Get Channel Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Data": {
      "main": [
        []
      ]
    },
    "If - Check Success Response": {
      "main": [
        [
          {
            "node": "Split Out - Videos",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Sheets - Update Data - Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Sheets - Update Data - Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fields - Set Channel Username": {
      "main": [
        [
          {
            "node": "HTTP Request - Get Channel ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get Channel ID": {
      "main": [
        [
          {
            "node": "Fields - Set Channel ID 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Get Channel URLs": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get Channel Videos": {
      "main": [
        [
          {
            "node": "If - Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Google Sheets - Get Channel URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Update Data - Error": {
      "main": [
        []
      ]
    },
    "Google Sheets - Update Data - Success": {
      "main": [
        []
      ]
    },
    "Switch - Detect Channel ID or Channel URL": {
      "main": [
        [
          {
            "node": "Fields - Set Channel ID 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fields - Set Channel ID 1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fields - Set Channel Username",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fields - Set Channel Username",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fields - Set Channel Username",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}