Estimate construction costs from text, photos and PDFs with Telegram, GPT‑4/Gemini and DDC CWICR
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (8)
- Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Switch
n8n-nodes-base.switch - Edit Fields (Set)
n8n-nodes-base.set - Telegram Trigger
n8n-nodes-base.telegramTrigger
What it does
A full-featured Telegram bot that accepts text descriptions, photos, or PDF floor plans and returns detailed cost estimates with work breakdown. Powered by GPT-4 Vision / Gemini 2.0, vector search, and the open-source DDC CWICR database (55,000+ construction rates). Who's it for - Contractors & Estimators who need estimates from any input format - Construction managers evaluating scope from site photos or drawings - Architects getting quick cost feedback on floor plans - Real estate professionals assessing renovation costs - Project managers doing rapid feasibility checks via mobile What it does 1. Receives text / photo / PDF via Telegram 2. Analyzes input with AI (Gemini 2.0 Flash or GPT-4 Vision) 3. Extracts work items with quantities and units 4. Searches DDC CWICR vector database for matching rates 5. Generates professional HTML report with full cost breakdown 6. Exports results as Excel or PDF Supports 9 languages: 🇩🇪 DE · 🇬🇧 EN · 🇷🇺 RU · 🇪🇸 ES · 🇫🇷 FR · 🇮🇹 IT · 🇵🇱 PL · 🇧🇷 PT · 🇺🇦 UK How it works ┌─────────────────────────────────────────────────────────────────────┐ │ TELEGRAM INPUT │ │ 📝 Text Description │ 📷 Construction Photo │ 📄 PDF Floor Plan │ └─────────────────────────────────────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────────────┐ │ MAIN ROUTER │ │ Parse message → Detect content type → Route to handler (17 actions) │ └─────────────────────────────────────────────────────────────────────┘ ↓ ┌──────────────────────────┼──────────────────────────┐ ↓ ↓ ↓ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Text LLM │ │ Vision API │ │ Vision PDF │ │ Parse works │ │ Analyze photo │ │ Read floor plan│ │ from text │ │ GPT-4/Gemini │ │ Gemini 2.0 │ └─────────────────┘ └─────────────────┘ └─────────────────┘ └──────────────────────────┼──────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────────────┐ │ CALCULATION LOOP │ │ For each work item: │ │ 1️⃣ Transform query → 2️⃣ Optimize search → 3️⃣ Get embedding │ │ 4️⃣ Qdrant search → 5️⃣ Score results → 6️⃣ AI rerank → 7️⃣ Calculate │ └─────────────────────────────────────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────────────────────┐ │ OUTPUT │ │ 📊 Telegram message │ 🌐 HTML Report │ 📑 Excel │ 📄 PDF │ └─────────────────────────────────────────────────────────────────────┘ Input Types | Type | Description | AI Used | |------|-------------|---------| | 📝 Text | Work lists, specifications, notes | OpenAI GPT-4 | | 📷 Photo | Construction site photos (up to 4) | GPT-4 Vision / Gemini | | 📄 PDF | Floor plans, architectural drawings | Gemini 2.0 Flash | Route Actions (17 total) | | Action | Description | |---|--------|-------------| | 0 | showlang | Language selection menu | | 1 | askphoto | Request photo upload | | 2 | langselected | Save language preference | | 3 | showanalyze | Photo analysis options | | 4 | analyze | Run AI vision analysis | | 5 | showeditmenu | Edit work quantities | | 6 | worksupdated | After quantity change | | 7 | asknewwork | Add manual work item | | 8 | startcalc | Start cost calculation | | 9 | showhelp | Display help message | | 10 | viewdetails | Show resource details | | 11 | exportexcel | Generate CSV export | | 12 | exportpdf | Generate PDF export | | 13 | processpdf | Analyze PDF floor plan | | 14 | analyzetext | Parse text description | | 15 | refine | Re-analyze with context | | 16 | fallback | Handle unknown input | Prerequisites | Component | Requirement | |-----------|-------------| | n8n | v1.30+ with Telegram Trigger | | Telegram Bot | Token from @BotFather | | OpenAI API | For embeddings + text parsing | | Gemini API | For Vision (photos/PDF) — or use GPT-4 Vision | | Qdrant | Vector DB with DDC CWICR collections | | DDC CWICR Data | github.com/datadrivenconstruction/DDC-CWICR | Setup 1. Configure 🔑 TOKEN Node json { "bottoken": "YOURTELEGRAMBOTTOKEN", "AIPROVIDER": "gemin