{
  "name": "Extract vocabulary flashcards from Spotify listening with Gemini and Google Sheets",
  "nodes": [
    {
      "id": "ac555343-470d-4358-8a80-83fcb1f25680",
      "name": "Cut out Duplicate Songs",
      "type": "n8n-nodes-base.code",
      "position": [
        -1056,
        32
      ]
    },
    {
      "id": "4385abe2-943e-41c1-b892-50a155c9970c",
      "name": "Getting Lyrics",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -864,
        32
      ]
    },
    {
      "id": "5562208c-a03f-4acf-aff2-52e3ae116417",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -992,
        512
      ]
    },
    {
      "id": "25c8d472-8d61-466d-a4e4-26daa4b44c51",
      "name": "Every Sunday at noon",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1472,
        32
      ]
    },
    {
      "id": "ea5d8c41-f819-466b-8a9e-45650617df8f",
      "name": "Combine existing Words with new Words",
      "type": "n8n-nodes-base.code",
      "position": [
        -320,
        32
      ]
    },
    {
      "id": "8b180ba6-72d7-49e3-a3a3-ff2c92d8a5a0",
      "name": "Append to All Vocabularies",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        448
      ]
    },
    {
      "id": "ce615da7-f013-4ecd-84fb-9e5f8d7ea435",
      "name": "Append to Weekly",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        256
      ]
    },
    {
      "id": "f6450cae-151f-4581-88a6-70a8aea78a40",
      "name": "Create sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        96,
        48
      ]
    },
    {
      "id": "0d01d6fb-ab2e-4f9f-a58d-e4a23fef7091",
      "name": "Cut out SheetName Column",
      "type": "n8n-nodes-base.code",
      "position": [
        -80,
        256
      ]
    },
    {
      "id": "320a4012-9d05-4f84-8ea5-1d3057903760",
      "name": "Parse, Deduplicate, Week Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -400,
        256
      ]
    },
    {
      "id": "85b1c956-61a4-42e8-b55a-51399a9bb136",
      "name": "Read all Vocabularies",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -496,
        32
      ]
    },
    {
      "id": "a3b0fb08-7bf9-4472-a4a2-694e1eeedc5a",
      "name": "Put all Lyrics together",
      "type": "n8n-nodes-base.code",
      "position": [
        -672,
        32
      ]
    },
    {
      "id": "d2f489e3-6d7b-459d-8c8b-5de5fbd416e0",
      "name": "Get the recently played Songs",
      "type": "n8n-nodes-base.spotify",
      "position": [
        -1264,
        32
      ]
    },
    {
      "id": "1746123a-c0f4-4647-af27-5405a57489f9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -16
      ],
      "parameters": {
        "width": 496,
        "height": 96,
        "content": "### 🎵 Fetches recently played songs from Spotify, removes duplicates, and gets lyrics from lrclib.net.\n\n"
      }
    },
    {
      "id": "f492d8c4-f78a-4beb-9d4b-ed8fe971e083",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -16
      ],
      "parameters": {
        "width": 464,
        "height": 96,
        "content": "### 📖 Reads all previously learned words from Google Sheets for duplicate checking.\n\n\n"
      }
    },
    {
      "id": "3f5c49f9-8034-485a-83c4-0746038de529",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        464
      ],
      "parameters": {
        "width": 304,
        "height": 96,
        "content": "## 🤖 AI EXTRACTION\n➡️ To change the language: edit the prompt."
      }
    },
    {
      "id": "950ce12a-f627-4564-8892-30c670fa4192",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -736,
        256
      ]
    },
    {
      "id": "fd131c0f-f8a9-4f34-933c-8cfbd939023a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1968,
        -192
      ],
      "parameters": {
        "width": 448,
        "height": 656,
        "content": "## How it works\n\nEvery Sunday it fetches your recently played songs, finds the lyrics via lrclib.net, and uses Google Gemini to extract 40-60 useful vocabulary words (B1-B2 level). New words are dedup"
      }
    },
    {
      "id": "868c82e0-239c-40d2-a005-31103592e1d1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        256
      ],
      "parameters": {
        "width": 224,
        "height": 128,
        "content": "⚠️ Set your Google Cloud app to \"In Production\" — in \"Testing\" mode, tokens expire after 7 days and break the weekly automation."
      }
    },
    {
      "id": "7a525920-6616-4cca-8207-165635336ae0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -160
      ],
      "parameters": {
        "width": 304,
        "height": 192,
        "content": "## 📝 SAVE TO SHEETS\n\nCreates a weekly tab (e.g. \"Week 11\") and writes\nnew words there + to the master \"All Vocabularies\" tab.\nUse Flashcard Lab app to study from the weekly tabs.\n\n"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Parse, Deduplicate, Week Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Getting Lyrics": {
      "main": [
        [
          {
            "node": "Put all Lyrics together",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Sunday at noon": {
      "main": [
        [
          {
            "node": "Get the recently played Songs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read all Vocabularies": {
      "main": [
        [
          {
            "node": "Combine existing Words with new Words",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cut out Duplicate Songs": {
      "main": [
        [
          {
            "node": "Getting Lyrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Put all Lyrics together": {
      "main": [
        [
          {
            "node": "Read all Vocabularies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cut out SheetName Column": {
      "main": [
        [
          {
            "node": "Append to Weekly",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get the recently played Songs": {
      "main": [
        [
          {
            "node": "Cut out Duplicate Songs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse, Deduplicate, Week Code": {
      "main": [
        [
          {
            "node": "Create sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Cut out SheetName Column",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append to All Vocabularies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine existing Words with new Words": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}