{
  "id": "rY2bWvlcFRgy34Py",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Youtube Scrapper",
  "tags": [],
  "nodes": [
    {
      "id": "f2ac95fd-8956-4010-9d5d-5f809d11a6a0",
      "name": "Append or update row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        976,
        416
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.email }}",
            "Tiktok": "={{ $json.tiktok }}",
            "Country": "={{ $json.country }}",
            "Discord": "={{ $json.discord }}",
            "Twitter": "={{ $json.twitter }}",
            "Facebook": "={{ $json.facebook }}",
            "Instagram": "={{ $json.instagram }}",
            "Channel ID": "={{ $json.channelId }}",
            "Subscribers": "={{ $json.subscribers }}",
            "Total Views": "={{ $json.views }}",
            "Channel Name": "={{ $json.title }}",
            "Total Videos": "={{ $json.videos }}"
          },
          "schema": [
            {
              "id": "Channel ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Channel ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Channel Name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Channel Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subscribers",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Subscribers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total Videos",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Total Videos",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Total Views",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Total Views",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Country",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Twitter",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Twitter",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tiktok",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Discord",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Discord",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Facebook",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Facebook",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Channel ID"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1525501272,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit#gid=1525501272",
          "cachedResultName": "Sheet2"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit?usp=drivesdk",
          "cachedResultName": "Test Sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "3e5d4c72-a2da-4531-832a-c34fdc210bf8",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1376,
        416
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "* * * * *"
            }
          ]
        }
      },
      "retryOnFail": false,
      "typeVersion": 1.3
    },
    {
      "id": "a31b6ea0-2c42-4ef8-8df0-82ddb3f86643",
      "name": "Update Keyword Status -> Processing",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -592,
        416
      ],
      "parameters": {
        "columns": {
          "value": {
            "Status": "Processed",
            "Keyword": "={{ $json.Keyword }}",
            "Last Run": "={{ $now }}"
          },
          "schema": [
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Status",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Status",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Last Run",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Last Run",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Keyword"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit?usp=drivesdk",
          "cachedResultName": "Test Sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "79615eb1-e2f6-4a37-b34d-27cbf28e3b99",
      "name": "Get the first keyword",
      "type": "n8n-nodes-base.code",
      "position": [
        -800,
        416
      ],
      "parameters": {
        "jsCode": "// $input.item(0) refers to the first input item from the previous node\n// In Search Rows, all rows come as separate items, so $input.all() returns an array of items\nconst items = $input.all();\n\nif (!items || items.length === 0) {\n  // No pending keywords\n  return [];\n}\n\n// Only take the first item\nreturn [items[0]];"
      },
      "typeVersion": 2
    },
    {
      "id": "12bda5a9-9f13-460e-b0e5-c7849a689b56",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "disabled": true,
      "position": [
        -480,
        1248
      ],
      "parameters": {
        "actorId": {
          "__rl": true,
          "mode": "list",
          "value": "CZLTbryGaPlOPPaht",
          "cachedResultUrl": "https://console.apify.com/actors/CZLTbryGaPlOPPaht/input",
          "cachedResultName": "Youtube Channel Email Scraper By Keyword (scraper-mind/mass-youtube-channel-email-scraper)"
        },
        "operation": "Run actor and get dataset",
        "customBody": "={\n    \"country\": \"United States\",\n    \"keywords\": [\n        \"{{ $json.Keyword }}\"\n    ],\n    \"maxLeadsPerKeyword\": 100,\n    \"scrapeLeadsWithEmail\": true\n}",
        "authentication": "apifyOAuth2Api"
      },
      "credentials": {
        "apifyOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cd7db7a2-0ca1-4c98-a162-ea2e3013fdf3",
      "name": "Append or update row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "disabled": true,
      "position": [
        -80,
        1248
      ],
      "parameters": {
        "columns": {
          "value": {
            "Email": "={{ $json.email }}",
            "Tiktok": "={{ $json.tiktok }}",
            "Discord": "={{ $json.discord }}",
            "Keyword": "={{ $json.keyword }}",
            "Twitter": "={{ $json.twitter }}",
            "Facebook": "={{ $json.facebook }}",
            "Instagram": "={{ $json.instagram }}",
            "Channel URL": "={{ $json.channel_url }}",
            "Subscribers": "={{ $json.subscriber_count.match(/\\d+/)[0] }}",
            "Channel Name": "={{ $json.channel_name }}",
            "Videos Count": "={{ $json.video_count.match(/\\d+/)[0] }}"
          },
          "schema": [
            {
              "id": "Channel Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Channel Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Channel URL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Channel URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Instagram",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Instagram",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Tiktok",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Tiktok",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Facebook",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Facebook",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Discord",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Discord",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Twitter",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Twitter",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Subscribers",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Subscribers",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Videos Count",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Videos Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Keyword",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Keyword",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Channel URL"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1672634312,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit#gid=1672634312",
          "cachedResultName": "Using Apify"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit?usp=drivesdk",
          "cachedResultName": "Test Sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c809b200-cbe4-4638-a577-7c2b2663504f",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "disabled": true,
      "position": [
        -272,
        1248
      ],
      "parameters": {
        "jsCode": "const emailRegex = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}/;\n\n// Thresholds\nconst subscriberThreshold = 10000;\nconst videoThreshold = 100;\n\nreturn $input.all()\n  .map(item => {\n    const emails = item.json.emails || [];\n    const socials = item.json.social_links || {};\n\n    // Clean email\n    let cleanEmail = \"\";\n    if (Array.isArray(emails)) {\n      const match = emails\n        .map(e => e.match(emailRegex))\n        .find(e => e !== null);\n      cleanEmail = match ? match[0] : \"\";\n    }\n\n    // Build cleaned item\n    const cleanedItem = {\n      ...item.json,\n      email: cleanEmail,\n      instagram: socials.instagram || \"\",\n      twitter: socials.twitter || \"\",\n      tiktok: socials.tiktok || \"\",\n      discord: socials.discord || \"\",\n      facebook: socials.facebook || \"\"\n    };\n\n    return cleanedItem;\n  })\n  // Filter by thresholds\n  .filter(channel => {\n    const subs = parseInt(channel.subscribers || \"0\");\n    const vids = parseInt(channel.videos || \"0\");\n    return subs >= subscriberThreshold && vids >= videoThreshold;\n  })\n  .map(channel => ({ json: channel })); // Wrap each in { json: ... } for n8n"
      },
      "typeVersion": 2
    },
    {
      "id": "80d98841-cffe-4005-996a-dc40e0d732cf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        320
      ],
      "parameters": {
        "width": 496,
        "height": 288,
        "content": "## Workflow overview\n\nThis workflow automatically discovers high quality YouTube channels based on a list of target keywords.\n\nIt runs on a schedule, searches for videos related to each keyword, extracts the channels behind those videos, retrieves channel statistics, and filters channels based on predefined quality criteria such as subscriber count, total views, and video count.\n\nThe final result is stored in a spreadsheet where channels are either added as new entries or updated if they already exist. This workflow is useful for influencer discovery, lead generation, or creator research."
      },
      "typeVersion": 1
    },
    {
      "id": "8059c4ad-7551-4bd0-8741-7823e409c8ce",
      "name": "Search Videos based on Keywords",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -256,
        416
      ],
      "parameters": {
        "url": "https://www.googleapis.com/youtube/v3/search",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "part",
              "value": "snippet"
            },
            {
              "name": "q",
              "value": "={{ $json.Keyword }}"
            },
            {
              "name": "type",
              "value": "video"
            },
            {
              "name": "maxResults",
              "value": "50"
            }
          ]
        },
        "nodeCredentialType": "youTubeOAuth2Api"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "82fb27e6-960a-422e-a715-741f91abd6de",
      "name": "List of Target Keywords",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -992,
        416
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "Pending",
              "lookupColumn": "Status"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qbH4sq8NtPxh-wxCbRmyZAzzmC36KgipJlkWou-FUn8/edit?usp=drivesdk",
          "cachedResultName": "Test Sheet"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": false,
      "typeVersion": 4.7
    },
    {
      "id": "e3b9d095-f5db-44bf-941e-630b00e8e0c8",
      "name": "Extract Channel Ids from the Video Results",
      "type": "n8n-nodes-base.code",
      "position": [
        64,
        416
      ],
      "parameters": {
        "jsCode": "// Get items array from search node\nconst items = $json.items || [];\n\n// Extract channel IDs safely\nconst channelIds = items\n  .map(item => item.snippet?.channelId)\n  .filter(id => id !== undefined);\n\n// Deduplicate\nconst uniqueChannelIds = [...new Set(channelIds)];\n\n// Create comma separated list for API\nconst channelIdsString = uniqueChannelIds.join(\",\");\n\nreturn [\n  {\n    json: {\n      channelIdsString\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "5e27c8e6-5907-42c3-9311-2d70df76ceda",
      "name": "Get Channel Stats",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        272,
        416
      ],
      "parameters": {
        "url": "https://www.googleapis.com/youtube/v3/channels",
        "options": {},
        "sendQuery": true,
        "authentication": "predefinedCredentialType",
        "queryParameters": {
          "parameters": [
            {
              "name": "part",
              "value": "statistics, snippet, brandingSettings"
            },
            {
              "name": "id",
              "value": "=id={{ $json.channelIdsString }}"
            }
          ]
        },
        "nodeCredentialType": "youTubeOAuth2Api"
      },
      "credentials": {
        "youTubeOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "b1146fe9-ce4b-456b-9a1a-e7c4d24b5222",
      "name": "Filter based on Criteria",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        416
      ],
      "parameters": {
        "jsCode": "// Get the items array from the YouTube API response\nconst channels = $json.items || [];\n\n// Thresholds\nconst subscriberThreshold = 10000;\nconst videoThreshold = 100;\nconst viewThreshold = 500000;\n\n// Regex to extract emails\nconst emailRegex = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}/;\n\n// Filter and map channels\nconst passedChannels = channels\n    .map(channel => {\n        // Existing statistics\n        const subs = parseInt(channel.statistics?.subscriberCount || \"0\");\n        const vids = parseInt(channel.statistics?.videoCount || \"0\");\n        const views = parseInt(channel.statistics?.viewCount || \"0\");\n\n        // Skip channels below thresholds\n        if (subs < subscriberThreshold || vids < videoThreshold || views < viewThreshold) {\n            return null;\n        }\n\n        // Extract emails from description\n        const description = channel.brandingSettings?.channel?.description || \"\";\n        const descEmails = (description.match(emailRegex) || []);\n\n        // Combine with any existing emails array\n        const existingEmails = channel.emails || [];\n        const allEmails = [...existingEmails, ...descEmails].filter(Boolean);\n        const cleanEmail = allEmails.length ? allEmails[0] : \"\";\n\n        // Extract social links if present\n        const socials = channel.brandingSettings?.channel?.externalLinks || {};\n        \n        return {\n            json: {\n                retry: false,\n                channelId: channel.id,\n                title: channel.snippet?.title,\n                country: channel.snippet?.country || \"\",\n                subscribers: subs,\n                videos: vids,\n                views: views,\n                email: cleanEmail,\n                instagram: socials.instagram || \"\",\n                twitter: socials.twitter || \"\",\n                tiktok: socials.tiktok || \"\",\n                discord: socials.discord || \"\",\n                facebook: socials.facebook || \"\"\n            }\n        };\n    })\n    .filter(channel => channel !== null); // Remove channels that didn't pass thresholds\n\nif (passedChannels.length === 0) {\n    return [{ json: { retry: true } }];\n}\n\nreturn passedChannels;"
      },
      "typeVersion": 2
    },
    {
      "id": "ab835bbf-f9d7-4c23-af9f-f130b77eb348",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1456,
        576
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 304,
        "content": "## Step 1. Schedule workflow trigger\n\nThis workflow starts automatically at a scheduled interval.\n\nThe scheduler allows you to run the automation periodically, for example every 5 minutes, every hour, or once per day depending on your discovery needs.\n\nEach run processes the next available keyword from the keyword list."
      },
      "typeVersion": 1
    },
    {
      "id": "6946302e-54da-446b-96bd-56093f7f35e3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1056,
        320
      ],
      "parameters": {
        "color": 4,
        "width": 624,
        "height": 624,
        "content": "## Step 2. Retrieve Target Keywords and Process One Keyword at a Time.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThis step retrieves the list of target keywords from the data source.\nEach keyword represents a topic or niche that will be used to search for related YouTube videos and discover relevant channels.\n\nExample keywords might include:\n\u2022 dashcam\n\u2022 productivity tools\n\u2022 AI automation\n\u2022 gaming highlights\n\nTo avoid duplicate processing, the workflow selects the first unprocessed keyword from the list.\n\nOnce selected, the keyword is immediately marked as processed to ensure it is not used again in future runs.\n\nThis ensures that the workflow processes each keyword only once."
      },
      "typeVersion": 1
    },
    {
      "id": "0bdf0e43-ac98-46ab-b77a-8bb3fc7a8889",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        64
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 320,
        "content": "## Step 3. Search YouTube Videos\n\nUsing the selected keyword, the workflow searches YouTube videos through the YouTube API.\n\nVideos are used as the discovery source because every video is linked to a channel. \n\nBy analyzing these results, the workflow can identify relevant creators within the niche."
      },
      "typeVersion": 1
    },
    {
      "id": "4e8bb8c9-8e84-475b-ac50-2bdb1688f1a2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        272
      ],
      "parameters": {
        "color": 4,
        "width": 656,
        "height": 656,
        "content": "## Step 4. Extract Channel IDs, Retrieve Channel Stats, and Filter Qualified Channels\nFrom the video results, the workflow extracts the unique channel IDs of the creators who published those videos.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDuplicate channel IDs are removed to avoid requesting the same channel statistics multiple times.\n\nFor each discovered channel, the workflow retrieves detailed statistics such as:\n\u2022 Subscriber count\n\u2022 Total number of videos\n\u2022 Total channel views\n\nThese metrics are used to evaluate whether the channel meets the qualification criteria.\n\nChannels are filtered based on predefined thresholds to identify high quality creators.\n\nExample criteria:\n\u2022 Minimum subscribers\n\u2022 Minimum number of videos\n\u2022 Minimum total views\n\nOnly channels that meet all requirements proceed to the next step."
      },
      "typeVersion": 1
    },
    {
      "id": "b85ecf68-a7f1-4541-a0ab-fc0891c9e04e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        640
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 288,
        "content": "## Step 5. Save Results to Spreadsheet\n\nQualified channels are saved to the spreadsheet.\n\nIf the channel already exists, its information is updated. If it is new, a new row is added.\n\nThis creates a continuously growing database of qualified YouTube channels."
      },
      "typeVersion": 1
    },
    {
      "id": "f50ba7ff-895c-431e-9f45-3039bf6d8321",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        656
      ],
      "parameters": {
        "width": 496,
        "height": 224,
        "content": "## Setup instructions\n\nBefore running this workflow, configure the following:\n\nAdd your YouTube API credentials.\nConnect your spreadsheet or database where keywords and channel data are stored.\nAdjust the filtering thresholds to match your target creator profile."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "c2117951-2a40-4701-8a3b-e3205c8c6a68",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "List of Target Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Channel Stats": {
      "main": [
        [
          {
            "node": "Filter based on Criteria",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Append or update row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get the first keyword": {
      "main": [
        [
          {
            "node": "Update Keyword Status -> Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "List of Target Keywords": {
      "main": [
        [
          {
            "node": "Get the first keyword",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter based on Criteria": {
      "main": [
        [
          {
            "node": "Append or update row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append or update row in sheet": {
      "main": [
        []
      ]
    },
    "Search Videos based on Keywords": {
      "main": [
        [
          {
            "node": "Extract Channel Ids from the Video Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Keyword Status -> Processing": {
      "main": [
        [
          {
            "node": "Search Videos based on Keywords",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Channel Ids from the Video Results": {
      "main": [
        [
          {
            "node": "Get Channel Stats",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}