{
  "name": "Look up English vocabulary via Telegram and save results to Notion",
  "nodes": [
    {
      "id": "4a12ebd5-2cbc-465b-9712-c40dfef07d4d",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        6496,
        2304
      ]
    },
    {
      "id": "226ad3fb-98ef-4dcb-ae00-9131a2f70d7c",
      "name": "Config — Edit Me",
      "type": "n8n-nodes-base.set",
      "position": [
        6736,
        2304
      ]
    },
    {
      "id": "a5744a26-84d6-4a00-b78d-d8e80a0f5c91",
      "name": "Authorize User",
      "type": "n8n-nodes-base.if",
      "position": [
        6960,
        2304
      ]
    },
    {
      "id": "7df16993-db47-4926-b7a8-dcd10660911b",
      "name": "Reject Unauthorized User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        7232,
        2528
      ]
    },
    {
      "id": "c295ba6a-e7cf-403a-b9f1-86692eadbbaa",
      "name": "Detect Input Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        7344,
        2112
      ]
    },
    {
      "id": "fd8d6328-ff86-47bb-89ab-0605f1f28056",
      "name": "Set Text Input",
      "type": "n8n-nodes-base.set",
      "position": [
        8016,
        1952
      ]
    },
    {
      "id": "fd31e824-1abd-483e-808e-307558859ced",
      "name": "Get Voice File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7568,
        2128
      ]
    },
    {
      "id": "d3ac2d24-dc59-4fe4-9789-23008455ff03",
      "name": "Download Audio",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7792,
        2128
      ]
    },
    {
      "id": "26431ab7-45ee-445f-a880-8ac096a1ceb1",
      "name": "Transcribe Audio (Whisper)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        8016,
        2128
      ]
    },
    {
      "id": "66c4d4c1-706a-43d0-b82f-6bf828d6b076",
      "name": "Set Voice Text",
      "type": "n8n-nodes-base.set",
      "position": [
        8240,
        2128
      ]
    },
    {
      "id": "33966da6-f711-4c7f-a354-288b132da6bc",
      "name": "Get Photo File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7568,
        2336
      ]
    },
    {
      "id": "edd2f2e1-589e-4c46-b207-2c4231891051",
      "name": "Download Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7792,
        2336
      ]
    },
    {
      "id": "a9b1ede7-05d5-465e-9bfb-93aaf28c783b",
      "name": "Fix Image MIME Type",
      "type": "n8n-nodes-base.code",
      "position": [
        8016,
        2336
      ]
    },
    {
      "id": "1d3a56c3-5ed2-4e5f-b2c9-7c44946f6444",
      "name": "Analyze Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        8240,
        2336
      ]
    },
    {
      "id": "e0a512ba-913a-4b00-874e-4063c53e5a38",
      "name": "Set Photo Text",
      "type": "n8n-nodes-base.set",
      "position": [
        8448,
        2336
      ]
    },
    {
      "id": "f3993415-254f-41fb-a630-b174171b467c",
      "name": "Dictionary Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        8704,
        2144
      ]
    },
    {
      "id": "177efefc-488a-48df-85c8-4b3e9c9b916e",
      "name": "OpenAI (Dictionary)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        8704,
        2368
      ]
    },
    {
      "id": "3a80d08a-bf73-40d6-aa4e-1f8da93dac01",
      "name": "Dictionary Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        8848,
        2368
      ]
    },
    {
      "id": "6bf8d2c4-5286-40ff-8f51-4a5619b95d57",
      "name": "Send Telegram Reply",
      "type": "n8n-nodes-base.telegram",
      "position": [
        9008,
        2144
      ]
    },
    {
      "id": "dcf8fea9-2f95-4502-acc9-3e76ad044622",
      "name": "Save Vocabulary to Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        9184,
        2144
      ]
    },
    {
      "id": "3346999c-b78b-4129-bb5a-269b71a1934a",
      "name": "Sticky Note - Main",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6416,
        1600
      ],
      "parameters": {
        "width": 680,
        "height": 520,
        "content": "## How it works\n\nThis workflow powers a personal Telegram bot for building English vocabulary. When you send a message — text, voice, or photo — the bot detects the input type and processes it: voice "
      }
    },
    {
      "id": "2b504b07-c2a2-4985-9bac-b0848dfc8469",
      "name": "Sticky Note - Group 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6384,
        2176
      ],
      "parameters": {
        "width": 820,
        "height": 280,
        "content": "## Entry & Security\n\nReceives incoming Telegram messages, loads config values, and checks the sender's chat ID. Only the authorised user continues; others receive a rejection notice."
      }
    },
    {
      "id": "0903a7aa-40b3-4097-bf2d-9bb0760dcf43",
      "name": "Sticky Note - Group 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7248,
        1792
      ],
      "parameters": {
        "width": 1368,
        "height": 700,
        "content": "## Input Detection & Processing\n\nRoutes each message by type: text passes through directly, voice is transcribed via Whisper, and photos are processed via GPT-4o-mini Vision OCR. All paths produce a u"
      }
    },
    {
      "id": "e03ac732-886c-4959-b802-dd1d0019f496",
      "name": "Sticky Note - Group 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8656,
        1920
      ],
      "parameters": {
        "width": 760,
        "height": 400,
        "content": "## AI Lookup & Output\n\nA GPT-4.1-mini agent spell-checks the input, then returns structured vocabulary data. The result is sent back as a Telegram reply and saved to the Notion vocabulary database."
      }
    },
    {
      "id": "a830db2b-7d9c-4403-a3ab-8d5f506c73e2",
      "name": "Sticky Note - CTA",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8912,
        1680
      ],
      "parameters": {
        "width": 760,
        "height": 200,
        "content": "## Want more automation templates?\n\nCheck out the **Content Automation Bundle** — 6 n8n workflows for AI content creation, social media publishing, and Threads analytics.\n\n👉 https://jasonchuang0818.gu"
      }
    }
  ],
  "connections": {
    "Analyze Image": {
      "main": [
        [
          {
            "node": "Set Photo Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Authorize User": {
      "main": [
        [
          {
            "node": "Detect Input Type",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reject Unauthorized User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Audio": {
      "main": [
        [
          {
            "node": "Transcribe Audio (Whisper)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Fix Image MIME Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Photo File": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Voice File": {
      "main": [
        [
          {
            "node": "Download Audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Photo Text": {
      "main": [
        [
          {
            "node": "Dictionary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text Input": {
      "main": [
        [
          {
            "node": "Dictionary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Voice Text": {
      "main": [
        [
          {
            "node": "Dictionary Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dictionary Agent": {
      "main": [
        [
          {
            "node": "Send Telegram Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Config — Edit Me",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Input Type": {
      "main": [
        [
          {
            "node": "Set Text Input",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Voice File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Photo File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config — Edit Me": {
      "main": [
        [
          {
            "node": "Authorize User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fix Image MIME Type": {
      "main": [
        [
          {
            "node": "Analyze Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI (Dictionary)": {
      "ai_languageModel": [
        [
          {
            "node": "Dictionary Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Telegram Reply": {
      "main": [
        [
          {
            "node": "Save Vocabulary to Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dictionary Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Dictionary Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe Audio (Whisper)": {
      "main": [
        [
          {
            "node": "Set Voice Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}