{
  "name": "Estimate construction costs from text with Telegram, OpenAI and DDC CWICR",
  "nodes": [
    {
      "id": "5c6b56be-8107-4d2a-99c6-fe01de0dcd7b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5600,
        -2176
      ],
      "parameters": {
        "width": 404,
        "height": 132,
        "content": "⭐ **Star us on GitHub!**\n\n[github.com/datadrivenconstruction/DDC-CWICR](https://github.com/datadrivenconstruction/OpenConstructionEstimate-DDC-CWICR)\n\n**DDC CWICR** — Open Source Construction Cost Dat"
      }
    },
    {
      "id": "00370c25-67e4-4789-9abf-e994473af278",
      "name": "🔐 Credentials Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5600,
        -2032
      ],
      "parameters": {
        "width": 412,
        "height": 936,
        "content": "## 🔐 Credentials Setup\n\n### 🔑 TOKEN node:\n- `bot_token` - Telegram Bot API\n- `QDRANT_URL` - Qdrant server\n- `QDRANT_API_KEY` - Qdrant auth\n\n### n8n Credentials (Settings → Credentials):\n- **OpenAI API"
      }
    },
    {
      "id": "828e259a-6e85-479c-a60e-76931f116b73",
      "name": "Checklist",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5936,
        -1712
      ],
      "parameters": {
        "width": 324,
        "height": 460,
        "content": "## ✅ SETUP CHECKLIST\n\n**1. Telegram Bot**\n- [ ] Create via @BotFather\n- [ ] Token in 🔑 TOKEN\n\n**2. n8n Credentials**\n- [ ] Add OpenAI credential\n- [ ] Link to Model nodes\n\n**3. Qdrant**\n- [ ] Install/"
      }
    },
    {
      "id": "1044a0e4-96af-46fb-87e0-f5b7011b82ad",
      "name": "Intro",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5936,
        -2176
      ],
      "parameters": {
        "width": 318,
        "height": 440,
        "content": "## 🚀 DDC CWICR Text Estimator\n### Construction Cost Estimation Bot\n\n**Version:** 11.0 AI Nodes\n**Author:** DataDrivenConstruction.io\n\n**All AI via n8n Credentials:**\n- 🤖 Parse Text (OpenAI/Claude/Gemi"
      }
    },
    {
      "id": "349fcf16-f55a-4300-aa2a-2bb9ed806716",
      "name": "🔑 TOKEN",
      "type": "n8n-nodes-base.set",
      "position": [
        -5344,
        -1568
      ]
    },
    {
      "id": "c576122d-0243-4772-99d0-01cf54898118",
      "name": "UI Messages",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        -2784
      ],
      "parameters": {
        "width": 464,
        "height": 804,
        "content": "## 🌍 UI Messages\n\nTelegram interface elements:\n- Language selection menu\n- Text input prompts\n- Edit options\n- Help text\n- Error messages\n- Progress indicators\n\nAll localized in Config node.\n\n**Custom"
      }
    },
    {
      "id": "3385b0fc-beba-4867-8cd8-e1f5c9c210ea",
      "name": "Route Switch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4640,
        -2176
      ],
      "parameters": {
        "width": 308,
        "height": 1072,
        "content": "## 🔀 Route Switch\n\n**11 Actions:**\n\n| # | Action | Description |\n|---|--------|-------------|\n| 0 | show_lang | Language menu |\n| 1 | lang_selected | Confirm & prompt |\n| 2 | works_updated | After edi"
      }
    },
    {
      "id": "c095dbb9-7ce0-4173-8c45-d6de272c43b9",
      "name": "Config & Localization",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4880,
        -2176
      ],
      "parameters": {
        "width": 220,
        "height": 808,
        "content": "## 🌐 Config & Localization\n\n**9 Languages:**\nDE, EN, RU, ES, FR, PT, ZH, AR, HI\n\n**Contains:**\n- UI messages (buttons, prompts)\n- Currency symbols (€/$₽¥)\n- Database mapping\n- Search language names\n\n*"
      }
    },
    {
      "id": "4fe52156-022b-49e3-97f6-2da1f363a635",
      "name": "Main Router",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5168,
        -2176
      ],
      "parameters": {
        "width": 268,
        "height": 808,
        "content": "## 🧠 Main Router\n\nCentral message handler.\n\n**Input:** Telegram Update\n\n**Processing:**\n1. Parse message/callback\n2. Manage user sessions\n3. Detect content type\n4. Route to action\n\n**Output:** `action"
      }
    },
    {
      "id": "a5e21659-7430-412a-82a5-24b3f153118b",
      "name": "Agg",
      "type": "n8n-nodes-base.code",
      "position": [
        -1920,
        -784
      ]
    },
    {
      "id": "f6f6aa53-b07e-4a09-b740-7db971f3f7c9",
      "name": "🗑️ Delete Progress Msg",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2096,
        -784
      ]
    },
    {
      "id": "602ec477-8f11-47ec-8cfc-aaf8c9183a09",
      "name": "🗑️ Delete Work Msg",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2288,
        -784
      ]
    },
    {
      "id": "7a275264-fb92-4cf2-8d35-dbbbbdf5d2a3",
      "name": "🧹 Prep Cleanup",
      "type": "n8n-nodes-base.code",
      "position": [
        -2464,
        -784
      ]
    },
    {
      "id": "db70fc98-d9ab-4c81-8992-9e4b844c705a",
      "name": "Acc",
      "type": "n8n-nodes-base.code",
      "position": [
        -1920,
        0
      ]
    },
    {
      "id": "e6214da3-91f1-4065-8f60-a73a8fcd8609",
      "name": "📤 Edit Result",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2096,
        0
      ]
    },
    {
      "id": "f78f0fc1-011c-46c4-a4ae-92088c88589c",
      "name": "📊 Update Result",
      "type": "n8n-nodes-base.code",
      "position": [
        -2256,
        0
      ]
    },
    {
      "id": "86c8dc46-d8e3-4aaa-9aff-986535232720",
      "name": "1️⃣ Prep Query",
      "type": "n8n-nodes-base.code",
      "position": [
        -1920,
        -400
      ]
    },
    {
      "id": "38cc18f0-26f4-4fbf-a12d-13eb6154bb94",
      "name": "💾 Save Work Msg",
      "type": "n8n-nodes-base.code",
      "position": [
        -2096,
        -400
      ]
    },
    {
      "id": "78681325-44aa-43d9-960d-276444c26b1e",
      "name": "📤 Send Work",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2272,
        -400
      ]
    },
    {
      "id": "ac19ffbe-1ef7-4730-bc8b-5e6fa86b36d2",
      "name": "🗑️ Delete Prev",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2464,
        -400
      ]
    },
    {
      "id": "2601173f-9e00-41d0-b242-5e21532e2ac1",
      "name": "📝 Prep Work Msg",
      "type": "n8n-nodes-base.code",
      "position": [
        -2640,
        -400
      ]
    },
    {
      "id": "d676b99b-6ed0-4f16-b00a-a9182175d754",
      "name": "Loop",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -2816,
        -768
      ]
    },
    {
      "id": "b7c5ad07-b6f8-488b-8a1a-b398336545b5",
      "name": "Prep Works",
      "type": "n8n-nodes-base.code",
      "position": [
        -3104,
        -1024
      ]
    },
    {
      "id": "0ffb3b95-d9e3-4c3d-83e6-1f909019b6a1",
      "name": "Save Progress ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -3280,
        -1024
      ]
    },
    {
      "id": "76047230-a1cf-46b9-8eb4-9c85e1982969",
      "name": "📤 Send Progress",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3488,
        -1024
      ]
    },
    {
      "id": "d1cec9fe-6d9a-468d-8ba1-1f8b4112de53",
      "name": "📝 Prep Progress",
      "type": "n8n-nodes-base.code",
      "position": [
        -3728,
        -1024
      ]
    },
    {
      "id": "067f5f6a-7a4a-43fc-90ca-46e7976d0f1e",
      "name": "📤 Send Works",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3328,
        -1696
      ]
    },
    {
      "id": "d0f90abb-6cb7-4180-ba96-9a2e94b46062",
      "name": "📊 Show Works",
      "type": "n8n-nodes-base.code",
      "position": [
        -3472,
        -1696
      ]
    },
    {
      "id": "420db4a8-19cf-43db-8289-bc932bee2a54",
      "name": "9️⃣ Calculate",
      "type": "n8n-nodes-base.code",
      "position": [
        -2464,
        0
      ]
    },
    {
      "id": "aaf03f21-01b2-4da4-80d7-81a012957d5b",
      "name": "8️⃣ Apply Rerank",
      "type": "n8n-nodes-base.code",
      "position": [
        -1264,
        -208
      ]
    },
    {
      "id": "51b2c91b-f306-4b76-ab25-3cd8f7bbbd85",
      "name": "6️⃣ Prep Rerank",
      "type": "n8n-nodes-base.code",
      "position": [
        -1920,
        -208
      ]
    },
    {
      "id": "d2c1dc15-e8fd-4b20-87bf-05eadde6dda4",
      "name": "5️⃣ Qdrant Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2096,
        -208
      ]
    },
    {
      "id": "a0c96cf7-02e7-43dd-b626-ad10568f48ad",
      "name": "4️⃣ Extract Embedding",
      "type": "n8n-nodes-base.code",
      "position": [
        -2256,
        -208
      ]
    },
    {
      "id": "68ea3a8d-ec4f-4dc7-84ba-69b0193667ed",
      "name": "2️⃣ Extract Transform",
      "type": "n8n-nodes-base.code",
      "position": [
        -1264,
        -400
      ]
    },
    {
      "id": "4dc79df3-d1c1-441f-9a78-bc019de5bbbf",
      "name": "📤 Details",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3728,
        -720
      ]
    },
    {
      "id": "afb04e6f-e242-4434-9458-6dfe4de368a2",
      "name": "View Details",
      "type": "n8n-nodes-base.code",
      "position": [
        -3920,
        -720
      ]
    },
    {
      "id": "c3aad83b-e6bf-4ec8-b283-daa45871eab9",
      "name": "📤 Fallback",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        -1232
      ]
    },
    {
      "id": "1b9da534-f7af-4bb6-b8ab-7b43749584db",
      "name": "📤 Help",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3920,
        -720
      ]
    },
    {
      "id": "db60dd77-e822-4331-bd7c-3aa78e4da29c",
      "name": "📤 Send PDF",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3488,
        -880
      ]
    },
    {
      "id": "8d1a58e4-a704-4624-8180-0b529806f3c3",
      "name": "IF PDF",
      "type": "n8n-nodes-base.if",
      "position": [
        -3728,
        -864
      ]
    },
    {
      "id": "4b92eb93-933b-4f56-8e21-687d11a0e0c1",
      "name": "Generate PDF",
      "type": "n8n-nodes-base.code",
      "position": [
        -3920,
        -864
      ]
    },
    {
      "id": "46040b41-3270-4544-a7f3-1fc4fef3827c",
      "name": "📤 Send Excel",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -3728,
        -560
      ]
    },
    {
      "id": "f2db6463-97c3-48e2-84e3-0a8f5fb1708e",
      "name": "Generate Excel",
      "type": "n8n-nodes-base.code",
      "position": [
        -3920,
        -560
      ]
    },
    {
      "id": "50c3a592-49e4-4c66-a26a-fd48ad24894c",
      "name": "📤 Send HTML",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1152,
        -784
      ]
    },
    {
      "id": "547ccce6-8b5c-415d-9c20-6e2ccd30bf91",
      "name": "Prep HTML File",
      "type": "n8n-nodes-base.code",
      "position": [
        -1376,
        -784
      ]
    },
    {
      "id": "36335c56-6c71-43aa-b12c-19f182a8edca",
      "name": "📤 Final",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1376,
        -928
      ]
    },
    {
      "id": "beab9359-66f2-4fe3-b554-336be6767f3b",
      "name": "Final",
      "type": "n8n-nodes-base.code",
      "position": [
        -1584,
        -784
      ]
    },
    {
      "id": "15e86a97-6806-49e5-82dd-d5546f164475",
      "name": "Generate HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        -1744,
        -784
      ]
    },
    {
      "id": "652200d3-b872-4e16-8a78-81f62cfed6f1",
      "name": "Answer Calc CB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3920,
        -1024
      ]
    },
    {
      "id": "06108977-5e6c-4ded-bc87-481a1f213469",
      "name": "📤 Works Updated",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4128,
        -1376
      ]
    },
    {
      "id": "6e8b2b3d-e435-4a4f-acdd-8dfc3fb7948e",
      "name": "Works Updated",
      "type": "n8n-nodes-base.code",
      "position": [
        -4272,
        -1376
      ]
    },
    {
      "id": "b4972bc3-4ad6-4fc9-ba80-c2b54fa94ae8",
      "name": "📤 Ask New Work",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        -2128
      ]
    },
    {
      "id": "22ebe40e-e174-4a2c-917c-9cd3836c8a68",
      "name": "Edit Menu",
      "type": "n8n-nodes-base.code",
      "position": [
        -4272,
        -1520
      ]
    },
    {
      "id": "e1cb2be1-216e-4826-9438-004b65c3fa57",
      "name": "📤 Lang OK",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3968,
        -2288
      ]
    },
    {
      "id": "948a9e11-d8f5-43bb-93c9-d83a198a86a6",
      "name": "Answer Lang CB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        -2288
      ]
    },
    {
      "id": "dc1f5a37-6590-433d-adba-e59843e63aa0",
      "name": "📤 Lang Menu",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4272,
        -2432
      ]
    },
    {
      "id": "2bb17fad-5bfa-4332-a937-fb7c88c4fef5",
      "name": "Route",
      "type": "n8n-nodes-base.switch",
      "position": [
        -4544,
        -1728
      ]
    },
    {
      "id": "9ed6eb3e-b254-466f-8ff1-c3f015caae2d",
      "name": "Config",
      "type": "n8n-nodes-base.code",
      "position": [
        -4832,
        -1568
      ]
    },
    {
      "id": "e787b927-681d-4414-b6bd-35a77570c8b9",
      "name": "Main",
      "type": "n8n-nodes-base.code",
      "position": [
        -5088,
        -1568
      ]
    },
    {
      "id": "87655043-2e58-4c4f-8698-8e8029c3d5e4",
      "name": "Block 6 - Calculation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2944,
        -560
      ],
      "parameters": {
        "width": 1936,
        "height": 772,
        "content": "## 🔄 Block 6: Calculation Loop\n\n**Per Work Item:**\n```\nPrep → LLM Transform → Embed → \nQdrant Search → Rerank → Calculate\n```\n\n**Vector Search:**\n- OpenAI text-embedding-3-small\n- Qdrant similarity se"
      }
    },
    {
      "id": "214f72a6-a2c6-4508-9a6a-ffaa5deafc7b",
      "name": "Block 7 - Reports",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2944,
        -1072
      ],
      "parameters": {
        "width": 1928,
        "height": 484,
        "content": "## 📊 Block 7: Reports\n\n**Final Processing:**\n```\nAggregate → Generate HTML → Send\n```\n**Report Contents:**\n- Work items with costs\n- Resources (labor/material/machine)\n- Scope of work\n- Quality indica"
      }
    },
    {
      "id": "e7488701-92a6-4a11-9651-0c37965c4900",
      "name": "Block 8 - Export",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        -1072
      ],
      "parameters": {
        "width": 1320,
        "height": 692,
        "content": "## 📥 Block 8: Export\n\n**Available Exports:**\n- 📊 **Excel (CSV)** — Spreadsheet\n- 📄 **PDF** — Document\n- 🌐 **HTML** — Interactive\n\n**View Details button:**\n- Full resource breakdown\n- Scope of work\n- Q"
      }
    },
    {
      "id": "0accda2e-edfc-4609-9d5c-37ab7b6672a1",
      "name": "Qdrant Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3360,
        -336
      ],
      "parameters": {
        "width": 380,
        "height": 528,
        "content": "## 🔍 Qdrant Vector DB\n\n**Collections (9 languages):**\n- `DDC_CWICR_DE` — German\n- `DDC_CWICR_EN` — English\n- `DDC_CWICR_RU` — Russian\n- `DDC_CWICR_ES` — Spanish\n- `DDC_CWICR_FR` — French\n- `DDC_CWICR_"
      }
    },
    {
      "id": "18bb796a-6bf0-44e9-be2b-72ebae258a29",
      "name": "Prep Text LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        -4272,
        -1696
      ]
    },
    {
      "id": "5428212a-6693-4480-933a-4d4ec9edd0ea",
      "name": "📤 Edit Menu",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4128,
        -1520
      ]
    },
    {
      "id": "96e1a4d4-e8f8-42b6-bf14-f21159e676dc",
      "name": "Telegram Trigger1",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -5536,
        -1568
      ]
    },
    {
      "id": "18d9abc4-db2b-4089-864a-d456405ffe09",
      "name": "Prep Lang OK",
      "type": "n8n-nodes-base.code",
      "position": [
        -4112,
        -2288
      ]
    },
    {
      "id": "cf603c92-9a4b-4f48-91f9-07b4f3cbdb29",
      "name": "🔧 Config Parse",
      "type": "n8n-nodes-base.set",
      "position": [
        -4128,
        -1696
      ]
    },
    {
      "id": "e3771ed1-2c9d-4068-ba17-a158f810191c",
      "name": "🤖 AI Parse Text",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -3968,
        -1696
      ]
    },
    {
      "id": "3814f181-8e64-457c-a00f-e85a6c50de9a",
      "name": "OpenAI Model 1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -3920,
        -240
      ]
    },
    {
      "id": "8f46f5e0-89f6-4e08-9dea-77fb73e35aef",
      "name": "🔧 Config Transform",
      "type": "n8n-nodes-base.set",
      "position": [
        -1744,
        -400
      ]
    },
    {
      "id": "c5024917-6a3e-4ddf-bce0-76b0bae61685",
      "name": "🤖 AI Transform",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1568,
        -400
      ]
    },
    {
      "id": "5b0a861f-bc95-4892-9c01-50e089893efb",
      "name": "OpenAI Model 2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -3600,
        -32
      ]
    },
    {
      "id": "e059086c-d718-45c2-abb1-365997bf0cbf",
      "name": "🔧 Config Rerank",
      "type": "n8n-nodes-base.set",
      "position": [
        -1744,
        -208
      ]
    },
    {
      "id": "3a82f4fc-6f8c-4c82-acf4-f763d6e53e76",
      "name": "🤖 AI Rerank",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -1568,
        -208
      ]
    },
    {
      "id": "06f2702e-b068-4a92-afa7-67d935b881f1",
      "name": "📝 Parse Text Response",
      "type": "n8n-nodes-base.code",
      "position": [
        -3664,
        -1696
      ]
    },
    {
      "id": "b13e5f92-4464-463a-bac7-c6c49dc284d2",
      "name": "Sticky AI Parse",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        -1952
      ],
      "parameters": {
        "width": 1112,
        "height": 392,
        "content": "## 🤖 AI Parse Text\n\n**Purpose:** Extract works from user text\n\n**Models (enable ONE):**\n- ✓ OpenAI Model 1 (gpt-4o-mini)\n- ○ Claude Model 1 (disabled)\n- ○ Gemini Model 1 (disabled)\n\n**To switch:** Dis"
      }
    },
    {
      "id": "484e78d7-8254-4b00-81be-3c5c6571dd0a",
      "name": "Sticky AI Transform Rerank",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -544
      ],
      "parameters": {
        "width": 456,
        "height": 736,
        "content": "## 🤖 AI Transform & Rerank\n\n**Transform:** Optimize search query\n**Rerank:** Score candidates 0-100\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Models per stage:**\n- OpenAI Model 2/3 (active)\n- Claude Model 2/3 "
      }
    },
    {
      "id": "7b2f5619-46d8-41d5-82f8-c2a769572e4b",
      "name": "Token Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5536,
        -1376
      ],
      "parameters": {
        "width": 280,
        "height": 264,
        "content": "## ⚠️ Setup 🔑 TOKEN\n\n**Edit TOKEN node values:**\n\n- `bot_token` → Telegram token\n- `QDRANT_URL` → Qdrant server\n\n**Error \"resource not found\"?**\n→ bot_token is invalid\n\n**Get token:** @BotFather → /ne"
      }
    },
    {
      "id": "a12cfbcc-d1c7-41b9-ae56-a36a35ff3e3b",
      "name": "🔧 Config Embed",
      "type": "n8n-nodes-base.set",
      "position": [
        -2640,
        -208
      ]
    },
    {
      "id": "472ff9d9-ddd5-455c-8b35-d1477feb8464",
      "name": "3️⃣ Embeddings API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2464,
        -208
      ]
    },
    {
      "id": "434d32ce-df75-425b-b21f-37051908521b",
      "name": "Sticky Embeddings",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2928,
        -80
      ],
      "parameters": {
        "width": 384,
        "height": 264,
        "content": "## 🧮 Embeddings\n\n**Settings in Config Embed:**\n- `model`: text-embedding-3-large\n- `dimensions`: 3072\n\n**Change model:**\nEdit 🔧 Config Embed node\n\n**Credentials:**\nUses n8n OpenAI credential in 3️⃣ Em"
      }
    },
    {
      "id": "c67658c9-4b67-48e5-b782-e671ff1e4763",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -3776,
        -32
      ]
    },
    {
      "id": "e3d0ce38-abd2-4cfd-afdc-671a661909db",
      "name": "Anthropic Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -3760,
        -240
      ]
    },
    {
      "id": "fac9a3b6-332b-4659-a975-59809bd0186f",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -3600,
        -240
      ]
    },
    {
      "id": "e930de34-857f-4143-8719-370ea7ec0a82",
      "name": "LLM Models",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        -336
      ],
      "parameters": {
        "width": 904,
        "height": 528,
        "content": "## 🧠 Available AI Models\n\nConnect any model to LLM Chain nodes:\n\n- **OpenAI** — GPT-4o (default)\n- **Anthropic** — Claude 3.5\n- **Google Gemini** — Gemini Pro\n- **OpenRouter** — Multiple models\n- **xA"
      }
    },
    {
      "id": "0a955ad6-e47e-40f5-94b2-ef964385af75",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        -3936,
        -32
      ]
    },
    {
      "id": "087db646-d3cb-4ba9-9072-f2e73bd81fc5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4304,
        -1536
      ],
      "parameters": {
        "width": 320,
        "height": 448,
        "content": ""
      }
    }
  ],
  "connections": {
    "Acc": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agg": {
      "main": [
        [
          {
            "node": "Generate HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [
          {
            "node": "🧹 Prep Cleanup",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📝 Prep Work Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Main": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final": {
      "main": [
        [
          {
            "node": "Prep HTML File",
            "type": "main",
            "index": 0
          },
          {
            "node": "📤 Final",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route": {
      "main": [
        [
          {
            "node": "📤 Lang Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Answer Lang CB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Works Updated",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Edit Menu",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📤 Ask New Work",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Answer Calc CB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Excel",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📤 Help",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "View Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prep Text LLM",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "📤 Fallback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "Route",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF PDF": {
      "main": [
        [
          {
            "node": "📤 Send PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Menu": {
      "main": [
        [
          {
            "node": "📤 Edit Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Works": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔑 TOKEN": {
      "main": [
        [
          {
            "node": "Main",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF": {
      "main": [
        [
          {
            "node": "IF PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Lang OK": {
      "main": [
        [
          {
            "node": "📤 Lang OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "View Details": {
      "main": [
        [
          {
            "node": "📤 Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate HTML": {
      "main": [
        [
          {
            "node": "Final",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prep Text LLM": {
      "main": [
        [
          {
            "node": "🔧 Config Parse",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Works Updated": {
      "main": [
        [
          {
            "node": "📤 Works Updated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Answer Calc CB": {
      "main": [
        [
          {
            "node": "📝 Prep Progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Answer Lang CB": {
      "main": [
        [
          {
            "node": "Prep Lang OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Excel": {
      "main": [
        [
          {
            "node": "📤 Send Excel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model 1": {
      "ai_languageModel": [
        [
          {
            "node": "🤖 AI Parse Text",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model 2": {
      "ai_languageModel": [
        [
          {
            "node": "🤖 AI Transform",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "🤖 AI Rerank",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prep HTML File": {
      "main": [
        [
          {
            "node": "📤 Send HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📤 Send Work": {
      "main": [
        [
          {
            "node": "💾 Save Work Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 AI Rerank": {
      "main": [
        [
          {
            "node": "8️⃣ Apply Rerank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Show Works": {
      "main": [
        [
          {
            "node": "📤 Send Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Progress ID": {
      "main": [
        [
          {
            "node": "Prep Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📤 Edit Result": {
      "main": [
        [
          {
            "node": "Acc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9️⃣ Calculate": {
      "main": [
        [
          {
            "node": "📊 Update Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger1": {
      "main": [
        [
          {
            "node": "🔑 TOKEN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Config Embed": {
      "main": [
        [
          {
            "node": "3️⃣ Embeddings API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Config Parse": {
      "main": [
        [
          {
            "node": "🤖 AI Parse Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 AI Transform": {
      "main": [
        [
          {
            "node": "2️⃣ Extract Transform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧹 Prep Cleanup": {
      "main": [
        [
          {
            "node": "🗑️ Delete Work Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1️⃣ Prep Query": {
      "main": [
        [
          {
            "node": "🔧 Config Transform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💾 Save Work Msg": {
      "main": [
        [
          {
            "node": "1️⃣ Prep Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Update Result": {
      "main": [
        [
          {
            "node": "📤 Edit Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 Prep Progress": {
      "main": [
        [
          {
            "node": "📤 Send Progress",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 Prep Work Msg": {
      "main": [
        [
          {
            "node": "🗑️ Delete Prev",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📤 Send Progress": {
      "main": [
        [
          {
            "node": "Save Progress ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Config Rerank": {
      "main": [
        [
          {
            "node": "🤖 AI Rerank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 AI Parse Text": {
      "main": [
        [
          {
            "node": "📝 Parse Text Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6️⃣ Prep Rerank": {
      "main": [
        [
          {
            "node": "🔧 Config Rerank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🗑️ Delete Prev": {
      "main": [
        [
          {
            "node": "📤 Send Work",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8️⃣ Apply Rerank": {
      "main": [
        [
          {
            "node": "9️⃣ Calculate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5️⃣ Qdrant Search": {
      "main": [
        [
          {
            "node": "6️⃣ Prep Rerank",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔧 Config Transform": {
      "main": [
        [
          {
            "node": "🤖 AI Transform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3️⃣ Embeddings API": {
      "main": [
        [
          {
            "node": "4️⃣ Extract Embedding",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🗑️ Delete Work Msg": {
      "main": [
        [
          {
            "node": "🗑️ Delete Progress Msg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 Parse Text Response": {
      "main": [
        [
          {
            "node": "📊 Show Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2️⃣ Extract Transform": {
      "main": [
        [
          {
            "node": "🔧 Config Embed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4️⃣ Extract Embedding": {
      "main": [
        [
          {
            "node": "5️⃣ Qdrant Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🗑️ Delete Progress Msg": {
      "main": [
        [
          {
            "node": "Agg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}