{
  "name": "Automated YouTube subscription notifications with RSS and email",
  "nodes": [
    {
      "id": "a5292068-5ace-4372-9869-46100ae81b8f",
      "name": "Get video details",
      "type": "n8n-nodes-base.youTube",
      "position": [
        1000,
        -60
      ]
    },
    {
      "id": "b9eb34aa-90c4-492a-a33e-37a32812fa32",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -840,
        -160
      ]
    },
    {
      "id": "8f0dbe74-53e5-4b14-86f6-eb0f502c8471",
      "name": "Filter out shorts",
      "type": "n8n-nodes-base.if",
      "position": [
        1180,
        -60
      ]
    },
    {
      "id": "14d54ed0-f5c0-4992-af56-0af2d8973963",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -340
      ],
      "parameters": {
        "width": 220,
        "height": 460,
        "content": "### Default frequency: every hour\nChanging it here is enough if you want to check for new videos at a higher or lower frequency. You don't have to edit anything else."
      }
    },
    {
      "id": "c4acbb10-1f57-4934-a324-f26d0532767c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -660,
        -340
      ],
      "parameters": {
        "width": 880,
        "height": 460,
        "content": "### Get my subscriptions from the YouTube Data v3 API\nYou can expect to use 1 quota per 50 subscriptions per run, which is well within the 10 000/req a day allowed by default."
      }
    },
    {
      "id": "4ae2d2f3-53b5-4431-90d8-06e41a6950e2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -160
      ],
      "parameters": {
        "width": 440,
        "height": 280,
        "content": "### Get the 15 latest videos of each channel with RSS\nUsing the YouTube API instead would cost too many quotas to make it viable."
      }
    },
    {
      "id": "48894d79-7e59-49fc-beb5-445fb5ca2ff6",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        -160
      ],
      "parameters": {
        "width": 400,
        "height": 280,
        "content": "### Call YouTube's API for more data\nWe need the thumbnails for the email and the duration to filter out shorts."
      }
    },
    {
      "id": "e3da3f97-138c-481e-a763-9a3c9e402928",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -160
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "### Configure your email here\nTo go to the video from the email, simply click on the thumbnail."
      }
    },
    {
      "id": "0d092c3d-b2e1-4468-a044-c6cf0f37672b",
      "name": "Get latest 15 videos of each channel",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        540,
        -60
      ]
    },
    {
      "id": "34823384-d8a5-415a-87ff-203d65aa9a75",
      "name": "Get my subscriptions",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -600,
        -160
      ]
    },
    {
      "id": "534e38f3-ac40-4194-8821-5926ee581605",
      "name": "Check for errors",
      "type": "n8n-nodes-base.if",
      "position": [
        -400,
        -160
      ]
    },
    {
      "id": "2d872c0f-30b9-4ffc-aba0-6644bf05d7bb",
      "name": "Only keep channels with unwatched videos",
      "type": "n8n-nodes-base.filter",
      "position": [
        40,
        -60
      ]
    },
    {
      "id": "c7bd97ec-47c1-40b4-955d-bf89d3cde330",
      "name": "Keep only videos published since last run",
      "type": "n8n-nodes-base.filter",
      "position": [
        740,
        -60
      ]
    },
    {
      "id": "72341b1f-a391-4210-b3ca-4e74ae1f2e1b",
      "name": "Send an email for each new video",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1440,
        -60
      ]
    },
    {
      "id": "b82cfbd5-71e3-418f-9b6d-6d0ec007733a",
      "name": "If the HTTP request failed, throw the error",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -180,
        -260
      ]
    },
    {
      "id": "e89eca92-896f-46b5-8a4b-149d51682faa",
      "name": "Split out subscriptions to process individually",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -180,
        -60
      ]
    },
    {
      "id": "0e00fda6-1489-4c1a-8205-22e620a554c5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        -240
      ],
      "parameters": {
        "width": 220,
        "height": 360,
        "content": "## Manually filter out channels\nTo find the channel ID of a channel, click on the description → Share channel → Copy channel ID"
      }
    },
    {
      "id": "bcc2e57c-23b2-42b7-81ab-cdd88b70b8a3",
      "name": "Filter out channels",
      "type": "n8n-nodes-base.filter",
      "position": [
        300,
        -60
      ]
    }
  ],
  "connections": {
    "Check for errors": {
      "main": [
        [
          {
            "node": "If the HTTP request failed, throw the error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split out subscriptions to process individually",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get my subscriptions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter out shorts": {
      "main": [
        [
          {
            "node": "Send an email for each new video",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Get video details": {
      "main": [
        [
          {
            "node": "Filter out shorts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter out channels": {
      "main": [
        [
          {
            "node": "Get latest 15 videos of each channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get my subscriptions": {
      "main": [
        [
          {
            "node": "Check for errors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send an email for each new video": {
      "main": [
        []
      ]
    },
    "Get latest 15 videos of each channel": {
      "main": [
        [
          {
            "node": "Keep only videos published since last run",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only keep channels with unwatched videos": {
      "main": [
        [
          {
            "node": "Filter out channels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Keep only videos published since last run": {
      "main": [
        [
          {
            "node": "Get video details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split out subscriptions to process individually": {
      "main": [
        [
          {
            "node": "Only keep channels with unwatched videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}