{"product_id":"n8n-real-estate-lead-scoring-openai-postgresql-gmail-slack","title":"n8n Real Estate Lead Scoring: OpenAI + PostgreSQL + Gmail\/Slack","description":"\u003ch3\u003eTurn new real estate leads into scored, routed, and contacted opportunities—automatically\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow receives real estate leads via a webhook, validates them, stores them in \u003cstrong\u003ePostgreSQL\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to score and classify lead quality (HOT\/WARM\/COLD), assigns the right agent by \u003cstrong\u003elocation\u003c\/strong\u003e, and then alerts your team in \u003cstrong\u003eSlack\u003c\/strong\u003e and sends confirmations through \u003cstrong\u003eGmail\u003c\/strong\u003e (plus SMS for high-priority leads).\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives leads via webhook:\u003c\/strong\u003e Accepts a POST request containing \u003ccode\u003ename\u003c\/code\u003e, \u003ccode\u003eemail\u003c\/code\u003e, \u003ccode\u003ephone\u003c\/code\u003e, \u003ccode\u003ebudget\u003c\/code\u003e, \u003ccode\u003eproperty_type\u003c\/code\u003e, \u003ccode\u003elocation\u003c\/code\u003e, and \u003ccode\u003emessage\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates required fields:\u003c\/strong\u003e Rejects the request with an error response if \u003cstrong\u003eemail\u003c\/strong\u003e, \u003cstrong\u003ephone\u003c\/strong\u003e, or \u003cstrong\u003ebudget\u003c\/strong\u003e is missing or invalid.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStores lead data in PostgreSQL:\u003c\/strong\u003e Inserts the lead into \u003ccode\u003epublic.leads_tracking\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eScores with OpenAI:\u003c\/strong\u003e Sends lead details to OpenAI to generate a \u003cstrong\u003elead score\u003c\/strong\u003e, \u003cstrong\u003elead type\u003c\/strong\u003e (HOT\/WARM\/COLD), and \u003cstrong\u003ereasoning\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAssigns an agent by location:\u003c\/strong\u003e Merges OpenAI results with the original lead and assigns a sales agent based on the lead’s \u003ccode\u003elocation\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates the same PostgreSQL record:\u003c\/strong\u003e Writes the AI score, lead type, assigned agent, and reasoning back to PostgreSQL.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHigh-priority automation:\u003c\/strong\u003e If the score is \u003cstrong\u003eabove 80\u003c\/strong\u003e, sends an SMS via \u003cstrong\u003eTwilio\u003c\/strong\u003e, a confirmation email via \u003cstrong\u003eGmail\u003c\/strong\u003e, posts a hot-lead alert to \u003cstrong\u003eSlack\u003c\/strong\u003e, and returns success to the webhook caller.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFollow-up reminder:\u003c\/strong\u003e Waits for a configured delay, then sends a Gmail follow-up email to the lead.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eQualify real estate inquiries from your website form and route them to the correct agent automatically.\u003c\/li\u003e\n  \u003cli\u003eUse OpenAI lead scoring to prioritize outreach when a lead is likely “HOT” (score \u0026gt; 80).\u003c\/li\u003e\n  \u003cli\u003eNotify sales immediately in Slack and confirm contact via Gmail\/SMS without manual work.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook Trigger\u003c\/strong\u003e to receive POST lead data.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eif \/ set \/ code \/ wait \/ gmail \/ merge\u003c\/strong\u003e nodes for logic, mapping, control flow, and email follow-up.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI\u003c\/strong\u003e for scoring, classification, and reasoning.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePostgreSQL\u003c\/strong\u003e (expects \u003ccode\u003epublic.leads_tracking\u003c\/code\u003e) for lead persistence and updates.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSlack\u003c\/strong\u003e hot-lead alerts for high-score leads.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eIdeal for n8n users, automation engineers, and SaaS operators building a reliable real estate lead scoring workflow with OpenAI + PostgreSQL + Gmail\/Slack.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45978904166579,"sku":"N8N-19365","price":51.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/zpSt_jm612cESjtT-ASy4_84AFD113.png?v=1788858480","url":"https:\/\/buyflowscripts.com\/products\/n8n-real-estate-lead-scoring-openai-postgresql-gmail-slack","provider":"N8N Commerce","version":"1.0","type":"link"}