See llms.txt for all machine-readable content.
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).
Supports 9 languages: ๐ฉ๐ช DE ยท ๐ฌ๐ง EN ยท ๐ท๐บ RU ยท ๐ช๐ธ ES ยท ๐ซ๐ท FR ยท ๐ฎ๐น IT ยท ๐ต๐ฑ PL ยท ๐ง๐ท PT ยท ๐บ๐ฆ UK
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| 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 |
| # | Action | Description |
|---|---|---|
| 0 | show_lang | Language selection menu |
| 1 | ask_photo | Request photo upload |
| 2 | lang_selected | Save language preference |
| 3 | show_analyze | Photo analysis options |
| 4 | analyze | Run AI vision analysis |
| 5 | show_edit_menu | Edit work quantities |
| 6 | works_updated | After quantity change |
| 7 | ask_new_work | Add manual work item |
| 8 | start_calc | Start cost calculation |
| 9 | show_help | Display help message |
| 10 | view_details | Show resource details |
| 11 | export_excel | Generate CSV export |
| 12 | export_pdf | Generate PDF export |
| 13 | process_pdf | Analyze PDF floor plan |
| 14 | analyze_text | Parse text description |
| 15 | refine | Re-analyze with context |
| 16 | fallback | Handle unknown input |
| 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 |
{
"bot_token": "YOUR_TELEGRAM_BOT_TOKEN",
"AI_PROVIDER": "gemini",
"GEMINI_API_KEY": "YOUR_GEMINI_KEY",
"OPENAI_API_KEY": "YOUR_OPENAI_KEY",
"QDRANT_URL": "http://localhost:6333",
"QDRANT_API_KEY": "YOUR_QDRANT_KEY"
}
AI_PROVIDER: "gemini" โ Gemini 2.0 Flash (recommended for photos + PDF)AI_PROVIDER: "openai" โ GPT-4 Vision (photos only)Load DDC CWICR embeddings for target languages (example for Russian):
RU_STPETERSBURG_workitems_costs_resources_EMBEDDINGS_3072_DDC_CWICR
/start to your bot| Feature | Description |
|---|---|
| ๐ท Photo Analysis | GPT-4 Vision or Gemini 2.0 for site photos |
| ๐ PDF Processing | Floor plan analysis with room extraction |
| ๐ Text Parsing | Natural language work lists |
| ๐ Vector Search | Semantic matching via Qdrant + OpenAI embeddings |
| ๐ค AI Reranking | LLM-based result scoring for accuracy |
| โ๏ธ Inline Editing | Modify quantities via Telegram buttons |
| ๐ HTML Report | Professional expandable report with KPIs |
| ๐ Excel Export | CSV with full work breakdown |
| ๐ PDF Export | HTML-based PDF document |
| ๐ 9 Languages | Full UI + database localization |
| ๐พ Session State | Multi-turn conversation support |
| ๐ง Refine Mode | Re-analyze with additional context |
User: /start
Bot: Language selection menu (9 options)
User: Selects ๐ท๐บ Russian
Bot: "ะัะฟัะฐะฒััะต ัะพัะพ, PDF ะธะปะธ ัะตะบััะพะฒะพะต ะพะฟะธัะฐะฝะธะต ัะฐะฑะพั"
User: Sends bathroom photo
Bot: "๐ท ะะฝะฐะปะธะท ัะพัะพ... โณ"
Bot: Shows detected works:
๐ ะะฐะฝะฝะฐั ะบะพะผะฝะฐัะฐ โ 4.5 mยฒ
ะะฐะนะดะตะฝะพ 12 ัะฐะฑะพั:
1. ะะตะผะพะฝัะฐะถ ะฟะปะธัะบะธ ััะตะฝ โ 18 mยฒ
2. ะะตะผะพะฝัะฐะถ ะฟะปะธัะบะธ ะฟะพะปะฐ โ 4.5 mยฒ
3. ะะธะดัะพะธะทะพะปััะธั ะฟะพะปะฐ โ 4.5 mยฒ
4. ะะธะดัะพะธะทะพะปััะธั ััะตะฝ โ 8 mยฒ
5. ะกััะถะบะฐ ะฟะพะปะฐ โ 4.5 mยฒ
6. ะฃะบะปะฐะดะบะฐ ะฟะปะธัะบะธ ััะตะฝั โ 18 mยฒ
7. ะฃะบะปะฐะดะบะฐ ะฟะปะธัะบะธ ะฟะพะป โ 4.5 mยฒ
8. ะฃััะฐะฝะพะฒะบะฐ ัะฝะธัะฐะทะฐ โ 1 ัั
9. ะฃััะฐะฝะพะฒะบะฐ ัะฐะบะพะฒะธะฝั โ 1 ัั
10. ะฃััะฐะฝะพะฒะบะฐ ัะผะตัะธัะตะปั โ 2 ัั
...
[โ๏ธ ะ ะตะดะฐะบัะธัะพะฒะฐัั] [๐ ะ ะฐัััะธัะฐัั]
User: Taps ๐ Calculate
Bot: Shows progress per item, then final result:
โ
ะกะผะตัะฐ ะณะพัะพะฒะฐ โ 12 ะฟะพะทะธัะธะน
๐ฐ ะัะพะณะพ: โฝ 89,450
ะ ะฐะฑะพัะฐ: โฝ 35,200 (39%)
ะะฐัะตัะธะฐะปั: โฝ 48,750 (55%)
ะะตั
ะฐะฝะธะทะผั: โฝ 5,500 (6%)
[๐ ะะตัะฐะปะธ] [โ Excel] [โ PDF] [โป ะะฐะฝะพะฒะพ]
AI ยท Communication ยท Data Extraction ยท Document Ops
telegram-bot, construction, cost-estimation, gpt-4-vision, gemini, pdf-analysis, qdrant, vector-search, multilingual, html-report
DataDrivenConstruction.io
https://DataDrivenConstruction.io
[email protected]
We help construction, engineering, and technology firms implement:
Contact us to test with your data or adapt to your project requirements.
โญ Star us on GitHub! github.com/datadrivenconstruction/DDC-CWICR