AutomationFlowsAI & RAG › Qualify and Route Real Estate Leads with Anthropic Claude, Mls/crm, and…

Qualify and Route Real Estate Leads with Anthropic Claude, Mls/crm, and…

Original n8n title: Qualify and Route Real Estate Leads with Anthropic Claude, Mls/crm, and Google Sheets

ByCheng Siong Chin @cschin on n8n.io

This workflow automates real estate lead qualification and routing by enriching leads from multiple sources with AI-powered analysis and directing them to appropriate sales agents based on priority. Designed for real estate brokers, sales managers, and lead generation teams, it…

Cron / scheduled trigger★★★★☆ complexityAI-powered20 nodesHTTP RequestAgentAnthropic ChatOutput Parser StructuredGoogle Sheets
AI & RAG Trigger: Cron / scheduled Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #12996 — we link there as the canonical source.

This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "R9UO5bpX8i2diAfD",
  "name": "AI-Powered Lead Aggregation, Enrichment, and Intelligent Agent Routing System",
  "tags": [],
  "nodes": [
    {
      "id": "bd18694b-2def-4e32-9d11-6c1b257488f5",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -448,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c7762d5d-3fad-4e09-85d5-3ec1d31d9a1a",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -224,
        96
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "mlsApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__MLS API endpoint URL__>"
            },
            {
              "id": "id-2",
              "name": "crmApiUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__CRM API endpoint URL__>"
            },
            {
              "id": "id-3",
              "name": "highPriorityThreshold",
              "type": "number",
              "value": 75
            },
            {
              "id": "id-4",
              "name": "googleSheetId",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Google Sheet ID for tracking__>"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "ef4d50be-2a18-4f00-ade1-815387a6455b",
      "name": "Fetch Leads from MLS/Portals",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        64
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.mlsApiUrl }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<__PLACEHOLDER_VALUE__MLS API Bearer YOUR_TOKEN_HERE>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "a32a8d41-4aa5-42f2-936a-3332685f1a6d",
      "name": "Fetch Leads from CRM/Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        256
      ],
      "parameters": {
        "url": "={{ $('Workflow Configuration').first().json.crmApiUrl }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "<__PLACEHOLDER_VALUE__CRM API Bearer YOUR_TOKEN_HERE>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "5b63ea35-6a0e-47c9-8a01-4b089bffb08f",
      "name": "Aggregate All Leads",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        224,
        96
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "9ba9bc7f-0d26-4cc2-8243-02751f778a6a",
      "name": "Split Leads for Processing",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        448,
        96
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "8072b232-df27-4991-b3ac-f16afa8ce9f5",
      "name": "AI Lead Enrichment Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        672,
        96
      ],
      "parameters": {
        "text": "=Lead data to enrich: {{ JSON.stringify($json) }}",
        "options": {
          "systemMessage": "You are a lead enrichment AI assistant specializing in real estate.\n\nYour task is to:\n1. Analyze the provided lead data (name, email, phone, property interest, location, etc.)\n2. Enrich the lead with:\n   - Estimated demographics (age range, income bracket, family status)\n   - Behavioral scoring (engagement level, purchase intent, urgency)\n   - Lead quality score (0-100 based on completeness, engagement, and fit)\n   - Best-fit agent type (luxury specialist, first-time buyer expert, investor specialist, etc.)\n   - Recommended next action\n3. Return structured JSON output with all enriched fields\n\nBe thorough and data-driven in your analysis."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "1a820b67-74ce-416e-a07e-7c771dc1c0e9",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        680,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-5-20250929",
          "cachedResultName": "Claude Sonnet 4.5"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "5eeb4f67-3bc9-488b-9624-f4a67ecd01cf",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        808,
        320
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"leadQualityScore\": {\n\t\t\t\"type\": \"number\",\n\t\t\t\"description\": \"Lead quality score from 0-100\"\n\t\t},\n\t\t\"ageRange\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Estimated age range\"\n\t\t},\n\t\t\"incomeBracket\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Estimated income bracket\"\n\t\t},\n\t\t\"familyStatus\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Estimated family status\"\n\t\t},\n\t\t\"engagementLevel\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Engagement level: low, medium, high\"\n\t\t},\n\t\t\"purchaseIntent\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Purchase intent: browsing, considering, ready\"\n\t\t},\n\t\t\"urgency\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Urgency level: low, medium, high\"\n\t\t},\n\t\t\"bestFitAgentType\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Best-fit agent type\"\n\t\t},\n\t\t\"recommendedAction\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Recommended next action\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "7b611e61-ef60-49d1-bf0a-ec6a05d760cb",
      "name": "Check Lead Priority",
      "type": "n8n-nodes-base.if",
      "position": [
        1024,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $('AI Lead Enrichment Agent').item.json.leadQualityScore }}",
              "rightValue": "={{ $('Workflow Configuration').first().json.highPriorityThreshold }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "2d4e3388-2bd7-4fc6-9205-b06143679b82",
      "name": "Route to Best-Fit Agent - High Priority",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "assignedAgent",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__High priority agent name/ID__>"
            },
            {
              "id": "id-2",
              "name": "priority",
              "type": "string",
              "value": "high"
            },
            {
              "id": "id-3",
              "name": "routedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "99c1c413-056e-4f41-8f8d-d398c1dc4bf4",
      "name": "Route to Best-Fit Agent - Standard Priority",
      "type": "n8n-nodes-base.set",
      "position": [
        1280,
        368
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "assignedAgent",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Standard priority agent name/ID__>"
            },
            {
              "id": "id-2",
              "name": "priority",
              "type": "string",
              "value": "standard"
            },
            {
              "id": "id-3",
              "name": "routedAt",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "cf8a1dfd-333e-4cc7-9721-c4d8c8905531",
      "name": "Track Engagement - High Priority",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        176
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "High Priority Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "cbd677bc-e952-4b76-ac53-e02454ee34e9",
      "name": "Track Engagement - Standard Priority",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1504,
        368
      ],
      "parameters": {
        "columns": {
          "value": null,
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Standard Priority Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Workflow Configuration').first().json.googleSheetId }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d5b24118-b611-40b5-b89a-f8eebde31c93",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -368
      ],
      "parameters": {
        "width": 608,
        "height": 272,
        "content": "## How It Works\nThis workflow automates real estate lead qualification and routing by enriching leads from multiple sources with AI-powered analysis and directing them to appropriate sales agents based on priority. Designed for real estate brokers, sales managers, and lead generation teams, it solves the critical challenge of quickly identifying high-value prospects from high-volume lead streams while ensuring timely agent follow-up. The system triggers on schedule, fetches leads simultaneously from MLS portals and CRM/email sources, aggregates all leads into unified dataset, splits leads for parallel processing, then deploys AI agents using Anthropic's Claude to analyze lead quality, buying intent, budget capacity, and urgency. Based on enrichment scores, leads are routed to best-fit agents by priority tier, with engagement tracking logged to Google Sheets for performance monitoring and optimization."
      },
      "typeVersion": 1
    },
    {
      "id": "d7f9c6ed-c7c5-487f-8fb0-cc85e157c216",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        -416
      ],
      "parameters": {
        "color": 6,
        "width": 448,
        "height": 352,
        "content": "## Prerequisites\nActive Anthropic API account, MLS/real estate portal API access, CRM system with API integration \n## Use Cases\nInbound lead qualification from property portals, open house inquiry processing, email campaign lead scoring \n## Customization\nModify AI enrichment prompts for market-specific criteria, adjust priority scoring algorithms for business goals\n## Benefits\nReduces lead response time by 75%, ensures high-value prospects receive immediate attention"
      },
      "typeVersion": 1
    },
    {
      "id": "6b42308e-ba36-4ce3-b3cd-0b20aaad3511",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -400
      ],
      "parameters": {
        "width": 448,
        "height": 336,
        "content": "## Setup Steps\n1. Configure Schedule Trigger with desired lead processing frequency\n2. Set up MLS/portal integration API credentials in Fetch Leads from MLS/Portals node\n3. Configure CRM/email system API access in Fetch Leads from CRM/Email node\n4. Connect Anthropic API credentials for AI Lead Enrichment Agent\n5. Customize Structured Output Parser with your lead scoring criteria\n6. Update Check Lead Priority node with priority threshold rules\n7. Configure agent routing logic in Route to Best-Fit Agent nodes by priority tier"
      },
      "typeVersion": 1
    },
    {
      "id": "d21c6209-5f04-4439-b4ec-b5af366565b2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 576,
        "height": 512,
        "content": "## AI-Powered Lead Enrichment and Qualification\n**Why:** Splits aggregated leads for efficient batch processing, deploys Anthropic Claude agents with structured output parsers to analyze lead attributes including property preferences, budget indicators and timeline urgency "
      },
      "typeVersion": 1
    },
    {
      "id": "03dcca6a-1922-4440-b683-3121eedbe39b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 512,
        "height": 640,
        "content": "## Priority-Based Agent Routing with Performance Tracking\n**Why:** Checks enriched lead scores against priority thresholds, routes high-priority leads to top-performing agents for immediate follow-up, standard leads to available agents, logs all engagement data to Google Sheets for conversion tracking "
      },
      "typeVersion": 1
    },
    {
      "id": "03c1b77c-3d17-436a-97c8-25ad3bd6a473",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -512,
        -32
      ],
      "parameters": {
        "color": 7,
        "width": 1088,
        "height": 464,
        "content": "## Multi-Source Lead Acquisition and Aggregation\n**Why:** Simultaneously retrieves leads from MLS/real estate portals and CRM/email systems through parallel API calls, then aggregates all sources into unified dataset, ensuring no lead opportunities are missed "
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "05bc9d2c-9469-4783-9632-73ffbfff376a",
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Leads": {
      "main": [
        [
          {
            "node": "Split Leads for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Lead Priority": {
      "main": [
        [
          {
            "node": "Route to Best-Fit Agent - High Priority",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Route to Best-Fit Agent - Standard Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Leads from MLS/Portals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Leads from CRM/Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Enrichment Agent": {
      "main": [
        [
          {
            "node": "Check Lead Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Leads from CRM/Email": {
      "main": [
        [
          {
            "node": "Aggregate All Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Leads for Processing": {
      "main": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Leads from MLS/Portals": {
      "main": [
        [
          {
            "node": "Aggregate All Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Best-Fit Agent - High Priority": {
      "main": [
        [
          {
            "node": "Track Engagement - High Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route to Best-Fit Agent - Standard Priority": {
      "main": [
        [
          {
            "node": "Track Engagement - Standard Priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow automates real estate lead qualification and routing by enriching leads from multiple sources with AI-powered analysis and directing them to appropriate sales agents based on priority. Designed for real estate brokers, sales managers, and lead generation teams, it…

Source: https://n8n.io/workflows/12996/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

📺 Full walkthrough video: https://youtu.be/03mZE9tvELU

HTTP Request, Google Sheets, Agent +2
AI & RAG

ASMR. Uses googleSheets, outputParserStructured, httpRequest, lmChatOpenAi. Scheduled trigger; 35 nodes.

Google Sheets, Output Parser Structured, HTTP Request +5
AI & RAG

**Content engine that ships fresh, SEO-ready articles every single day. **

Google Sheets, Slack, Webflow +7
AI & RAG

If you teach on Udemy at any meaningful scale, you already know the problem: 80% of student messages are variations of the same handful of questions, but every one of them needs a thoughtful reply to

N8N Nodes Globals, HTTP Request, Google Sheets +8
AI & RAG

Automate your entire LinkedIn content machine — from research and image generation to scheduling and posting — with this AI-powered workflow.

Output Parser Structured, Anthropic Chat, Tool Workflow +5