π£ Qualify real estate leads and send instant replies with OpenAI, Gmail, and Google Sheets
β‘ 149 views Β· π£ Lead Generation & Enrichment
Description
Quick overview
This workflow captures real estate leads via a webhook, uses an OpenAI-compatible Chat Completions API call to qualify and draft a reply, then sends emails through Gmail and logs the lead to Google Sheets.
How it works
- Receives a new lead submission via a POST webhook from a web form.
- Normalizes the incoming lead fields (name, email, phone, budget, interest, timeline, message) and applies your business and agent settings.
- Sends the lead details to an OpenAI-compatible Chat Completions endpoint to classify the lead as HOT/WARM/COLD and generate a subject and follow-up email body.
- Parses the AI response (or falls back to defaults if parsing fails) and merges it back into the lead record.
- Sends the generated reply to the lead via Gmail and emails the agent a notification that includes the AI verdict.
- Appends the lead details and AI score/reason to a Google Sheets tab for CRM-style tracking.
Setup
- Configure the webhook URL from βNew Lead (Web Form)β in your website form/Facebook lead form so it sends a POST request to
/realestate-lead. - Add Gmail credentials for both outgoing emails and confirm the workflow is allowed to send to leads and your agent address.
- Add an HTTP Request credential (or set the required Authorization header) for your OpenAI-compatible API endpoint, and verify the model name in the settings.
- Add Google Sheets credentials, paste your Google Sheet URL in the logging step, and ensure a tab named
Leadsexists with matching columns (name, email, phone, budget, interest, timeline, score, reason). - Update the Settings values (business name, agent name/email, booking link, AI URL/model) to match your environment.
π Nodes Used
Google Sheets, HTTP Request, Webhook, Gmail
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File