// CASE STUDY
PRE-CALL BRIEF
GENERATOR
An AI-powered prospect intelligence pipeline that automates pre-call research for marketing agency sales teams.
- Python 3.12
- FastAPI
- Next.js 14
- Tailwind CSS
- shadcn/ui
- Framer Motion
- Google Gemini API
- Playwright
- Celery
- Redis
- PostgreSQL
- Supabase
- Docker
- Railway
// THE PROBLEM
LOSTINRESEARCH.
Before an inbound discovery call, marketing agency sales reps typically spend 20-40 minutes manually researching a prospect. They dig through the company's website, LinkedIn profile, and active ads to understand their positioning. In reality, this research often gets skipped due to time constraints, resulting in generic discovery calls and lost deals.
The primary technical challenge was building a highly reliable asynchronous pipeline capable of scraping unstructured data from disparate sources, making sense of it without AI hallucinations, and delivering the final brief, all within a 60-180 second window. Furthermore, the initial version was architected to be completely free-tier optimized for sales demos, requiring graceful degradation when facing rate limits.
“Given just a prospect's website URL, the system orchestrates a complex data collection and AI analysis pipeline to deliver a structured, actionable intelligence brief straight to the sales rep's inbox.”
// PIPELINE FLOW
SIX STAGES.ONE MINUTE.
The backend is driven by Python, FastAPI, and Celery, executing an asynchronous workflow to gather, analyze, and synthesize prospect data.
Intake
A sleek Next.js frontend (or CRM webhook) submits the prospect URL. A background job is immediately enqueued via Redis.
- Next.js
- Webhook
- Redis Queue
Parallel Data Collection
Seven tasks run concurrently: scraping website & LinkedIn via Playwright, querying Meta Ad Library, Google PageSpeed Insights, and detecting tech stack via custom regex.
- Playwright
- Meta Graph API
- Asyncio
Structured AI Analysis
Raw unstructured data is passed to Google Gemini 2.5 Flash, which extracts a structured company profile and analyzes their marketing posture.
- Gemini 2.5 Flash
- Data Extraction
AI Synthesis & Delivery
Gemini 2.5 Pro writes the final brief (openers, pricing anchors, red flags). It is rendered into a branded PDF via WeasyPrint, uploaded to Supabase, and emailed via Resend.
- Gemini 2.5 Pro
- WeasyPrint
- Resend
// KEY FEATURES
ENGINEERINGDECISIONS.
Building a reliable data collection pipeline that won't fail when third-party services block scraping attempts requires defensive engineering.
Graceful Degradation
The async collection steps (asyncio.gather with return_exceptions=True) ensure that if LinkedIn blocks a scraping attempt, the pipeline continues smoothly and honestly reports the data gap in the final brief.
- Asyncio
- Fault Tolerance
- Data Gaps Handling
Real-Time UI Tracker
The Next.js frontend polls the backend using TanStack Query to display a live, step-by-step progress tracker as the AI pipeline works, ensuring users aren't left staring at a static loading spinner.
- TanStack Query
- Live Polling
- UX
Scalable Architecture
The free-tier data providers (like DIY regex scanning and Playwright) are abstracted behind unified client interfaces, making it trivial to swap them out for enterprise APIs without touching the core orchestration logic.
- Abstracted Interfaces
- Modular Architecture
// THE IMPACT
RESULTS.
- Automated the most tedious phase of the sales process, allowing teams to focus on selling rather than researching
- Sales teams walk into every discovery call fully prepared with deep context and tailored talking points
- Guaranteed 100% preparation consistency across all reps, driving higher close rates
// LET'S TALK
WANT TO BUILDAI PIPELINES?
We scope everything in detail before payment is taken. You work directly with a senior engineer, not a project manager relaying messages to an offshore team.