Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WA Scheduler — Free WhatsApp Booking Bot

Free Calendly alternative built on WhatsApp + Google Calendar. Built with FastAPI + Twilio + Google Calendar API.



Project Home


Project Home


Project Home


Project Home


Project Home

Architecture

Customer WhatsApp
       │
       ▼
   Twilio API
       │  POST /webhook/{host_slug}
       ▼
   FastAPI App
       │
       ├─► Conversation State Machine
       │       (IDLE → NAME → SERVICE → DATE → SLOT → CONFIRM → DONE)
       │
       ├─► Google Calendar API
       │       (check free slots, create/cancel events)
       │
       └─► SQLite DB
               (hosts, bookings, sessions)

Setup — 30 Minutes to Live

1. Clone & install

git clone https://github.com/you/wa-scheduler
cd wa-scheduler
pip install -r requirements.txt
cp .env.example .env

2. Twilio WhatsApp Sandbox (FREE to start)

  1. Sign up at https://twilio.com
  2. Go to Messaging → Try it out → Send a WhatsApp message
  3. Note your sandbox number (e.g., +14155238886)
  4. Set webhook URL to: https://YOUR_URL/webhook/YOUR_SLUG

3. Google Calendar OAuth

  1. Go to https://console.cloud.google.com
  2. Create project → Enable Google Calendar API
  3. Create OAuth 2.0 Client ID (Web application)
  4. Add redirect URI: https://YOUR_URL/auth/google/YOUR_SLUG/callback
  5. Download JSON → save as client_secrets.json

4. Configure .env

TWILIO_ACCOUNT_SID=ACxxx
TWILIO_AUTH_TOKEN=xxx
GOOGLE_CLIENT_SECRETS_FILE=./client_secrets.json
BASE_URL=https://your-public-url.com
ADMIN_KEY=your-secret-key

5. Start server

python start.py

6. Register your first business

curl -X POST http://localhost:8000/dashboard/register \
  -H "x-api-key: your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "dr-sharma",
    "business_name": "Dr. Sharma Clinic",
    "owner_phone": "+919876543210",
    "location": "123 MG Road, Pune",
    "services": [
      {"name": "Consultation", "duration_mins": 30, "price": 500},
      {"name": "Follow-up",    "duration_mins": 15, "price": 200}
    ],
    "working_days": [0,1,2,3,4,5],
    "working_hours": {"start": "09:00", "end": "18:00"}
  }'

7. Connect Google Calendar (one-time per business)

Visit: https://YOUR_URL/auth/google/dr-sharma Business owner clicks "Allow" → calendar connected.


Customer Flow (WhatsApp conversation)

Customer:  "Hi"
Bot:       "Welcome to Dr. Sharma Clinic! What's your name?"

Customer:  "Ravi Kumar"
Bot:       "Great, Ravi! Choose a service:
            1. Consultation (30 min) — ₹500
            2. Follow-up (15 min) — ₹200"

Customer:  "1"
Bot:       "Choose a date:
            1. Monday, 21 April (Today)
            2. Tuesday, 22 April
            3. Wednesday, 23 April ..."

Customer:  "2"
Bot:       "Available slots on Tuesday, 22 April:
            1. 9:00 AM  2. 10:00 AM  3. 2:00 PM ..."

Customer:  "3"
Bot:       "Booking Summary:
            Name: Ravi Kumar | Service: Consultation
            Date: Tuesday, 22 April | Time: 2:00 PM
            Reply YES to confirm."

Customer:  "YES"
Bot:       "✅ Booking Confirmed! See you Tuesday at 2 PM.
            Type 'cancel' to cancel, 'reschedule' to change."

Deployment — Free Tier

Service Free Tier Use For
Railway.app 500 hrs/mo FastAPI server
Twilio Sandbox Free for testing WhatsApp gateway
Twilio Paid $1/mo + $0.005/msg Production WhatsApp
SQLite (local) Free forever <10k bookings
Supabase Postgres 500MB free Scale up

Monthly cost for 100 active users: ~₹200–400 (Twilio messages only)

Deploy to Railway

# Install Railway CLI
npm install -g @railway/cli
railway login
railway init
railway up
railway domain  # get your public URL

Add environment variables in Railway dashboard.


API Reference

Endpoint Method Description
/webhook/{slug} POST Twilio WhatsApp webhook
/auth/google/{slug} GET Start Google OAuth
/dashboard/register POST Register new business
/dashboard/{slug}/bookings GET View bookings
/dashboard/{slug}/stats GET Booking stats
/docs GET Swagger UI

Business Model — How to Monetize

Free tier:     1 business, 50 bookings/mo     → ₹0
Starter:       3 businesses, unlimited         → ₹299/mo
Pro:           Unlimited + analytics           → ₹999/mo
White label:   Custom domain + branding        → ₹2999/mo

Comparable: Calendly charges $8–16/user/month = ₹700–1400/mo Your pricing at 1/5th of Calendly with WhatsApp-first = massive India advantage.

Target customers:

  • Doctors & clinics (no-show reduction alone = sold)
  • Tutors & coaching centers
  • Salons & beauty parlors
  • Consultants & lawyers
  • Any business taking appointments on WhatsApp today (manual process)

Roadmap

  • Reminder messages (24hr + 1hr before)
  • Cancellation waitlist (notify next person)
  • Recurring appointments
  • Payments via Razorpay/UPI before confirmation
  • Hindi/Marathi language mode
  • Web dashboard for business owners
  • SMS fallback for non-WhatsApp users

About

Free Calendly alternative built on WhatsApp + Google Calendar. Built with FastAPI + Twilio + Google Calendar API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages