← Index Case Study · N° 05 Sales intelligence

Sincapsoft Lead Agent

A regional lead-generation engine that scrapes local businesses, scores each on how much it needs the service, and runs the best through a CRM — enriched with website audits, Instagram signals and AI-read reviews.
ProductSincapsoft (internal)
RoleFull-stack & data
StatusLive · 253 leads
StackNext.js · Supabase · n8n

01 — The brief

Sincapsoft Lead Agent finds and qualifies local businesses as sales leads. You give it a city, a district and a sector — say, restaurants in Karatay, Konya — and it returns a scored, ranked list of prospects, each enriched with how good its website is, how active it is on Instagram, and what its reviews say. It exists to answer one question at scale: which businesses most need what we sell, and are easiest to win?

The interesting part is turning a scrape into a decision. Raw business listings are noisy and uneven; the job is to enrich them from several sources, score them consistently, and rank them so a salesperson opens the right one first.

02 — Approach

The system is a Next.js command-center over a Supabase database and a set of n8n workflows. The panel is where you configure and watch; the heavy lifting — scraping Google Maps via Outscraper, auditing sites with PageSpeed, pulling Instagram and reviews through Apify, and reading those reviews with Claude — runs in n8n and writes back to Postgres. The panel proxies the workflow triggers and reads n8n’s execution API to show phase-by-phase progress, with a live cost and time estimate before you ever press go.

Scoring is a Pain/Fit/Opportunity model with per-sector weights, and it exists in two places that must never disagree — the n8n scoring node and a TypeScript port in the panel that can re-score existing leads without re-scraping. To keep scores fair across regions, each sector carries geo-benchmarks maintained with Welford’s online algorithm, so every new lead updates the district’s running mean and variance incrementally, with a district → province → country fallback when data is thin.

  • Panel Next.js 16 · React 19 · Supabase (SSR) · Cloudflare Workers
  • Pipeline n8n Cloud — 4 workflows: scrape · score · enrich · reviews
  • Sources Outscraper (Maps) · Google PageSpeed · Apify (Instagram, reviews)
  • AI Claude Haiku reads scraped reviews into structured insights
  • Scoring Pain/Fit/Opportunity · per-sector weights · geo-benchmarks (Welford)
  • CRM 10-stage pipeline · drag-and-drop · sales-angle tagging

None of this was free. Each choice bought something and charged for it somewhere else — the work was in choosing where to pay.

  1. Trade-off 01

    n8n pipeline over code in the app

    Running scrape-enrich-score in n8n workflows makes each step visible, retryable and cheap to rewire, and keeps slow third-party calls out of the web app. The cost is a second system to operate and a scoring formula that now lives in two places — solved by a versioned TypeScript port that stays in step with the workflow.

  2. Trade-off 02

    Scoring parity over a single source

    The panel can re-score existing leads instantly without paying to scrape them again, which needs its own copy of the formula. Keeping that copy identical to the n8n node — same version stamp, same result — is the price of instant recalculation.

  3. Trade-off 03

    Welford benchmarks over batch recomputation

    Maintaining each sector’s mean and variance with an online algorithm means a new lead updates the benchmark in place, with no nightly recompute over the whole table. The cost is carrying the running-statistics state and getting the incremental math exactly right.

  4. Trade-off 04

    Cloudflare Workers over a Node host

    Deploying the Next.js panel to Workers via OpenNext keeps it on the edge and cheap, but it rules out Node built-ins and loose typing. The cost is a stricter runtime the whole panel has to respect.

A scrape is only noise until it’s scored the same way, every time.

03 — Results

The backend — Supabase plus four n8n workflows — is live, with a production database of over two hundred and fifty real, scored leads and a Turkey-wide reference of eighty-one provinces and nearly a thousand districts. From the panel you can trigger a regional scrape, watch it run with a live cost estimate, tune the scoring weights and re-rank existing leads, and move winners through a ten-stage pipeline.

253
Real, scored leads in the production database
81
Provinces (and ~972 districts) seeded for geo-scoring
4
n8n workflows: scrape, score, enrich, reviews

04 — What’s next

The qualification engine is live; the growth edge is the far end of the funnel — wiring up the outreach workflow that turns a scored lead into a first contact, and widening enrichment and sector coverage.