Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build Telegram bots for construction field workers. Real-time reporting, photo uploads, task assignments, progress tracking. Integrate with n8n for automated workflows.
.claude/skills/datadrivenconstruction-telegram-field-bot/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | 124% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 104% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 79% | 0% |
Field workers need simple tools. Telegram bots provide instant communication, photo sharing, and task management without training or app downloads.
> "Telegram for field ops: Real-time task assignment and status updates" — DDC Community
| Feature | Benefit | |---------|---------| | No training | Workers already use Telegram | | Works offline | Messages sync when connected | | Photos/videos | Easy visual documentation | | Groups | Team coordination | | Bots | Automated workflows | | Free | No per-user licensing |
┌─────────────────────────────────────────────────────────────────┐
│ TELEGRAM FIELD BOT │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Field Worker Bot n8n │
│ ──────────── ─── ─── │
│ │
│ 📱 Send photo ───▶ 🤖 Receive ───▶ ⚙️ Process │
│ 📝 Text report 📋 Parse 📊 Store │
│ 📍 Location 🏷️ Classify 📧 Notify │
│ ✅ Confirm 📈 Dashboard │
│ │
└─────────────────────────────────────────────────────────────────┘1. Open Telegram, search @BotFather
2. Send /newbot
3. Name: "SiteReport Bot"
4. Username: "sitereport_company_bot"
5. Copy the API tokenjson{ "workflow": "Telegram Field Reporting", "nodes": [ { "name": "Telegram Trigger", "type": "Telegram", "event": "message", "token": "YOUR_BOT_TOKEN" }, { "name": "Parse Message", "type": "Code", "code": "Parse message type: text, photo, location" }, { "name": "Route by Type", "type": "Switch", "rules": ["photo", "text", "location", "command"] }, { "name": "Process Photo", "type": "OpenAI Vision", "prompt": "Describe this construction site photo. Identify: progress, issues, safety concerns." }, { "name": "Save to Database", "type": "PostgreSQL", "operation": "insert" }, { "name": "Confirm to User", "type": "Telegram", "action": "sendMessage", "text": "✅ Report received! ID: {{report_id}}" } ] }
python# /start - Welcome and instructions # /report - Start daily report # /photo - Upload site photo # /issue - Report issue # /progress - Update progress # /weather - Log weather conditions # /safety - Safety observation # /help - Show commands
pythonfrom telegram import Update, ReplyKeyboardMarkup from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes import asyncio # Bot token from BotFather TOKEN = "YOUR_BOT_TOKEN" # Keyboards main_keyboard = ReplyKeyboardMarkup([ ["📸 Photo Report", "📝 Text Report"], ["⚠️ Issue", "✅ Progress"], ["🌤️ Weather", "🦺 Safety"] ], resize_keyboard=True) async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): """Welcome message""" await update.message.reply_text( "👷 Site Report Bot\n\n" "Use the buttons below to submit reports.\n" "All reports are automatically logged and processed.", reply_markup=main_keyboard ) async def handle_photo(update: Update, context: ContextTypes.DEFAULT_TYPE): """Process photo submissions""" photo = update.message.photo[-1] # Highest resolution file = await photo.get_file() # Download photo photo_path = f"photos/{update.message.chat.id}_{photo.file_id}.jpg" await file.download_to_drive(photo_path) # Get caption (description) caption = update.message.caption or "No description" # Get location if available location = None if update.message.location: location = { "lat": update.message.location.latitude, "lon": update.message.location.longitude } # Save to database (via n8n webhook or direct) report = { "type": "photo", "user_id": update.message.from_user.id, "username": update.message.from_user.username, "photo_path": photo_path, "caption": caption, "location": location, "timestamp": update.message.date.isoformat() } # Send to n8n for processing # requests.post("https://n8n.company.com/webhook/photo-report", json=report) await update.message.reply_text( f"✅ Photo received!\n" f"📝 Description: {caption}\n" f"🕐 Time: {update.message.date.strftime('%H:%M')}\n\n" "Photo will be analyzed and added to daily report." ) async def handle_text(update: Update, context: ContextTypes.DEFAULT_TYPE): """Process text reports""" text = update.message.text # Route based on button pressed if text == "📸 Photo Report": await update.message.reply_text("📸 Send a photo of the site with a description.") elif text == "📝 Text Report": await update.message.reply_text("📝 Type your progress report:") elif text == "⚠️ Issue": await update.message.reply_text( "⚠️ Describe the issue:\n" "- What is the problem?\n" "- Where is it located?\n" "- How urgent? (High/Medium/Low)" ) elif text == "✅ Progress": await update.message.reply_text( "✅ Update progress:\n" "- What work was completed?\n" "- Percentage complete?\n" "- Any blockers?" ) elif text == "🌤️ Weather": await update.message.reply_text( "🌤️ Weather conditions:\n" "- Temperature?\n" "- Conditions? (Clear/Rain/Snow/Wind)\n" "- Impact on work?" ) elif text == "🦺 Safety": await update.message.reply_text( "🦺 Safety observation:\n" "- What did you observe?\n" "- Location?\n" "- Action taken?" ) else: # Regular text report report = { "type": "text", "user_id": update.message.from_user.id, "username": update.message.from_user.username, "text": text, "timestamp": update.message.date.isoformat() } await update.message.reply_text("✅ Report logged!") def main(): """Start the bot""" app = Application.builder().token(TOKEN).build() app.add_handler(CommandHandler("start", start)) app.add_handler(MessageHandler(filters.PHOTO, handle_photo)) app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_text)) print("Bot started...") app.run_polling() if __name__ == "__main__": main()
pythondef generate_daily_report(project_id: str, date: str) -> str: """Aggregate all Telegram reports into daily summary""" # Fetch all reports for the day reports = db.query(""" SELECT * FROM telegram_reports WHERE project_id = ? AND DATE(timestamp) = ? ORDER BY timestamp """, [project_id, date]) # Group by type photos = [r for r in reports if r['type'] == 'photo'] issues = [r for r in reports if r['type'] == 'issue'] progress = [r for r in reports if r['type'] == 'progress'] # Generate summary with LLM summary = llm.summarize(f""" Daily reports for {date}: Photos submitted: {len(photos)} Issues reported: {len(issues)} Progress updates: {len(progress)} Details: {json.dumps(reports, indent=2)} Generate a concise daily report summary. """) return summary
python# Track messages in project groups async def handle_group_message(update: Update, context: ContextTypes.DEFAULT_TYPE): """Log important messages from project groups""" # Only log messages with keywords keywords = ["delay", "issue", "problem", "complete", "delivered", "inspection"] text = update.message.text.lower() if any(kw in text for kw in keywords): log_message({ "group_id": update.message.chat.id, "group_name": update.message.chat.title, "user": update.message.from_user.username, "text": update.message.text, "timestamp": update.message.date.isoformat() })
bashpip install python-telegram-bot requests
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | 9,773 | 7,722 | -21% | 1 | 1 | 0% | 1,608 | 3,596 | +124% | 0 | 0 | — |
case-01 | fail→fail | 15,613 | 15,810 | +1% | 1 | 1 | 0% | 3,138 | 5,380 | +71% | 0 | 0 | — |
case-02 | pass→pass | 6,696 | 5,186 | -23% | 1 | 1 | 0% | 1,241 | 3,232 | +160% | 0 | 0 | — |
case-03 | pass→pass | 2,817 | 3,430 | +22% | 1 | 1 | 0% | 465 | 2,914 | +527% | 0 | 0 | — |
case-04 | pass→pass | 3,775 | 3,980 | +5% | 1 | 1 | 0% | 610 | 3,020 | +395% | 0 | 0 | — |
case-05 | pass→pass | 11,560 | 13,766 | +19% | 1 | 1 | 0% | 2,263 | 4,850 | +114% | 0 | 0 | — |
case-06 | fail→pass | 8,047 | 2,231 | -72% | 1 | 1 | 0% | 1,475 | 2,709 | +84% | 0 | 0 | — |
case-12 | fail→fail | 26,145 | 12,991 | -50% | 1 | 1 | 0% | 1,073 | 5,001 | +366% | 0 | 0 | — |
case-07 | pass→pass | 9,175 | 5,018 | -45% | 1 | 1 | 0% | 1,612 | 3,170 | +97% | 0 | 0 | — |
case-08 | fail→pass | 12,735 | 13,597 | +7% | 1 | 1 | 0% | 2,554 | 5,012 | +96% | 0 | 0 | — |
case-09 | fail→fail | 6,843 | 5,945 | -13% | 1 | 1 | 0% | 1,234 | 3,383 | +174% | 0 | 0 | — |
case-10 | pass→pass | 9,002 | 5,312 | -41% | 1 | 1 | 0% | 1,612 | 3,244 | +101% | 0 | 0 | — |
case-11 | pass→pass | 7,058 | 6,042 | -14% | 1 | 1 | 0% | 1,346 | 3,472 | +158% | 0 | 0 | — |
case-14 | pass→pass | 6,534 | 3,601 | -45% | 1 | 1 | 0% | 1,039 | 2,904 | +179% | 0 | 0 | — |
case-15 | fail→fail | 17,192 | 6,373 | -63% | 1 | 1 | 0% | 1,836 | 3,548 | +93% | 0 | 0 | — |
case-16 | pass→fail | 8,035 | 5,391 | -33% | 1 | 1 | 0% | 1,438 | 3,244 | +126% | 0 | 0 | — |
case-17 | pass→pass | 11,393 | 13,412 | +18% | 1 | 1 | 0% | 1,834 | 4,701 | +156% | 0 | 0 | — |
case-18 | pass→pass | 11,761 | 9,885 | -16% | 1 | 1 | 0% | 1,920 | 3,997 | +108% | 0 | 0 | — |
case-19 | pass→fail | 13,322 | 9,424 | -29% | 1 | 1 | 0% | 2,146 | 3,873 | +80% | 0 | 0 | — |
case-20 | fail→pass | 14,163 | 12,591 | -11% | 1 | 1 | 0% | 2,243 | 4,578 | +104% | 0 | 0 | — |
case-21 | fail→pass | 8,591 | 3,059 | -64% | 1 | 1 | 0% | 1,649 | 2,944 | +79% | 0 | 0 | — |
case-22 | pass→pass | 4,914 | 3,171 | -35% | 1 | 1 | 0% | 801 | 2,865 | +258% | 0 | 0 | — |
case-23 | pass→pass | 11,363 | 11,162 | -2% | 1 | 1 | 0% | 2,041 | 4,444 | +118% | 0 | 0 | — |
case-24 | fail→fail | 17,755 | 18,767 | +6% | 1 | 1 | 0% | 3,965 | 6,881 | +74% | 0 | 0 | — |
case-25 | pass→pass | 13,970 | 11,885 | -15% | 1 | 1 | 0% | 2,807 | 4,567 | +63% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted, and 24 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +12 percentage points is the difference between those two pass rates over the 24 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.