Skip to content
← all work

2026 · Author

TLScontact Visa RPA Monitor

Full-link browser automation that hunts for French Schengen visa slots and auto-books them.

Problem

Booking a French Schengen visa appointment on the TLScontact portal requires constantly watching for scarce, fast-disappearing slots, which is impractical to do manually. The script automates the full booking process so available slots matching user preferences are detected and booked without manual intervention.

Approach

  • Full-link RPA: a tick-driven state machine navigates the entire flow (login through calendar) and auto-books slots when they match user preferences, retrying clicks on async SPA elements until they succeed
  • Background 'insomnia' mode: a Web Worker heartbeat plus Web Audio API (AudioContext) initialization prevents OS/browser throttling when screens lock or tabs are backgrounded
  • Robust DOM parsing via the TreeWalker API (NodeFilter.SHOW_TEXT) to extract slot text while filtering out scripts and non-content nodes, instead of fragile text extraction
  • Telegram notifications with color-coded slot categories, configurable time/prime-slot preferences, persistent UI panel, and Cloudflare 'Error 1015' rate-limit detection with automatic halt

Architecture

  • Implemented as a Tampermonkey userscript (v5.8) running in Chrome/Edge on the JavaScript V8 engine
  • Targets the TLScontact portal, a Next.js/React single-page application
  • Uses Web Worker + postMessage(), Web Audio API/AudioContext, and TreeWalker for resilient background monitoring and parsing
  • Integrates the Telegram Bot API (configured via @BotFather token and @userinfobot chat ID) for notifications; detects Cloudflare WAF rate limiting

Impact

  • Supports 7x24 'Background Insomnia Mode' with ~1-second precision monitoring
  • State machine confirms consistency over 4 ticks (4 seconds) before acting
  • Detects and halts on Cloudflare 'Error 1015' rate limiting to avoid IP bans

Stack

JavaScriptTampermonkeyWeb WorkerWeb Audio APITreeWalker APITelegram Bot APINext.jsReactCloudflare WAF