Skip to content

Tour operators and transport providers often struggle to notify customers about delays in scheduled pickups. This workflow automates WhatsApp updates by calculating estimated pickup times with a traffic route API and sending confirmation or delay messages accordingly.

License

Notifications You must be signed in to change notification settings

ahsan-141117/ETA-Notifier-for-Tourists---Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please credit Mohammad Ahsan Hummayoun when using, sharing, or adapting this code

This Python workflow automates communication between tour operators and their customers by providing real-time pickup updates through WhatsApp.
It solves the challenge of notifying customers about potential delays in advertised pickup times, ensuring smoother operations and better customer experience.

This solution is suitable for any tourism or transport business that relies on timely pickups — such as city tours, airport transfers, shuttle services, or excursion operators.

⚙️ How it Works

1. Booking & Driver Data
The workflow reads two CSV files:

  • bookings.csv containing customer details and pickup locations
  • drivers.csv containing driver details and their current positions

2. Route & ETA Calculation
Using the OpenRouteService API (ORS_API_KEY), the system calculates estimated pickup times based on driver locations, traffic, and route planning.

3. Delay Detection & Messaging
If the estimated pickup time differs from the scheduled time beyond a defined threshold, the workflow automatically determines whether to send a confirmation or delay message.

4. WhatsApp Notifications
Messages are sent to customers through the Twilio WhatsApp Sandbox using the credentials:

  • TWILIO_ACCOUNT_SID
  • TWILIO_AUTH_TOKEN
  • TWILIO_WHATSAPP_FROM

🚀 Setup and Requirements

  1. Environment File
    Create a .env file containing your API credentials:
    ORS_API_KEY=your_openrouteservice_api_key
    TWILIO_ACCOUNT_SID=your_twilio_account_sid
    TWILIO_AUTH_TOKEN=your_twilio_auth_token
    TWILIO_WHATSAPP_FROM=whatsapp:+14155238886
    

🚀 Setup and Requirements

  1. Environment File
    Create a .env file containing your API credentials:

    ORS_API_KEY=your_openrouteservice_api_key
    TWILIO_ACCOUNT_SID=your_twilio_account_sid
    TWILIO_AUTH_TOKEN=your_twilio_auth_token
    TWILIO_WHATSAPP_FROM=whatsapp:+14155238886
    
    
  2. CSV Files Prepare two CSV files in the project directory:

    bookings.csv — contains customer name, phone number, pickup location, and scheduled pickup time.

    drivers.csv — contains driver ID, current location, and vehicle details.

About

Tour operators and transport providers often struggle to notify customers about delays in scheduled pickups. This workflow automates WhatsApp updates by calculating estimated pickup times with a traffic route API and sending confirmation or delay messages accordingly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages