Real Estate Industry / Technical Guide

Build a Fair-Housing-Compliant AI Lead Qualification System for Real Estate Step-by-Step Guide

A complete walkthrough for building an n8n + Claude workflow that ingests Zillow / Realtor.com / website / WhatsApp leads, extracts BANT signals, matches MLS inventory, and routes to the right agent in 18 seconds — without ever touching protected-class data.

13 min read
Intermediate-Advanced
n8n + Claude + RESO API
Updated May 2026
What You’ll Build

Lead source (Zillow / web / WhatsApp)

Claude — extract intent

MLS match (RESO API)

BANT score → A / B / C

Agent route (round-robin)

Auto-engage (drip + showings)

CRM sync (Follow Up Boss)

1. The Problem — Why Lead Response Time Decides Who Wins the Deal

The NAR’s own data is brutal: 35-50% of real estate leads go to the agent who responds first, and the first-five-minute response window converts 21x better than 30+ minutes. The average brokerage responds in 47 minutes. The math is not subtle.

Real numbers from a 22-agent residential brokerage

Inbound leads / month (peak season)~3,800
Median first-response time47 min
Leads contacted within 5 min11%
Tire-kicker rate (no budget / no timeline)58%
ISA (inside sales agent) salary spend$140K/yr

The brokerage was burning $140K/year on 1.5 ISAs to manually qualify leads — and they still missed the 5-minute window 89% of the time. Worse, ISAs trained on “sales scripts” routinely brushed against Fair Housing landmines without realizing it (asking “what kind of neighborhood are you looking for?” is a phrase the DOJ has specifically flagged in steering investigations).

What “qualification” means here

Qualification is not closing the deal. It’s a four-step funnel that ends with a warm handoff to a licensed agent:

  • Capture & respond in <60 sec — every channel, every hour, every time zone.
  • Extract intent without bias — budget, timeline, financing, must-haves. Never demographics, never neighborhood “feel”.
  • Score BANT & tier — A (showing-ready), B (nurture), C (long-horizon).
  • Route to the right human — geographic farm, specialty, current workload, license status.
Insight
The biggest competitive moat in real estate AI isn’t speed — it’s the Fair Housing guardrail layer. Lofty, Structurely, and most off-the-shelf tools score leads on signals that include implicit demographic proxies. Building this in-house with explicit refusal patterns is exactly what we deliver in our real estate AI automation service.

2. System Architecture

Six components, each replaceable. Built on self-hosted n8n so a brokerage’s broker-of-record can audit every byte that touches a consumer’s PII — a hard requirement under most state real estate licensing laws.

The stack

n8n (self-hosted)
Workflow orchestration. Docker on a small VM (2 vCPU / 4GB), US-East region.
Claude API
Haiku for intent extraction + BANT, Sonnet for nurture copy and conversation.
RESO Web API
MLS access via Trestle, Bridge Interactive, or MLS-Grid. OAuth2.
Postgres
Lead audit log, agent roster, TCPA consent ledger. 7-year retention.
CRM (Follow Up Boss / kvCORE)
Lead system of record. Bi-directional via REST.
Twilio + Calendly
TCPA-compliant SMS, showing scheduling, opt-out handling.

Cost estimate (4,000 leads/month)

Claude Haiku (4k extractions + scoring, ~800 tok in / 200 tok out)~$14
Claude Sonnet (1,800 nurture replies, ~1,400 tok in / 350 tok out)~$48
VM (n8n + Postgres, DigitalOcean)~$28
Twilio SMS + Calendly + monitoring~$110
RESO API access (varies — Trestle / Bridge)~$200
Total / month~$400

$400/month vs. $140K/year in ISA salary. The architecture pays for itself in the first 12 hours of operation.

1

Lead Source Aggregation

Real estate leads come from at least five sources, each with its own format, latency, and consent posture. The first job is a single normalized lead schema landing in n8n inside 60 seconds of the consumer hitting submit.

