30-Minute Process Rebuilt to Run in 5 Minutes — Disaster-Proof System for the #1 Law Firm Marketplace
The Law Practice Exchange's core AI-powered valuation product was built on a deprecated API, took 30+ minutes to run, and failed frequently. With an API shutdown 4 months away, we rebuilt the entire system: parallel processing, vector stores, background execution, and a new API. Now runs in 5–6 minutes with near-zero failures.
Quick Overview
The Challenge
A Mission-Critical System About to Break Entirely
Google Apps Script has a 30-minute maximum execution time. The valuation workflow was hitting that limit regularly, producing incomplete results that had to be manually fixed before sending to paying clients. If the user closed their browser tab at any point during the 30-minute wait, the entire process failed and had to restart.
Worse: the OpenAI Assistants API was scheduled for deprecation in August 2024 — four months away at the time of engagement. Without a rebuild, the entire system would stop working.
The AI was also making errors. Without sufficient context — no vector stores, limited knowledge base access — the AI was generating recommendations that required significant manual correction. Clients were receiving deliverables with AI mistakes in them.
Key Pain Points:
- 30-minute execution time, frequently hitting the Apps Script timeout limit
- User had to keep browser tab open for 30+ minutes — tab closed = process failed and restarted
- Sequential workflow — one failure broke everything downstream
- OpenAI Assistants API deprecation in 4 months — complete system failure imminent
- AI making errors in paid client deliverables — manual correction required
The Solution
Complete Rebuild — Not a Patch Job
The backend moved from Google Apps Script to n8n — no execution limits, no browser dependency, proper parallel processing. The OpenAI Assistants API was replaced with the OpenAI Responses API and vector stores, loading the AI with deep context: historical valuation data, law firm M&A benchmarks, market intelligence, and best practices.
The workflow architecture moved from sequential (one step at a time, fragile if anything breaks) to parallel (independent sub-processes running simultaneously). Steps that don't depend on each other — pulling financial data, pulling client data, running market analysis — now run at the same time.
Execution is now webhook-based. The user clicks a button, the process fires in the background, and they receive a notification when it's complete. They can close the tab immediately.
How It Works:
- User initiates valuation — webhook fires immediately
- Process runs in background on n8n (no browser tab required)
- Independent sub-processes run in parallel simultaneously
- AI agent queries vector stores for deep contextual knowledge
- All sub-processes complete → AI synthesises full valuation report
- User notified when complete — result available in 5–6 minutes
Implementation: Full rebuild
Technical Challenge: Migrating from sequential to parallel architecture required mapping every dependency in the existing workflow to identify what could safely run simultaneously. The vector store setup required curating and formatting a knowledge base from scratch — historical valuations, deal benchmarks, and market data all needed to be structured for retrieval.
The Results
83% Faster. Near-Zero Failures. System Saved.
| Metric | Before | After | Impact |
|---|---|---|---|
| Execution time | 30+ minutes | 5–6 minutes | 83% reduction |
| Failure rate | Frequent timeouts and errors | Near-zero failures | Reliable core product |
| User experience | Must keep tab open 30+ min | Background execution | Close tab immediately |
| API dependency | Deprecated API (4 months) | Stable, supported API | Disaster averted |
| AI output quality | Errors requiring manual fixes | Accurate with vector context | Better client deliverables |
The performance improvement was immediate: 30+ minutes became 5–6 minutes. Users who previously had to dedicate half an hour of active browser time to a valuation now fire it off and return when it's done. The AI quality improvement — from generic responses to vector store-informed analysis — reduced manual corrections on deliverables to near zero.
Hear From the Client
Frequently Asked Questions
Why rebuild rather than patch the existing system?
Patching an Apps Script + deprecated API system would have resolved individual symptoms without fixing the structural problems. Within months, new failures would have emerged. The rebuild addressed the foundation: execution environment, API stability, workflow architecture, and AI quality simultaneously.
How long did the rebuild take?
The rebuild was completed before the August 2024 API deprecation deadline. The parallel processing architecture and vector store setup were the most time-intensive components.
Download the Full Case Study
Get the complete PDF with detailed implementation notes, research citations, and ROI calculations.
Request Case Study PDFServices That Can Help Your Business
Explore the automation services we used to achieve these results
Personalised Outreach at Scale
Reach hundreds of ideal prospects with messages that read like they were written specifically for each one — their business, their situation, their language. At scale, automatically.
Explore service →Personalised Lead Response
Every lead receives a message that feels personally written for them — whether they come to you or you reach out to them. Their business, their situation, what they care about. Not a template. Not a generic reply.
Explore service →Instant Value Delivery
Before competitors have even replied, your lead has a custom quote, a personalised proposal, or a tailored document — built from what they told you, delivered automatically.
Explore service →