Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Malware / Trojaner / VirenAI Agents Are Becoming a New Malware Distribution Channel(23.09.2026 um 09:44 Uhr)
Sichere ProgrammierungBuilding In-Browser Private Tools: When the Server Is the Liability(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungYour Order Fulfillment Workflow Is One 24-Hour Wait Away From Chaos(23.09.2026 um 08:54 Uhr)
Sichere Programmierungflet media library(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungRunning Lightdash on Snowpark Container Services(23.09.2026 um 08:55 Uhr)
Sichere ProgrammierungThe Impossible Filter Gallery Transition in CSS Only(23.09.2026 um 08:59 Uhr)
Sichere ProgrammierungVerifiable Data > Claimed Data: What i'm Trying to do with Ori's List(23.09.2026 um 09:08 Uhr)
Malware / Trojaner / VirenAI Agents Are Becoming a New Malware Distribution Channel(23.09.2026 um 09:44 Uhr)
Sichere ProgrammierungBuilding In-Browser Private Tools: When the Server Is the Liability(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungYour Order Fulfillment Workflow Is One 24-Hour Wait Away From Chaos(23.09.2026 um 08:54 Uhr)
Sichere Programmierungflet media library(23.09.2026 um 08:54 Uhr)
Sichere ProgrammierungRunning Lightdash on Snowpark Container Services(23.09.2026 um 08:55 Uhr)
Sichere ProgrammierungThe Impossible Filter Gallery Transition in CSS Only(23.09.2026 um 08:59 Uhr)
Sichere ProgrammierungVerifiable Data > Claimed Data: What i'm Trying to do with Ori's List(23.09.2026 um 09:08 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How to Build a Telegram Bot in 30 Minutes (That Actually Does Something Useful)

Most Telegram bot tutorials end with "Hello World." Useless. Here's a bot that actually earns its existence: a booking assistant for a service business. Customer messages, bot checks your calendar, offers available slots, confirms the…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

Most Telegram bot tutorials end with "Hello World." Useless.



Here's a bot that actually earns its existence: a booking assistant for a service business. Customer messages, bot checks your calendar, offers available slots, confirms the booking. No human needed.



I built this for a hair salon owner. She went from missing 30% of booking requests (they came in at night) to capturing 100%.



Let's build it.






What You Need




  • Python installed (3.9+)

  • A Telegram account

  • 30 minutes

  • Google Calendar (optional, for real bookings)






Step 1: Create Your Bot (2 minutes)




  1. Open Telegram, search for @botfather

  2. Send /newbot

  3. Pick a name: "Sarah's Salon Booking"

  4. Pick a username: sarahs_salon_bot

  5. Copy the API token. Guard it.



That's it. Your bot exists.






Step 2: Basic Code (5 minutes)






from telegram import Update
from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes

TOKEN = "your-token-here"

async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text(
"Hey! I'm Sarah's booking assistant.\n\n"
"Send me a message like 'I want a haircut on Friday' "
"and I'll check what's available."
)

async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
text = update.message.text.lower()

# Simple keyword detection
if any(word in text for word in ['book', 'appointment', 'schedule', 'haircut']):
await update.message.reply_text(
"I can help with that!\n\n"
"Available slots this week:\n"
"- Tuesday 2pm\n"
"- Wednesday 10am, 3pm\n"
"- Friday 11am, 4pm\n\n"
"Which works for you?"
)
else:
await update.message.reply_text(
"I'm a booking bot — ask me about scheduling an appointment!"
)

app = Application.builder().token(TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
app.run_polling()






Run this. Send your bot a message. It responds.






Step 3: Add Real Availability (10 minutes)



The static list is a placeholder. Let's connect Google Calendar.




from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timedelta

def get_available_slots():
# Load your calendar credentials
creds = Credentials.from_authorized_user_file('token.json')
service = build('calendar', 'v3', credentials=creds)

# Get events for next 7 days
now = datetime.utcnow()
end = now + timedelta(days=7)

events = service.events().list(
calendarId='primary',
timeMin=now.isoformat() + 'Z',
timeMax=end.isoformat() + 'Z',
singleEvents=True,
orderBy='startTime'
).execute()

# Find gaps (simplified — you'd want proper slot logic)
busy_times = [e['start']['dateTime'] for e in events.get('items', [])]

# Return available 1-hour slots
# (Real implementation would be more sophisticated)
return calculate_free_slots(busy_times)






Now your bot shows real availability.






Step 4: Confirm Bookings (10 minutes)



When someone picks a slot, create the calendar event:




async def confirm_booking(update: Update, slot: str, customer_name: str):
# Create calendar event
event = {
'summary': f'Haircut - {customer_name}',
'start': {'dateTime': slot, 'timeZone': 'America/Chicago'},
'end': {'dateTime': slot_plus_one_hour, 'timeZone': 'America/Chicago'},
}

service.events().insert(calendarId='primary', body=event).execute()

await update.message.reply_text(
f"You're booked for {slot}!\n\n"
f"See you then. Reply 'cancel' if plans change."
)

# Notify the business owner
await context.bot.send_message(
chat_id=OWNER_CHAT_ID,
text=f"New booking: {customer_name} at {slot}"
)









Step 5: Handle Edge Cases (3 minutes)



People will try to book impossible times:




async def handle_booking_request(update, requested_time):
available = get_available_slots()

if requested_time in available:
await confirm_booking(update, requested_time)
elif len(available) > 0:
await update.message.reply_text(
f"That slot's taken. How about:\n" +
"\n".join(available[:3])
)
else:
await update.message.reply_text(
"Fully booked this week! Want me to notify you "
"when a slot opens?"
)









The Result



30 minutes of work. The salon owner now:




  • Never misses a booking request

  • Gets notified of new bookings instantly

  • Has customers book at 2am without waking up

  • Reduced no-shows (bot sends reminders)



The bot handles 40+ booking conversations weekly. That's 10+ hours saved.






Want to Go Further?



This is just the basics. You can add:




  • Payment collection (Stripe integration)

  • Rescheduling and cancellation handling

  • Multi-language support

  • Service selection (haircut vs coloring vs styling)

  • Wait-list management



I cover all of this — with working code — in AI Automation Blueprint 2026. Including the part where we add AI to make the bot actually understand natural language instead of keyword matching.



$29 for the complete system. Build it this weekend.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Build a Telegram Bot in 30 Minutes (That Actually Does Something Useful)

Thematisch verwandte Begriffe: Build, Telegram, Minutes, That · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-96258 | A vulnerability has been found in onSite internet GmbH Auktion NG Auktio…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick