Dibya Sarothi
Dibya Sarothi
Automation & BotsProduction ReadySeptember 2026

Flight Deal Finder

Automated Flight Price Tracker & Twilio WhatsApp Alert Bot

Conserves SerpApi search quotas with SQLite response caching while tracking Google Flights deals and alerting via WhatsApp.

Flight Deal Finder overview
Project Overview

An automated flight price tracking and notification system in Python. Queries target destination cities and price ceilings from Google Sheets via Sheety, searches live round-trip fares using SerpApi's Google Flights engine, persists new record lows, and dispatches WhatsApp alerts through Twilio.

Problem Statement

Flight aggregator APIs carry strict monthly request limits, while repeatedly polling round-trip routes wastes quotas when routes haven't changed.

Engineering Rationale

Real-world automation must respect rate limits and third-party API costs—combining local SQLite caching with deterministic alert thresholds turns a pricey API workflow into an economical daemon.

Engineering Objectives

Synchronize city wishlists, IATA codes, and target prices from Google Sheets via Sheety API.
Cache SerpApi Google Flights responses with requests-cache (SQLite) to prevent redundant quota burn.
Inspect both best and alternate flight itineraries to extract true minimum round-trip pricing.
Update Google Sheet thresholds automatically and dispatch formatted WhatsApp messages via Twilio.
Architecture Blueprint

System Architecture

Modular OOP pipeline orchestrating DataManager (Sheety API), FlightSearch (SerpApi + requests-cache), FlightData (lowest-fare extraction), and NotificationManager (Twilio WhatsApp).

01

SQLite Request Caching

Uses requests-cache backed by local SQLite storage to eliminate duplicate SerpApi round-trip lookups while keeping Sheety reads live.

02

End-to-End Alerting Workflow

Automatically updates lowest recorded prices in Sheets and formats route dates, airports, and savings for instant Twilio WhatsApp delivery.

Core & Backend Implementation

  • DataManager wrapping authenticated Sheety REST reads and PUT price updates.
  • FlightSearch integrating SerpApi Google Flights engine with requests-cache quota conservation.
  • NotificationManager dispatching templated WhatsApp alerts through the Twilio Python SDK.

Client & Interface Layer

  • Google Sheets operator dashboard managed remotely via Sheety API.

Data & Schema Design

Engine / Tier: Google Sheets (Sheety API) & Local SQLite (requests-cache)

Decouples human-editable route targets from cached third-party flight API payloads.

Core Models & Entities
DestinationTargetFlightSearchCacheAlertMessage

Authentication & Security Controls

Auth Model: Environment-isolated API keys via .env (.env.example provided)
  • Zero committed credentials for SerpApi, Sheety Bearer tokens, or Twilio SIDs.

Engineering Challenges & Technical Decisions

Key Challenges Solved

Challenge: High per-query costs on multi-city round-trip flight APIs.
Engineering Solution: Introduced SQLite-backed requests-cache around SerpApi calls—earning direct code-quality recognition from FlightPowers founder Matan Rabi.

Trade-Off Decisions

Decision: Modular Manager Classes per External Service
Architectural Rationale: Keeps Sheety, SerpApi, and Twilio integrations independently swappable and testable.

Testing & Verification Methodology

Frameworks & Approach: Live API Dry Runs, Manual Deal Threshold Verification
  • Verified round-trip fare parsing across best_flights and other_flights arrays.
  • Confirmed cache hits bypass redundant external SerpApi billing.

Results & Engineering Takeaways

Designed cost-conscious automation around third-party rate limits and HTTP response caching.