Skip to content
Work

Business Process Automation

Driver Compliance Automation Platform

A production automation platform that runs an entire driver compliance process end to end — intake, payment, AI document review, and generated paperwork — with almost no manual steps.

n8nSupabasePostgreSQLStripeTwilioGmailSlackPlaywrightFly.ioREST APIs

Overview

Built a production-ready automation platform that manages an entire driver compliance process from intake to completion. The platform orchestrates multiple workflows, processes payments, analyzes uploaded documents with AI, automates browser tasks, generates compliance documents, monitors results, and sends notifications throughout the lifecycle.

Problem

Driver compliance was a manual, multi-step process spread across payment collection, document review, third-party portal entry, and paperwork generation — each handoff was a place for delay or error, and status was invisible until someone checked in on it.

Business Goal

Turn a case from intake to compliant status with minimal human intervention, while keeping every step auditable and recoverable if something fails partway through.

Architecture

System design

Nine interconnected n8n workflows orchestrate the full lifecycle: intake triggers a Stripe payment, uploaded documents are analyzed by an AI model for validity and data extraction, Playwright drives browser automation against a third-party portal where no API exists, and Supabase/PostgreSQL tracks case state throughout — with Twilio, Gmail, and Slack notifications firing at each milestone.

Challenges

What made this hard

The third-party compliance portal has no API, so the only way in is a browser.

Used Playwright to automate the portal directly, with explicit wait conditions and retry logic since the portal's own reliability, not just the automation, had to be accounted for.

Nine workflows means nine places a case can silently get stuck.

Every workflow writes state transitions to Postgres, and a dedicated monitoring flow polls for cases that haven't advanced within an expected window, escalating to Slack instead of failing silently.

Business Impact

What it changed

Replaced a complex manual compliance workflow with a fully automated pipeline capable of processing cases with minimal human intervention, from payment through to a completed compliance record.

Lessons Learned

  • Browser automation against a third-party UI is inherently more fragile than an API integration — building in retries and alerting from day one paid off repeatedly.
  • Splitting the pipeline into small, single-responsibility workflows made debugging any one stage far easier than one monolithic flow would have.

Future Improvements

  • Add a case-status dashboard for non-technical staff instead of relying on Slack alerts alone.
  • Explore a direct integration if the third-party portal ever exposes an API.