← Portfolio Case Study

Lead Generator — AI pipeline for buying-signal detection

Klient: Internal project / sales tool Czas: 1 day
Python Claude AI Haiku Sonnet Jinja2 HTTP API

Before

  • Manual scanning — hours per 100 postings
  • No systematic approach to lead qualification
  • Cold outreach with zero personalization
  • Most postings are noise, not signal

After

  • 100 postings analyzed in ~2 minutes
  • 70% rejected automatically, 21 qualified leads
  • Personalized OLX messages and cold emails drafted
  • Cost: < $0.30 per 100-posting run
Lead Generator — 3-phase AI pipeline turning job postings into qualified leads with drafted outreach.

Starting point

As an IT fixer I help companies with broken systems, automation needs, or a search for a senior rather than yet another junior developer. The problem: how do I find those companies before they find me? A contact form and LinkedIn are not enough — I need to actively hunt for buying signals.

It turns out the strongest buying signal is hiding in plain sight. A job posting is a public declaration: "I have a problem that costs me a salary + payroll tax + onboarding every month." A company hiring someone for manual data entry into an ERP may not even know that problem is solvable with automation for a fraction of the cost of a full-time hire.

Problem

Scanning postings by hand doesn’t scale. 100 listings on OLX is a few hours of reading, of which 70% is obvious noise (interns, restaurants, medical offices). The remaining 30% need deep analysis: does this company have an IT problem? Can the role be automated? Who is the decision maker? How do I write a message that doesn’t read like spam?

  • Scale: by hand — max 20 postings a day with analysis. Not enough.
  • Quality: fatigue after 30 minutes drops assessment accuracy.
  • Contact: postings land in HR inboxes, and I need to reach the owner/CTO.

Solution

A 3-phase pipeline in Python. Each phase does exactly one thing and does it well.

Phase 1: Fast rule-based filter

Pure rules, no API calls, milliseconds. Eliminates postings that are definitely not triggers: pure HR, accounting, food service, medicine, internships. At the same time it scores keywords that signal potential: automation (+3), AI (+3), e-commerce (+2), ERP/CRM (+1), "data entry" (+2), "sales portals" (+2).

Effect: out of 100 listings, 70 drop out immediately. 30 move on to AI analysis. ~70% savings on API costs.

Phase 2: AI analysis (Claude Haiku)

Filtered postings go to the Claude API in batches of 5. For each posting the AI scores:

  • Automation potential (1–10): how much of the role can be automated
  • Trigger score (1–10): strength of the buying signal
  • Company pain: hypothesis about the company’s problem
  • Decision maker: who calls the shot (CEO, CTO, owner)
  • Pitch angle: the angle to sell the service from

The core question the AI asks: "Can what this company wants to outsource to a human be automated?" If yes — that’s a strong trigger for an automation service.

Phase 3: Outreach strategy (Claude Sonnet)

For leads with trigger score ≥ 6, the AI generates a ready strategy: a personalized hook referencing the posting, a drafted OLX message (3–5 sentences), a cold email draft, and a suggestion of who to search for on LinkedIn. Every message opens with a concrete problem of the company — not "Hi, I offer services…".

Output — HTML report

The pipeline produces an interactive report with a lead ranking, AI analysis, and ready-to-send message drafts. Preview with sample data:

Screenshot of the Lead Generator report — lead ranking with trigger score, automation potential, and drafted messages

Examples from real data

A food-industry company hiring an "office worker for handling orders, invoicing and stock control". They have an ERP system. AI score: Trigger 8/10, Automation 8/10. Pitch: "Don’t hire — automate invoicing and order management instead."

A lending company hiring a "document verification and processing specialist" — entering contract data into the CRM, archiving, deadline tracking. AI score: Trigger 8/10, Automation 9/10. Pitch: "OCR + RPA handles 80% of this — no mistakes, 24/7."

An e-commerce company hiring someone to "handle sales portals" — manual listings on Allegro, price updates, stock control. AI score: Trigger 8/10, Automation 7/10. Pitch: "This automates over a weekend. API integration instead of headcount."

Architecture

Intentionally minimalist. No frameworks, no databases. Plain Python + HTTP to the Claude API + Jinja2 for the HTML report.

  • claude_client.py: thin HTTP client (httpx) — 60 lines of code instead of the SDK.
  • phase1_prefilter.py: rule-based filter with dataclasses. Easy to add new rules.
  • phase2_ai_analysis.py: batch processing, structured JSON output from Claude.
  • phase3_strategy.py: copywriting generation — Sonnet for message quality.
  • pipeline.py: orchestrator + HTML report with dark UI, sorting, filters.

Run modes: --prefilter-only (no API, free), --strategy-only (skips analysis, takes results from cache).

Economics

Haiku analysis of 30 postings: ~$0.05. Sonnet strategy for 21 leads: ~$0.20. Total: under $0.30 for a full run over 100 postings. For comparison — an hour of manual analysis costs many times more, and quality drops after 30 minutes.

Result

The system processes 100 postings in ~2 minutes. Output: 21 qualified leads with ready, personalized messages. Every message references a concrete posting and a concrete company problem.

The core insight: companies hiring people for repetitive work usually don’t know the alternative exists. Nobody told them. A job posting isn’t cold outreach — it’s an answer to a question the company just asked publicly.

Takeaways

Buying signals are everywhere — you just need to know where to look. Job postings are one of the best sources because the company is literally saying: "I have a problem worth ~7,000 PLN/month." AI lets you process those signals at a scale that would be impossible by hand.

The pipeline is generic — swap the profile in profil.txt and the pre-filter rules to hunt leads for any niche. The whole thing was built in 1 day.

Have a similar problem?

Describe it to AI — it gathers technical context, Artur delivers a quote in 48h.

Start diagnostics