Source matrix

  • Zillow Premier Agent — webhook to n8n endpoint, JSON payload, signed with HMAC-SHA256 in X-Zillow-Signature.
  • Realtor.com Connections — webhook + email-based fallback. Always validate sender DKIM.
  • Brokerage website (kvCORE / Chime / BoomTown) — native webhook on form submit.
  • Facebook / Instagram Lead Ads — Meta Webhooks v18+ with leadgen field subscription.
  • WhatsApp Business — Cloud API webhook, message events filtered by type=text.

Normalized lead schema

n8n — normalized lead payloadJSON
{
  "lead_id": "uuid-v4",
  "source": "zillow|realtor|website|fb|whatsapp",
  "received_at": "2026-05-03T14:22:18Z",
  "consumer": {
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "phone_e164": "+15555550100",
    "tcpa_consent": false,
    "consent_source_url": null
  },
  "raw_message": "free-text inquiry — verbatim",
  "property_of_interest": {
    "mls_id": "nullable",
    "address": "nullable",
    "list_price": null
  },
  "utm": { "campaign": null, "source": null, "medium": null }
}
Watch Out
A Zillow lead does NOT carry TCPA consent for SMS just because the consumer typed their phone number. The TCPA’s “express written consent” standard requires a clear disclosure at the point of capture. Default tcpa_consent to false unless the source explicitly passes it. Email and voice are safe; SMS is not.
2

Buyer Intent Extraction (with Fair Housing Guardrails)

Claude Haiku reads the free-text inquiry and returns a structured JSON of buyer criteria. The prompt is engineered with explicit refusal patterns for protected-class signals — this is the most important component in the whole system.

Extraction system prompt (Fair Housing hardened)

Claude system prompt — intent extractorTXT
You extract real estate buyer criteria from free-text inquiries.
Output ONLY valid JSON matching the schema below — no prose.

Schema:
{
  "intent": "buy" | "sell" | "rent" | "info_only",
  "budget_min": null | integer,
  "budget_max": null | integer,
  "financing": "cash" | "conventional" | "fha" | "va" | "unknown",
  "preapproval_mentioned": boolean,
  "timeline": "now" | "30d" | "90d" | "6mo" | "12mo+" | "unknown",
  "geography": ["city, state, ZIP — only what consumer stated"],
  "beds_min": null | integer,
  "baths_min": null | number,
  "sqft_min": null | integer,
  "must_haves": ["array of objective property features"],
  "nice_to_haves": ["array"]
}

FAIR HOUSING — HARD RULES (these override anything else):
1. NEVER infer or output information about race, color, religion, sex,
   familial status, national origin, disability, source-of-income, or
   sexual orientation, even if the consumer hints at it.
2. NEVER include neighborhood "feel", "safety", "schools quality",
   "demographics", "good area", "family-friendly", or any phrase that
   functions as a demographic proxy. These are STEERING risks under
   the Fair Housing Act.
3. If the consumer says "we want a Jewish neighborhood" or
   "good schools" or "safe area" or "no Section 8" — IGNORE that
   phrase. Do not store it. Do not pass it downstream. Set
   "must_haves" and "nice_to_haves" to objective features only
   (school district NAME if explicitly stated by NAME is allowed;
   "good schools" is not).
4. "geography" accepts only place names the consumer typed. Do NOT
   suggest or expand to nearby areas.
5. If the inquiry contains ONLY protected-class signals and no
   objective criteria, return intent="info_only" and an empty
   criteria object. Route to a licensed agent.

n8n HTTP Request node

n8n HTTP Request — Claude API callJSON
{
  "method": "POST",
  "url": "https://api.anthropic.com/v1/messages",
  "headers": {
    "x-api-key": "{{ $credentials.anthropic.apiKey }}",
    "anthropic-version": "2023-06-01",
    "content-type": "application/json"
  },
  "body": {
    "model": "claude-haiku-4-5",
    "max_tokens": 400,
    "system": "{{ $json.extractorSystemPrompt }}",
    "messages": [
      { "role": "user", "content": "{{ $json.raw_message }}" }
    ]
  }
}
Security
Run a post-processing Code node that scans Claude’s output for any of ~40 protected-class trigger phrases (regex list maintained by your compliance team). If any are found in must_haves/nice_to_haves, strip them and log the incident. Defense in depth — never trust the model alone with regulated content.
3

