# visheshjain28/real-estate-ai-lead-agent architecture

> Architecture diagram of the GitHub repository visheshjain28/real-estate-ai-lead-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/visheshjain28/real-estate-ai-lead-agent
- Repository: https://github.com/visheshjain28/real-estate-ai-lead-agent

## Overview

This repository packages an n8n workflow for an automated real-estate lead pipeline: Retell AI conducts a customer call, then sends a completed-call event to the workflow, which filters for `call_ended`, extracts lead details with Gemini, structures the result, and appends it to Google Sheets. The workflow JSON is the only runtime artifact in the tree; component paths therefore refer to that file. The sequence is documented in the README, but the workflow source was not sampled, so internal wiring is represented only to the extent the README specifies it.

Main entry points: [`workflow/Real Estate AI Agent - Retell Backend.json`](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json) (Webhook Trigger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_calling["Customer Calling"]
end

subgraph group_processing["Lead Processing"]
  node_webhook["Webhook Trigger"]
  node_filter["Call Event Filter"]
  node_gemini["Gemini Extraction"]
  node_parser["JSON Output Parser"]
end

subgraph group_storage["Lead Storage"]
  node_sheets[("Google Sheets")]
end

node_customer(("Customer"))
node_retell["Retell AI"]

node_customer -->|"conducts call"| node_retell
node_retell -->|"sends transcript event"| node_webhook
node_webhook -->|"passes event"| node_filter
node_filter -->|"routes call_ended"| node_gemini
node_gemini -->|"returns extracted details"| node_parser
node_parser -->|"appends lead"| node_sheets

click node_webhook "https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json"
click node_filter "https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json"
click node_gemini "https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json"
click node_parser "https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json"
click node_sheets "https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webhook,node_filter,node_gemini,node_parser toneAmber
class node_sheets toneMint
class node_customer,node_retell toneIndigo
```

## Components

### Lead Processing

- [Webhook Trigger](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json): `workflow/Real Estate AI Agent - Retell Backend.json`
- [Call Event Filter](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json): `workflow/Real Estate AI Agent - Retell Backend.json`
- [Gemini Extraction](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json): `workflow/Real Estate AI Agent - Retell Backend.json`
- [JSON Output Parser](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json): `workflow/Real Estate AI Agent - Retell Backend.json`

### Lead Storage

- [Google Sheets](https://github.com/visheshjain28/real-estate-ai-lead-agent/blob/main/workflow/Real%20Estate%20AI%20Agent%20-%20Retell%20Backend.json): `workflow/Real Estate AI Agent - Retell Backend.json`

### Other components

- **Customer**
- **Retell AI**

## Connections

- Customer → Retell AI: conducts call
- Retell AI → Webhook Trigger: sends transcript event
- Webhook Trigger → Call Event Filter: passes event
- Call Event Filter → Gemini Extraction: routes call_ended
- Gemini Extraction → JSON Output Parser: returns extracted details
- JSON Output Parser → Google Sheets: appends lead
