
AI Lead Qualification & CRM Sync Workflow
An n8n workflow that validates, analyzes, scores and stores every property inquiry automatically, with no manual triage.
Overview
Real estate agents lose deals because inquiries arrive messy and incomplete, and they get answered late. I built an automation that receives a lead from any form, checks it, has an AI summarize it, scores it with transparent business rules, and saves it to Airtable, all in one request.
The challenge
Inquiries come in with missing budget, vague timeframes and unclear intent.
Agents spend time reading every message to decide who deserves a call first.
The same prospect can submit several times and create duplicate records.

workflow
The solution
A webhook-triggered n8n workflow in six stages:
Capture: a POST webhook receives the form data (name, intent, property type, city, max budget, currency, rooms, timeframe, message).
Validate: the fields are normalized and checked. Invalid payloads go to a dedicated error branch with a clear response instead of failing silently.
Analyze: Gemini, through a Basic LLM Chain and a Structured Output Parser, returns a strict JSON: summary, missing information, intent, property type, timeframe, budget clarity, information completeness and recommended next action.
Score: a separate code node calculates the lead score with deterministic business rules. I deliberately kept the score out of the model so it stays explainable, reproducible and adjustable by the agency.
Deduplicate: Airtable is searched first. If the lead exists, the record is updated. If not, a new one is created.
Respond: the webhook returns a structured response to the calling app.
Key design decisions
AI for understanding, code for deciding. The LLM reads and structures text; the scoring is rule-based.
Structured output. A fixed JSON schema makes the AI output safe to plug into any database or CRM.
Upsert logic. One lead means one record, however many times they submit.
Explicit error path. The caller always knows why a request was rejected.
Tools
n8n · Google Gemini · Airtable · Webhooks · JSON Schema
1 like · 0 views · Nov 2, 2026
Developed an AI-based real estate lead qualification workflow using n8n.