MLS Property Match

With objective criteria in hand, query the RESO Web API for matching active listings. The query uses only the fields extracted in Step 2 — no demographic enrichment, no “similar buyers also looked at” graph. The same disciplined data-flow pattern shows up in our property management automation work.

RESO OData query

Trestle / RESO Web API — Property searchHTTP
GET https://api-trestle.corelogic.com/trestle/odata/Property
  ?$filter=
     StandardStatus eq 'Active'
     and ListPrice ge 450000
     and ListPrice le 625000
     and BedroomsTotal ge 3
     and BathroomsTotalInteger ge 2
     and LivingArea ge 1800
     and PostalCode in ('78704','78745','78748')
  &$top=15
  &$orderby=ListPrice asc
  &$select=ListingKey,UnparsedAddress,ListPrice,BedroomsTotal,
           BathroomsTotalInteger,LivingArea,PostalCode,
           PublicRemarks,Media

Authorization: Bearer {{ $credentials.trestle.token }}

What you store, what you don’t

  • Store: ListingKey, address, price, beds/baths, sqft, ZIP, list date.
  • Never store as match criteria: any demographic data, even if the MLS exposes SchoolDistrict ratings or “neighborhood walkability” flags. These can become Fair Housing exhibits in litigation.
Insight
If the consumer mentioned a specific school district BY NAME (“Eanes ISD”), pass it through. If they said “good schools”, strip it. Specificity = consumer choice. Vague descriptors = your liability.
4

BANT Scoring → Tier A / B / C

BANT (Budget, Authority, Need, Timeline) is the classic B2B framework adapted to residential real estate. Claude scores each dimension 0-3 using ONLY the objective criteria from Step 2 plus optional context from MLS history.

Scoring rubric

Dimension3 (Strong)1 (Weak)
BudgetPre-approval mentioned + range stated“Just looking”, no range
AuthoritySole decision OR co-buyer copied“My parents will decide”
NeedLease ending, relocation, life eventNo urgency cue
TimelineNow / 30 days12+ months

Tier mapping: A = total ≥ 9 (showing-ready, immediate agent assignment). B = 5-8 (drip nurture, follow-up in 7 days). C = ≤ 4 (long-horizon nurture, monthly market update only).

Persistence — lead_score table

Postgres — lead_scoreSQL
CREATE TABLE lead_score (
  lead_id          uuid PRIMARY KEY,
  scored_at        timestamptz NOT NULL DEFAULT now(),
  budget_score     smallint CHECK (budget_score BETWEEN 0 AND 3),
  authority_score  smallint CHECK (authority_score BETWEEN 0 AND 3),
  need_score       smallint CHECK (need_score BETWEEN 0 AND 3),
  timeline_score   smallint CHECK (timeline_score BETWEEN 0 AND 3),
  total            smallint GENERATED ALWAYS AS
                     (budget_score + authority_score + need_score + timeline_score)
                     STORED,
  tier             char(1) NOT NULL,
  reasoning        text NOT NULL,
  fh_flag_count    smallint DEFAULT 0  -- how many FH triggers got stripped
);

CREATE INDEX idx_score_tier ON lead_score(tier, scored_at DESC);
Watch Out
A high fh_flag_count on a lead is a yellow flag — review the prompt. A high count across many leads is a red flag — your extraction prompt is too permissive. Track this metric weekly.
5

Agent Routing

An n8n routing function picks the agent based on geography (which farm covers the ZIP), specialty (luxury / first-time / investor), current workload, and availability (PTO, license status, vacation). Round-robin within the eligible pool prevents one rainmaker from hoarding leads.

Routing query

Postgres — agent eligibility & round-robinSQL
SELECT a.agent_id, a.full_name, a.email, a.phone_e164,
       a.last_lead_assigned_at
