How ainaasim/ai-property-lead-automation works
Purpose and Delivery Model
This is a documented architecture for a real-estate lead-nurturing automation platform. It captures SpareRoom leads, conducts AI-assisted follow-up over portal and WhatsApp channels, coordinates viewings/deposits, and synchronizes lead state into ClickUp CRM. The repository currently exposes documentation rather than executable workflow, scraper, or schema artifacts: README.md and Case_Study_Sila_Estates.md.
Entry Points
Operational triggers are n8n webhook and scheduled-workflow entry points described in README.md:
• Portal scraper webhook for inbound SpareRoom enquiries.
• Ten-minute scheduled job for outbound WhatsApp initiation.
• WhatsApp provider webhook for inbound replies.
• Internal workflow callouts for CRM synchronization.
• Scheduled 30-minute retry processing for failed ClickUp updates.
Lead and Inventory Data Boundary
Supabase/PostgreSQL is the system-of-record boundary. The documented schema models:
• Leads: identity/contact information, portal advert association, lifecycle status, booking state, and reservation response.
• Rooms: advert-number-keyed room inventory, pricing, amenities, address, and availability.
• CRM retry records: failed ClickUp update payloads, errors, retry counters, and timestamps.
Workflow stages query leads and rooms before messaging, then persist/update status needed for future conversations and follow-up. Schema details and provisioning instructions are defined in README.md.
Inbound Portal Lead Processing
The portal flow accepts scraper-produced inbound content, removes HTML artifacts, extracts lead contact data, and matches the enquiry against current room inventory. It then calls OpenAI GPT-4o to create a personalized response and includes a shortened WhatsApp handoff link. This is the transition from portal-originated interest to a trackable WhatsApp conversation, as described in README.md.
WhatsApp Engagement and Conversation Control
A scheduled outbound stage finds eligible phone numbers that have not yet received a WhatsApp message, selects a room-specific template, and dispatches through WATI/Woztell. A separate inbound WhatsApp stage receives replies, classifies intent—booking, portfolio, callback, or FAQ—maintains conversation state, and uses GPT-4o for answers. These stages make WhatsApp the primary ongoing engagement channel. Provider/API responsibilities are documented in README.md.
Viewing, Deposit, and CRM Synchronization
Viewing coordination is handled by a scheduled reminders flow that reads Calendly scheduling data and sends warnings/reminders. Downstream workflows invoke a centralized ClickUp sync engine to update custom CRM fields such as price, room type, and deposit status, and to attach conversation transcripts. Failed ClickUp API operations are durably recorded and retried, separating customer-facing automation from CRM delivery reliability. These integrations are specified in README.md.
Runtime and External Services
n8n is the orchestration runtime. Supabase provides hosted PostgreSQL persistence. Selenium and Playwright are described as browser-automation runtimes for SpareRoom and WhatsApp extraction. External service boundaries include OpenAI GPT-4o, WATI/Woztell WhatsApp APIs, Short.io link shortening, Calendly, and ClickUp. Required credentials are environment-provided API keys/tokens, documented in README.md.
Main entry points: README.md Portal lead processing
Components 19
n8n automation
Webhook and scheduled workflows.
- Portal scraper webhook · Accepts SpareRoom enquiry content.
README.md - Portal lead processing · Cleans, matches, and responds to new enquiries.
README.md - 10-minute WhatsApp initiation · Finds leads not yet contacted on WhatsApp.
README.md - WhatsApp reply webhook · Receives ongoing lead replies.
README.md - Conversation control · Classifies intent and maintains conversation state.
README.md - Viewing reminders · Sends scheduling warnings and reminders.
README.md - ClickUp sync engine · Updates CRM fields and attaches transcripts.
README.md - 30-minute CRM retry · Retries failed ClickUp operations.
README.md
System of record
- Leads · Lead identity, lifecycle, booking, and reservation state.
README.md - Rooms inventory · Advert-keyed availability and room details.
README.md - CRM retry records · Durable failed-update payloads and retry metadata.
README.md - Supabase PostgreSQL · System-of-record database boundary.
README.md
External services
- SpareRoom
README.md - Selenium / Playwright · Extracts portal and WhatsApp content.
README.md - OpenAI GPT-4o · Generates personalized replies and answers.
README.md - WATI / Woztell · Dispatches and receives WhatsApp messages.
README.md - Short.io · Creates WhatsApp handoff links.
README.md - Calendly
README.md - ClickUp
README.md
Connections 27
- SpareRoom → Selenium / Playwright: portal content
- Selenium / Playwright → Portal scraper webhook: inbound enquiry
- Portal scraper webhook → Portal lead processing: trigger
- Portal lead processing → Leads: create or update
- Portal lead processing → Rooms inventory: match advert
- Portal lead processing → OpenAI GPT-4o: personalized response
- Portal lead processing → Short.io: handoff link
- 10-minute WhatsApp initiation → Leads: eligible leads
- 10-minute WhatsApp initiation → Rooms inventory: room template data
- 10-minute WhatsApp initiation → WATI / Woztell: send initiation
- WATI / Woztell → WhatsApp reply webhook: inbound reply
- WhatsApp reply webhook → Conversation control: trigger
- Conversation control → Leads: conversation and intent state
- Conversation control → OpenAI GPT-4o: FAQ answers
- Conversation control → WATI / Woztell: send reply
- Calendly → Viewing reminders: scheduling data
- Viewing reminders → WATI / Woztell: warnings and reminders
- Portal lead processing → ClickUp sync engine: lead update
- Conversation control → ClickUp sync engine: state and transcript
- Viewing reminders → ClickUp sync engine: viewing status
- ClickUp sync engine → ClickUp: CRM fields and transcript
- ClickUp sync engine → CRM retry records: record failure
- 30-minute CRM retry → CRM retry records: load pending retries
- 30-minute CRM retry → ClickUp: retry update
- Leads → Supabase PostgreSQL: stored in
- Rooms inventory → Supabase PostgreSQL: stored in
- CRM retry records → Supabase PostgreSQL: stored in