{
  "name": "Create active learning notes from YouTube videos with Gemini and Notion",
  "nodes": [
    {
      "id": "a10c960f-e25e-4bca-911d-0b7f4bbee975",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        3248,
        1408
      ]
    },
    {
      "id": "0a27dd78-5c4d-4e3e-acb4-646889b385ba",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        656
      ],
      "parameters": {
        "width": 420,
        "height": 544,
        "content": "## 🚀 Overview & Setup\n**Turn YouTube videos into Active Learning study sheets.**\n\n### ⚙️ How it works\n1.  **Input:** Submit a YouTube Link.\n2.  **Process:** The workflow fetches metadata, transcribes "
      }
    },
    {
      "id": "4462a719-70ef-4aa0-a253-4485c48b2ebd",
      "name": "Sticky Note - Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3200,
        1216
      ],
      "parameters": {
        "width": 888,
        "height": 396,
        "content": "## 📥  Step 1: Get Video Data\nHere, the bot receives your YouTube Link.\n\n**What happens?**\n- It separates the Video ID from the link.\n- It fetches the Title, Channel Name, and Thumbnail image to make y"
      }
    },
    {
      "id": "656a39f9-c80b-4167-97c1-e10f8d7d4fe1",
      "name": "Sticky Note - Audio",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4112,
        1248
      ],
      "parameters": {
        "width": 880,
        "height": 688,
        "content": "## 🎧 Step 2: Listen & Note-take\nSince AI cannot \"watch,\" we convert the video into text.\n\n**The Process:**\n1. **Download:** Grabs the audio file (.m4a) from YouTube via RapidAPI.\n2. **Transcribe:** Se"
      }
    },
    {
      "id": "e473e386-b06f-4b5f-a7f3-fb1425239056",
      "name": "Sticky Note - AI",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5024,
        1152
      ],
      "parameters": {
        "width": 676,
        "height": 672,
        "content": "## 🤖 Step 3: \"Active Learning\" Analysis\nThis is the brain of the system. The AI acts as your **Private Tutor**, not just a summarizer.\n\n**AI Tasks (based on Instructions):**\n- Create **Micro-goals** ("
      }
    },
    {
      "id": "01ba8b94-8c62-4b81-b43e-a4ecb849d99b",
      "name": "Sticky Note - Storage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5728,
        1152
      ],
      "parameters": {
        "width": 472,
        "height": 428,
        "content": "## 💾 Step 4: Build Notion Page\nThis part arranges the \"furniture\" in your Notion page to keep it tidy.\n\n**Features:**\n- Uses custom code (JavaScript) to create Checkboxes, Toggles, and Colored Boxes.\n"
      }
    },
    {
      "id": "afa15c61-be81-4a6b-ba4d-badbc6d74241",
      "name": "Sticky Note - Security",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5728,
        1600
      ],
      "parameters": {
        "width": 400,
        "height": 900,
        "content": "## 🛠️ Checklist Before Running (Must Check!)\n\nIf the workflow fails (red error), check these 3 items first:\n\n### 0. Get the Notion Template 📄\n*First, duplicate this database to your Notion workspace.*"
      }
    },
    {
      "id": "46fd1111-9807-44ca-b81b-e1d867f5192e",
      "name": "Set - Prepare Video Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        3920,
        1408
      ]
    },
    {
      "id": "4bec85e9-d4dc-461c-8674-3466a9096c45",
      "name": "HTTP - Download Audio File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4496,
        1520
      ]
    },
    {
      "id": "f7dcab68-667c-4abf-a9f2-adca1b4bde27",
      "name": "IF - Skip if No Transcript",
      "type": "n8n-nodes-base.if",
      "position": [
        4768,
        1760
      ]
    },
    {
      "id": "8eac35a4-8269-4b77-80cd-f876957219e1",
      "name": "Merge - Attach Metadata + Transcript",
      "type": "n8n-nodes-base.merge",
      "position": [
        5104,
        1408
      ]
    },
    {
      "id": "6315aa12-cdad-43d9-a5c6-6d18b2314b88",
      "name": "HTTP - Get YouTube Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4240,
        1520
      ]
    },
    {
      "id": "6a2a6bc0-8c90-4e51-9a7c-7296845f03c7",
      "name": "YouTube - Fetch Video Details",
      "type": "n8n-nodes-base.youTube",
      "position": [
        3680,
        1408
      ]
    },
    {
      "id": "459a4568-c7cb-429e-8d52-7bdde7bffab7",
      "name": "Memory - Conversation Buffer",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        5344,
        1648
      ]
    },
    {
      "id": "91546d20-4d78-41bc-a735-2308eae843cb",
      "name": "Output Parser - Structured JSON",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5536,
        1648
      ]
    },
    {
      "id": "ac6457de-491b-4dc2-b6d9-213d24f47ecf",
      "name": "Transcribe a recording",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        4496,
        1760
      ]
    },
    {
      "id": "fe37039f-34e4-4ae5-b392-8fed7165f7db",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5152,
        1648
      ]
    },
    {
      "id": "64b5a9a2-00a0-4b3c-b3ac-dd2d29db39fa",
      "name": "AI Agent - Active Learning",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5312,
        1408
      ]
    },
    {
      "id": "7f6762ee-5049-4f06-b13b-222c4014b6f8",
      "name": "SET - Get YT ID",
      "type": "n8n-nodes-base.set",
      "position": [
        3456,
        1408
      ]
    },
    {
      "id": "90ead700-ad81-4402-bc8e-f53a1b68dc40",
      "name": "Create Notion Page",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6000,
        1408
      ]
    },
    {
      "id": "fbc07f2c-96e6-4617-a0cf-8575996e9c5d",
      "name": "Set Audio MimeType",
      "type": "n8n-nodes-base.code",
      "position": [
        4240,
        1760
      ]
    },
    {
      "id": "24f07c3f-613c-456b-be64-ecbca17d9299",
      "name": "Build Page Structure",
      "type": "n8n-nodes-base.code",
      "position": [
        5792,
        1408
      ]
    }
  ],
  "connections": {
    "SET - Get YT ID": {
      "main": [
        [
          {
            "node": "YouTube - Fetch Video Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "SET - Get YT ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Audio MimeType": {
      "main": [
        [
          {
            "node": "Transcribe a recording",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Page Structure": {
      "main": [
        [
          {
            "node": "Create Notion Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe a recording": {
      "main": [
        [
          {
            "node": "IF - Skip if No Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Active Learning",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP - Get YouTube Audio": {
      "main": [
        [
          {
            "node": "HTTP - Download Audio File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Active Learning": {
      "main": [
        [
          {
            "node": "Build Page Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP - Download Audio File": {
      "main": [
        [
          {
            "node": "Set Audio MimeType",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Skip if No Transcript": {
      "main": [
        [
          {
            "node": "Merge - Attach Metadata + Transcript",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Memory - Conversation Buffer": {
      "ai_memory": [
        [
          {
            "node": "AI Agent - Active Learning",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Set - Prepare Video Metadata": {
      "main": [
        [
          {
            "node": "Merge - Attach Metadata + Transcript",
            "type": "main",
            "index": 0
          },
          {
            "node": "HTTP - Get YouTube Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "YouTube - Fetch Video Details": {
      "main": [
        [
          {
            "node": "Set - Prepare Video Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Parser - Structured JSON": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent - Active Learning",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Merge - Attach Metadata + Transcript": {
      "main": [
        [
          {
            "node": "AI Agent - Active Learning",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}