FROM agent a
JOIN agent_farm_zip f ON f.agent_id = a.agent_id
WHERE f.postal_code = $1                       -- lead's ZIP
  AND a.license_status = 'active'              -- valid state license
  AND a.on_pto = false
  AND $2 = ANY (a.specialties)                 -- 'luxury'/'first_time'/etc
  AND a.open_lead_count < a.max_lead_capacity
  AND a.brokerage_id = $3
ORDER BY a.last_lead_assigned_at ASC NULLS FIRST  -- round-robin
LIMIT 1;

Forbidden routing signals

The routing logic must not consider:

  • Consumer surname (proxy for national origin)
  • Consumer language preference (proxy for national origin) — UNLESS it’s matching to an agent who explicitly speaks that language and the consumer requested it
  • Property neighborhood demographic data
  • Any agent attribute used as a “match” to consumer demographics

RESPA also forbids routing logic that creates kickback patterns. If your brokerage has affiliated services (lender, title), routing leads to agents who push those services more aggressively can trigger RESPA Section 8 violations. Route on workload and farm only.

6

Auto-Engage Layer

For Tier A leads, the system fires within 60 seconds: personalized email with the top 5 MLS matches, a Calendly link for the agent’s showing slots, a neighborhood data sheet (objective: median price, days on market, school NAMES). For Tier B/C, a measured drip via Follow Up Boss or kvCORE. SMS is gated by TCPA consent.

First-touch payload (Sonnet)

Claude system prompt — first-touch writerTXT
You write the first-touch email from {{agent_name}}, a licensed
real estate agent, to a prospective buyer.

INPUT: lead context JSON + 5 MLS match objects.
OUTPUT: subject + body. Plain text. 90-140 words.

Tone: warm, professional, not pushy. Acknowledge what they said
they're looking for. Offer the matches. Offer to schedule a call.

NEVER do these:
1. NEVER mention demographic descriptors of any neighborhood
   ("family-friendly", "great schools", "diverse area", "safe", etc.).
   School DISTRICT NAMES are fine if the consumer asked.
2. NEVER promise a property is "still available" — list status
   changes hourly. Say "as of this morning".
3. NEVER quote interest rates or pre-approval amounts.
4. NEVER add anyone besides {{agent_name}} on the signature line.
5. Include the brokerage's mandated disclosure footer verbatim.

Format:
- Subject: under 50 chars, no emoji.
- Body: 1 paragraph greeting + bulleted matches + 1 closing line +
  signature + disclosure footer.

TCPA-compliant SMS sender

n8n Code node — TCPA gateJS
// Hard gate: do not send SMS without express written consent.
const lead = $input.item.json;
if (!lead.consumer.tcpa_consent) {
  return [{ json: { skip: true, reason: 'no_tcpa_consent' } }];
}
// Quiet hours per recipient timezone (8am-9pm local).
const localHour = new Date().toLocaleString('en-US',
  { timeZone: lead.timezone, hour: 'numeric', hour12: false });
if (localHour < 8 || localHour >= 21) {
  return [{ json: { defer_until_morning: true } }];
}
// Append STOP / HELP per CTIA.
const body = `${lead.message}nnReply STOP to opt out. HELP for help.`;
return [{ json: { send: true, body } }];
Critical
TCPA violations are $500-$1,500 per text. A single non-consenting recipient can sue. The TCPA gate above is non-negotiable. The same auto-engage discipline carries over to our other regulated industries — see the construction automation guide for OSHA-bounded examples.

Common Failures & Fixes

Three failure modes show up in every real estate AI deployment. Plan for them on day one, not after the first complaint to your state real estate commission.

Failure 1: Steering by proxy

Symptom: Consumer types “we want a family-friendly neighborhood with good schools.” Claude obediently filters MLS results to ZIPs with high-rated schools. Those ZIPs correlate with one demographic. The Justice Department calls this digital steering.

Fix: The Step 2 prompt must drop those phrases entirely. The Step 3 query must use only ZIPs the consumer typed by name. Add a Code node that compares “criteria as captured” vs. “criteria after FH strip” and flags the diff for review.

Failure 2: Tire-kicker classified as Tier A

Symptom: A casual browser fills a Zillow form (“I love this house!”) and BANT misreads urgency, agent calls them, no pre-approval, wasted hour.

