Playwright Automation Platform
Replacing brittle, costly Power Automate Desktop RPA bots with headless Playwright automations on a proper queue + Kubernetes infrastructure — €30k/year saved and 3× faster automation development.
Stack
Playwright Automation Platform
RPA, rebuilt as code: cheaper, faster, observable, and AI-native.
What it is
A plugin-based bot-execution platform for an automotive dealer group. It scrapes and syncs data across ~17 insurance, claims, and lead-management systems, then pushes deduplicated leads into the group’s CRM. Triggers arrive via webhook, cron, or manual dashboard action; each job runs as an isolated, observable Kubernetes job.
The challenge
The legacy automations were built in Microsoft Power Automate Desktop — GUI-driven bots piloting a visible Chrome window (and tools like FileZilla) via screen-coordinate and image matching, running on Windows desktops. This was brittle (broke on any UI shift), expensive to license and host per machine, hard to scale or observe, and slow to develop and change.
What we built
- Headless Playwright automations on Patchright (anti-detection fork), TypeScript-strict with Zod as the single source of truth for every input/output
- A real job pipeline: webhook / cron → Redis + BullMQ (priorities, rate limiting, retries with backoff, dead-letter queue, per-bot concurrency) → k3s Kubernetes Jobs (resource limits, timeouts, auto-cleanup, isolation)
- Zero-touch bot registration: drop a folder with a manifest + code extending a shared SDK — no core changes needed to ship a new bot
- Full observability: a NestJS + Next.js dashboard with live logs, run timelines, screenshots, and traces stored in S3
- AI-native by design: conventions and a template bot are built so an AI agent can generate a new bot from a template, push it, and have it deployable
Results / impact
- ~€30,000/year reduction in infrastructure cost
- ~3× faster automation development
- Bots moved off brittle Windows/PAD desktops onto isolated, observable, horizontally-scalable Kubernetes jobs
- New bots ship by copying a template with no core changes; local dev loop cut from a multi-minute rebuild to ~2-3 seconds
Stack
Node.js 22 · TypeScript (strict, ESM) · Patchright/Playwright · Zod · Fastify (webhooks) · NestJS + Prisma (dashboard API) · Next.js + React + Tailwind (UI) · Redis + BullMQ · PostgreSQL · k3s (Kubernetes) with Traefik + Let’s Encrypt · Docker multi-stage builds · DigitalOcean Spaces (S3) · Bright Data proxy · SOPS-encrypted secrets.
Status: Live in production, with an ongoing migration of the remaining Power Automate Desktop flows.