Skip to main content

Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR

Workflow preview

Workflow preview
100%
Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR preview
Open on n8n.io

1. Workflow Overview

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 sear...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.telegram, n8n-nodes-base.switch, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Artem Boiko.

Original n8n.io source

1.1 Workflow description

Title
Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR
Workflow name
Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR

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 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

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

{
 "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"
}

2. Vision Provider Selection

  • AI_PROVIDER: "gemini" → Gemini 2.0 Flash (recommended for photos + PDF)
  • AI_PROVIDER: "openai" → GPT-4 Vision (photos only)

3. n8n Credentials

  1. SettingsCredentialsAddTelegram API
  2. Enter bot token, save
  3. Select credential in Telegram Trigger node

4. Qdrant Collections

Load DDC CWICR embeddings for target languages (example for Russian):

RU_STPETERSBURG_workitems_costs_resources_EMBEDDINGS_3072_DDC_CWICR

5. Activate & Test

  1. Activate workflow
  2. Send /start to your bot
  3. Select language → send photo/text/PDF

Features

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

Example Workflow

User: /start Bot: Language selection menu (9 options)

User: Selects 🇷🇺 Russian Bot: "Отправьте фото, PDF или текстовое описание работ"

User: Sends bathroom photo Bot: "📷 Анализ фото... ⏳"

Bot: Shows detected works:

🏠 Ванная комната — 4.5 m2

Найдено 12 работ:
1. Демонтаж плитки стен — 18 m2
2. Демонтаж плитки пола — 4.5 m2
3. Гидроизоляция пола — 4.5 m2
4. Гидроизоляция стен — 8 m2
5. Стяжка пола — 4.5 m2
6. Укладка плитки стены — 18 m2
7. Укладка плитки пол — 4.5 m2
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] [↻ Заново]

HTML Report Features

  • KPI Cards: Total cost, item count, labor days, cost breakdown %
  • Expandable rows: Click work item to show resources
  • Resource tags: Color-coded (Labor/Material/Machine)
  • Scope of work: Expandable detailed descriptions
  • Quality indicators: Match quality dots (high/medium/low)
  • Responsive design: Works on mobile and desktop
  • Export buttons: Expand/Collapse all

Notes & Tips

  • Photo tips: Capture full room, include reference objects (doors, tiles)
  • PDF support: Works best with clear floor plans and room schedules
  • Text input: Supports lists, tables, free-form descriptions
  • Rate accuracy: Depends on DDC CWICR coverage for your region
  • Session timeout: User sessions persist across messages
  • Extend: Chain with CRM, project management, or notification tools

Categories

AI · Communication · Data Extraction · Document Ops

Tags

telegram-bot, construction, cost-estimation, gpt-4-vision, gemini, pdf-analysis, qdrant, vector-search, multilingual, html-report


Author

DataDrivenConstruction.io https://DataDrivenConstruction.io [email protected]

Consulting & Training

We help construction, engineering, and technology firms implement:

  • AI-powered estimation systems (text, photo, PDF)
  • Multi-channel bot integrations (Telegram, WhatsApp, Web)
  • Vector database solutions for construction data
  • Multilingual cost database deployment

Contact us to test with your data or adapt to your project requirements.

Resources


Star us on GitHub! github.com/datadrivenconstruction/DDC-CWICR

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - 🔐 Credentials Setup

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - UI Messages

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Route Switch

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Config & Localization

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Main Router

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Checklist

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Telegram Credentials

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Intro

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Agg

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - 🗑️ Delete Progress Msg

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - 🗑️ Delete Work Msg

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - 🧹 Prep Cleanup

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Acc

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - 📤 Edit Result

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 16 - 📊 Update Result

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - 1️⃣ Prep Query

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - 💾 Save Work Msg

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - 📤 Send Work

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - 🗑️ Delete Prev

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 21 - 📝 Prep Work Msg

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 22 - Loop

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 23 - Prep Works

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 24 - Save Progress ID

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 107 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR
Complexity advanced
Nodes 107
Categories Document Extraction, AI RAG
Author Artem Boiko
Published 26 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12176/12176.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Estimate construction costs from text, photos and PDFs with Telegram, GPT‐4/Gemini and DDC CWICR do?

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 sear...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.