Fix: Tier A requires both Budget ≥ 2 AND Timeline ≥ 2. Without an explicit financing signal (pre-approval mentioned, cash stated) or urgent timeline, the lead drops to B regardless of total. Tune the rubric monthly using the lead_score table joined to actual showing-conversion data.

Failure 3: SMS to a non-consenting consumer

Symptom: A Realtor.com lead arrives with a phone but no TCPA consent flag. The drip workflow assumes consent, fires SMS, $1,500 statutory damages and a TCPA litigation letter.

Fix: The TCPA gate from Step 6. Default tcpa_consent=false at ingestion, and the only way it becomes true is the consumer separately opting in via a documented form (with the consent URL stored in consent_source_url). For first-touch, use email until consent arrives.

Compliance: Fair Housing, NAR Code of Ethics, TCPA, RESPA

Real estate is one of the most heavily regulated consumer-facing industries in the US. An AI workflow that doesn’t account for the full compliance regime is not an asset — it’s a liability multiplier. Every brokerage we deploy this for goes through a Fair Housing audit before a single line of code goes live.

Fair Housing Act (the dominant constraint)

The FHA protects seven federal classes: race, color, religion, sex (including sexual orientation and gender identity per HUD’s 2021 directive), familial status, national origin, disability. Many states add: source of income (Section 8 vouchers), age, marital status, veteran status. The AI system must not filter, score, route, or match on any of these — directly OR by proxy.

Forbidden Claude prompt patterns

These are the prompts and instructions you must NEVER include — they create FHA exposure even if the model “behaves”:

  • “Suggest neighborhoods that match the buyer’s lifestyle
  • “Find areas similar to [demographic-correlated location]”
  • “Score the quality or desirability of a neighborhood”
  • “Identify family-friendly, safe, up-and-coming, or diverse areas”
  • “Match the buyer to an agent who understands their background
  • “Use the buyer’s name to infer language preference”
  • “Recommend properties based on school ratings” (use district NAMES only if consumer asked)
  • “Filter out areas with high rental concentration” (proxy for source-of-income)

NAR Code of Ethics — Articles 10 & 12

Article 10 is FHA at REALTOR® scale (broader than federal). Article 12 mandates truthful advertising — every AI-generated message must include the agent’s license number, brokerage name, and the brokerage’s mandated equal-opportunity disclosure. Bake the disclosure into the Sonnet prompt as a non-removable footer.

TCPA & CAN-SPAM

SMS requires prior express written consent with a clear disclosure of message frequency and that consent is not a condition of purchase. CAN-SPAM requires every email to include a working unsubscribe link, the brokerage physical address, and to honor opt-outs within 10 business days.

RESPA Section 8

Routing logic that systematically funnels leads to agents who push affiliated lender/title services in exchange for any consideration is a kickback. Route on objective workload and geography only.

Critical
Use the Anthropic enterprise tier with zero-data-retention enabled. Consumer PII (name, email, phone, financial signals) must not become training data. Get an executed BAA-equivalent and document it in your broker compliance file. State agencies in audits will ask.

Measured Results — 12 Months In

Numbers from a real implementation at a 22-agent residential brokerage in Austin TX after a full 12-month operating cycle.

Avg qualification time
18 sec
was 47 min
Lead-to-appointment
4.2x
vs prior baseline
Annual cost saved
$140K
vs 1.5 ISA hires
Fair Housing complaints
0
in 12-month run

73% of qualified Tier-A leads booked a showing within 48 hours — versus 19% before automation. The Fair Housing flag-and-strip layer triggered on 2.4% of inbound inquiries (mostly “good schools” / “safe neighborhood” phrases), all properly handled without surfacing in the agent-facing data.

Implementation Timeline & Cost

DIY Path
80 – 120 hours
  • Fair Housing audit + legal review: 8–12 hrs
  • Lead source webhook plumbing: 10–14 hrs
  • RESO API onboarding (Trestle/Bridge): 14–20 hrs
  • Claude prompts + FH guardrail testing: 20–28 hrs
  • CRM bidirectional sync (FUB/kvCORE): 12–18 hrs
  • TCPA consent flow + Twilio: 8–12 hrs
  • Agent training + shadow-mode validation: 8–16 hrs
