{
  "name": "Gather complete YouTube channel data to Google Sheets",
  "nodes": [
    {
      "id": "6d81882f-1b1d-41e9-8bf0-7e62afeca99f",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -720,
        280
      ]
    },
    {
      "id": "e4575f9b-070f-4565-b363-568617d61e24",
      "name": "If - Check Success Response",
      "type": "n8n-nodes-base.if",
      "position": [
        820,
        80
      ]
    },
    {
      "id": "8964eaa0-676d-4bf5-bdd1-3f3e8c53bd2e",
      "name": "Google Sheets - Update Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        180
      ]
    },
    {
      "id": "fc68d632-6349-4c95-9243-97e2f4476afd",
      "name": "Google Sheets - Update Data - Error",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        400
      ]
    },
    {
      "id": "9e3960f0-5982-4deb-a38b-488cfbd808a5",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -300,
        280
      ]
    },
    {
      "id": "25556915-5243-4881-be05-7b0df816744c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        -320
      ],
      "parameters": {
        "width": 780,
        "height": 1520,
        "content": "## [Agent Circle's N8N Workflow] YouTube Channel Information Crawler - Try It Out!\n\n**This N8N template demonstrates how to use our tool to collect key information from any YouTube channel - including"
      }
    },
    {
      "id": "abbc6aa8-ab44-4c43-ab1b-2e3349f61cb8",
      "name": "Google Sheets - Get Channel URLs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -520,
        280
      ]
    },
    {
      "id": "4d53d340-e41a-4b8e-a01b-51aa72b33430",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        -320
      ],
      "parameters": {
        "width": 680,
        "height": 980,
        "content": "## 1. Read Channel URLs From Google Sheets\n- We’ll start by pulling a list of channel URLs or custom channel URLs from your connected Google Sheet. \n- The loop iterates over each row that's marked as "
      }
    },
    {
      "id": "75deba24-d050-4ef1-96fd-b8a004c12487",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -320
      ],
      "parameters": {
        "width": 580,
        "height": 980,
        "content": "## 2. Detect Input Type And Fetch Channel Data Using YouTube API\n- We’ll check whether each entry is a full channel URL or a custom channel URL; then, route it to the appropriate YouTube API call.\n- B"
      }
    },
    {
      "id": "dfa8fe7d-448c-44ba-beee-b26b33c35a80",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        -320
      ],
      "parameters": {
        "width": 580,
        "height": 980,
        "content": "## 3. Update Google Sheets With Results\n- If the response is successful, all collected metrics for that channel are inserted into connected Google Sheet. Its row's status in **Column A** in your conne"
      }
    },
    {
      "id": "8f057b52-f6f1-4722-b5cd-2a0d831cebc4",
      "name": "HTTP Request - Get Channel Info By Full URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        -40
      ]
    },
    {
      "id": "eb1eadd5-2f80-4a35-940b-0997369d7738",
      "name": "HTTP Request - Get Channel Info By Custom URL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        160
      ]
    },
    {
      "id": "cc9f9b53-f751-4368-9bc2-d05f7ca352f3",
      "name": "Switch - Detect URL Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        100,
        80
      ]
    }
  ],
  "connections": {
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Switch - Detect URL Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch - Detect URL Type": {
      "main": [
        [
          {
            "node": "HTTP Request - Get Channel Info By Full URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTTP Request - Get Channel Info By Custom URL",
            "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 Channel URLs": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "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": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get Channel Info By Full URL": {
      "main": [
        [
          {
            "node": "If - Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get Channel Info By Custom URL": {
      "main": [
        [
          {
            "node": "If - Check Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}