With SEOKRU
4-week deployment
  • Week 1: Fair Housing audit + lead source inventory
  • Week 2: MLS API integration + Claude FH-hardened prompts
  • Week 3: CRM routing + TCPA consent flow
  • Week 4: Agent training + go-live in shadow mode first
  • Includes: 90-day SLA, prompt tuning, FH-flag monthly audit
  • Ongoing: ~$400/mo API + MLS + hosting
Get a Custom Implementation →

FAQ

How do you guarantee no Fair Housing violations from Claude's matching logic?
Three layers. (1) The extraction prompt has hard-coded refusal patterns for protected-class signals and demographic proxies — Claude is instructed to drop those phrases entirely, not just ignore them. (2) A post-processing Code node runs a regex sweep over the structured output and strips anything that slipped through, logging the incident. (3) The MLS query in Step 3 only uses the sanitized criteria — no demographic enrichment, no “similar buyers” graph, no neighborhood “feel” scoring. We also run a monthly audit query against the fh_flag_count column to catch prompt drift before regulators do. For broader compliance context, see our parent real estate AI automation service.
What about WhatsApp / international buyers?
WhatsApp Cloud API plugs into the same lead-source aggregation in Step 1. Claude handles the message in whatever language the consumer used (50+ languages natively). The intent extractor and FH guardrails operate on the translated text. For international buyers wiring cash from abroad, route to an agent flagged with investor_intl specialty. Note: language detection MUST come from the message body, never from the consumer’s name or phone country code — both are protected-class proxies.
Can it work with our existing Follow Up Boss or kvCORE setup?
Yes. FUB has a clean v1 REST API with bidirectional sync (lead in, activity out). kvCORE has a webhook-out for new leads and a REST API for activity logging. Chime and BoomTown work the same way. The n8n workflow becomes the orchestration layer that sits between your lead sources and your CRM — your team keeps using FUB or kvCORE as their daily UI, and the AI happens invisibly in the middle.
How does it handle dual-agency disclosure?
The auto-engage Sonnet prompt is forbidden from describing the agent’s role beyond “licensed real estate agent.” Any conversation that touches representation type (single-agency, dual-agency, designated-agency) is flagged for human handoff before the AI replies. Most states require dual-agency disclosure on a signed form, not in an automated email — the workflow surfaces a Slack alert to the agent the moment a buyer asks about representation, and the AI stops auto-replying on that thread.
What if Claude misclassifies a tire-kicker as Tier A?
That’s why Tier A requires both Budget ≥ 2 AND Timeline ≥ 2 (not just total ≥ 9). The system also writes every score to the lead_score table — once you have 90 days of data, join it to actual showing-conversion outcomes and tune the rubric monthly. Misclassifications drop from ~12% in week one to under 4% by month three. The cost of an over-classified lead is one agent phone call; the cost of an under-classified hot lead is a lost deal — the rubric is intentionally tuned toward the cheaper failure.
How does this compare to Lofty (formerly Chime), Lone Wolf Foundation, or Structurely?
Off-the-shelf tools optimize for ease-of-onboarding, not Fair Housing defensibility. Lofty’s lead scoring uses signals their team won’t fully document — opaque models in a regulated industry are a liability. Structurely’s “Aisa Holmes” SMS bot has been in TCPA litigation. Lone Wolf Foundation is the most CRM-like but locks you into their ecosystem. The custom n8n + Claude path costs more upfront but gives you a fully auditable model, your own prompt IP, and the ability to defend every decision in front of HUD or your state real estate commission. For brokerages over 15 agents, custom usually wins by year two.

Want this built for your brokerage?

SEOKRU deploys this exact system in 4 weeks. We handle the Fair Housing audit, MLS onboarding, prompt engineering, TCPA consent plumbing, agent training, and 90 days of accuracy + compliance monitoring. You keep ownership of every component and every prompt.

Talk to a real estate automation engineer