{"id":"rPQ026mkAWneudD9","meta":{"instanceId":"b91e510ebae4127f953fd2f5f8d40d58ca1e71c746d4500c12ae86aad04c1502"},"name":"Autonomous Submarket Trend & Investment Opportunity Analyzer","tags":[],"nodes":[{"id":"2376ee96-72ff-46c7-937e-b76fc254068f","name":"Daily Analysis Schedule","type":"n8n-nodes-base.scheduleTrigger","position":[-1056,112],"parameters":{"rule":{"interval":[{"triggerAtHour":6}]}},"typeVersion":1.3},{"id":"d345f473-39b7-411e-be74-71321543da10","name":"Workflow Configuration","type":"n8n-nodes-base.set","position":[-832,112],"parameters":{"options":{},"assignments":{"assignments":[{"id":"id-1","name":"mlsApiUrl","type":"string","value":"<__PLACEHOLDER_VALUE__MLS API endpoint URL__>"},{"id":"id-2","name":"publicRecordsApiUrl","type":"string","value":"<__PLACEHOLDER_VALUE__Public Records API endpoint URL__>"},{"id":"id-3","name":"demographicApiUrl","type":"string","value":"<__PLACEHOLDER_VALUE__Demographic Data API endpoint URL__>"},{"id":"id-4","name":"macroeconomicApiUrl","type":"string","value":"<__PLACEHOLDER_VALUE__Macroeconomic Data API endpoint URL__>"},{"id":"id-5","name":"targetMarket","type":"string","value":"<__PLACEHOLDER_VALUE__Target market or region (e.g., Austin, TX)__>"},{"id":"id-6","name":"investmentThreshold","type":"number","value":75},{"id":"id-7","name":"acquisitionTeamEmail","type":"string","value":"<__PLACEHOLDER_VALUE__Acquisition team email address__>"},{"id":"id-8","name":"slackChannel","type":"string","value":"<__PLACEHOLDER_VALUE__Slack channel ID for investor notifications__>"}]},"includeOtherFields":true},"typeVersion":3.4},{"id":"f1a0f784-ef4f-434b-a81a-f7139320c042","name":"Fetch MLS Data","type":"n8n-nodes-base.httpRequest","position":[-608,-48],"parameters":{"url":"={{ $('Workflow Configuration').first().json.mlsApiUrl }}","options":{},"sendQuery":true,"queryParameters":{"parameters":[{"name":"market","value":"={{ $('Workflow Configuration').first().json.targetMarket }}"}]}},"typeVersion":4.3},{"id":"c43c6e8e-74af-4e09-b644-ddcc90ad254a","name":"Fetch Public Records","type":"n8n-nodes-base.httpRequest","position":[-608,144],"parameters":{"url":"={{ $('Workflow Configuration').first().json.publicRecordsApiUrl }}","options":{},"sendQuery":true,"queryParameters":{"parameters":[{"name":"region","value":"={{ $('Workflow Configuration').first().json.targetMarket }}"}]}},"typeVersion":4.3},{"id":"036b14f7-17ae-4706-9697-8d8d6947ad38","name":"Fetch Demographic Data","type":"n8n-nodes-base.httpRequest","position":[-608,336],"parameters":{"url":"={{ $('Workflow Configuration').first().json.demographicApiUrl }}","options":{},"sendQuery":true,"queryParameters":{"parameters":[{"name":"location","value":"={{ $('Workflow Configuration').first().json.targetMarket }}"}]}},"typeVersion":4.3},{"id":"732f471a-627a-459a-a945-ddab8c11b3f8","name":"Fetch Macroeconomic Data","type":"n8n-nodes-base.httpRequest","position":[-608,528],"parameters":{"url":"={{ $('Workflow Configuration').first().json.macroeconomicApiUrl }}","options":{}},"typeVersion":4.3},{"id":"accacfb3-eb84-4a04-a989-06a7bc40bd42","name":"Aggregate All Data Sources","type":"n8n-nodes-base.aggregate","position":[-384,112],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"cf40ba40-8ae8-496d-99e0-58cc26696b71","name":"Investment Opportunity Analyzer","type":"@n8n/n8n-nodes-langchain.agent","position":[-48,112],"parameters":{"text":"=Analyze the following real estate market data for {{ $('Workflow Configuration').first().json.targetMarket }}:\n\nMLS Data: {{ JSON.stringify($json.mls_data) }}\nPublic Records: {{ JSON.stringify($json.public_records) }}\nDemographic Data: {{ JSON.stringify($json.demographic_data) }}\nMacroeconomic Data: {{ JSON.stringify($json.macroeconomic_data) }}\n\nIdentify emerging investment opportunities and predict future property value trends.","options":{"systemMessage":"You are an expert real estate investment analyst specializing in submarket trend analysis and opportunity identification.\n\nYour task is to:\n1. Analyze aggregated MLS, public records, demographic, and macroeconomic data\n2. Identify emerging investment opportunities based on:\n   - Price trends and momentum\n   - Supply and demand dynamics\n   - Demographic shifts (population growth, income levels, employment)\n   - Infrastructure development and zoning changes\n   - Economic indicators (interest rates, GDP growth, employment rates)\n3. Predict future property value trends using:\n   - Historical price appreciation patterns\n   - Market cycle analysis\n   - Comparative market analysis\n   - Economic forecasting models\n4. Calculate an investment score (0-100) for each opportunity\n5. Provide actionable insights with specific property types, locations, and timing recommendations\n\nReturn your analysis in the structured JSON format defined by the output parser."},"promptType":"define","hasOutputParser":true},"typeVersion":3.1},{"id":"0f858928-0c10-4a5a-948c-51c26f760251","name":"OpenAI GPT-4","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-160,336],"parameters":{"model":{"__rl":true,"mode":"id","value":"gpt-4o"},"options":{},"builtInTools":{}},"credentials":{"openAiApi":{"id":"credential-id","name":"openAiApi Credential"}},"typeVersion":1.3},{"id":"dc993877-ee14-4c3c-be5f-d6c71f44d0d4","name":"Structured Investment Output","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[224,336],"parameters":{"schemaType":"manual","inputSchema":"{\n  \"type\": \"object\",\n  \"properties\": {\n    \"opportunities\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"location\": {\"type\": \"string\", \"description\": \"Specific submarket or neighborhood\"},\n          \"propertyType\": {\"type\": \"string\", \"description\": \"Type of property (e.g., single-family, multifamily, commercial)\"},\n          \"investmentScore\": {\"type\": \"number\", \"description\": \"Score from 0-100 indicating investment potential\"},\n          \"currentMedianPrice\": {\"type\": \"number\", \"description\": \"Current median property price\"},\n          \"predictedValueGrowth\": {\"type\": \"number\", \"description\": \"Predicted percentage growth over next 12 months\"},\n          \"keyDrivers\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}, \"description\": \"Main factors driving the opportunity\"},\n          \"risks\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}, \"description\": \"Potential risks to consider\"},\n          \"recommendedAction\": {\"type\": \"string\", \"description\": \"Specific action recommendation\"},\n          \"timeframe\": {\"type\": \"string\", \"description\": \"Recommended investment timeframe\"}\n        },\n        \"required\": [\"location\", \"propertyType\", \"investmentScore\", \"predictedValueGrowth\", \"keyDrivers\", \"recommendedAction\"]\n      }\n    },\n    \"marketSummary\": {\n      \"type\": \"string\",\n      \"description\": \"Overall market condition summary\"\n    },\n    \"topOpportunity\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"location\": {\"type\": \"string\"},\n        \"reason\": {\"type\": \"string\"}\n      }\n    }\n  },\n  \"required\": [\"opportunities\", \"marketSummary\"]\n}"},"typeVersion":1.3},{"id":"83a73f5a-3e44-4a5e-b4bd-0c6d35a30ccb","name":"Calculator Tool","type":"@n8n/n8n-nodes-langchain.toolCalculator","position":[-32,336],"parameters":{},"typeVersion":1},{"id":"fa5914ff-493d-49c7-a126-3ca72c77c10c","name":"Market Research Tool","type":"n8n-nodes-base.httpRequestTool","position":[96,336],"parameters":{"url":"<__PLACEHOLDER_VALUE__Additional market research API endpoint__>","options":{},"toolDescription":"Fetch additional real estate market data, property listings, or economic indicators from external APIs"},"typeVersion":4.3},{"id":"b8295ae9-075d-4a77-b196-ca814a01e9b1","name":"Check Investment Threshold","type":"n8n-nodes-base.if","position":[432,112],"parameters":{"options":{},"conditions":{"options":{"leftValue":"","caseSensitive":false,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"id-1","operator":{"type":"number","operation":"gte"},"leftValue":"={{ $('Investment Opportunity Analyzer').item.json.investmentScore }}","rightValue":"={{ $('Workflow Configuration').first().json.investmentThreshold }}"}]}},"typeVersion":2.3},{"id":"9124a6fe-1fd9-46d8-bf9f-fb27447748d0","name":"Email Acquisition Team","type":"n8n-nodes-base.gmail","position":[656,16],"webhookId":"efbb4be3-7f87-45c8-99fd-7c090140f524","parameters":{"sendTo":"={{ $('Workflow Configuration').first().json.acquisitionTeamEmail }}","message":"=<h2>Investment Opportunity Alert</h2>\n<p><strong>Market:</strong> {{ $('Workflow Configuration').first().json.targetMarket }}</p>\n<p><strong>Analysis Date:</strong> {{ $now.toFormat(\"yyyy-MM-dd HH:mm\") }}</p>\n\n<h3>Top Opportunity</h3>\n<p><strong>Location:</strong> {{ $json.topOpportunity.location }}</p>\n<p><strong>Reason:</strong> {{ $json.topOpportunity.reason }}</p>\n\n<h3>Market Summary</h3>\n<p>{{ $json.marketSummary }}</p>\n\n<h3>All Opportunities (Score ≥ {{ $('Workflow Configuration').first().json.investmentThreshold }})</h3>\n<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\">\n  <tr>\n    <th>Location</th>\n    <th>Property Type</th>\n    <th>Score</th>\n    <th>Predicted Growth</th>\n    <th>Action</th>\n  </tr>\n  {{ $json.opportunities.filter(o => o.investmentScore >= $('Workflow Configuration').first().json.investmentThreshold).map(o => `\n  <tr>\n    <td>${o.location}</td>\n    <td>${o.propertyType}</td>\n    <td>${o.investmentScore}</td>\n    <td>${o.predictedValueGrowth}%</td>\n    <td>${o.recommendedAction}</td>\n  </tr>\n  `).join(\"\") }}\n</table>\n\n<p><em>This is an automated alert from the Submarket Trend Analyzer.</em></p>","options":{},"subject":"=🚨 High-Priority Investment Opportunity Detected - {{ $json.topOpportunity.location }}"},"credentials":{"gmailOAuth2":{"id":"credential-id","name":"gmailOAuth2 Credential"}},"typeVersion":2.2},{"id":"6dc23772-a3de-4f13-995c-05a6f7f01e31","name":"Notify Investors on Slack","type":"n8n-nodes-base.slack","position":[656,208],"webhookId":"8064b597-449c-4a07-bc9c-2f98e9e01619","parameters":{"text":"=🚨 *Investment Opportunity Alert*\n\n*Market:* {{ $('Workflow Configuration').first().json.targetMarket }}\n*Analysis Date:* {{ $now.toFormat(\"yyyy-MM-dd HH:mm\") }}\n\n*Top Opportunity:* {{ $json.topOpportunity.location }}\n_{{ $json.topOpportunity.reason }}_\n\n*Market Summary:*\n{{ $json.marketSummary }}\n\n*High-Score Opportunities (≥{{ $('Workflow Configuration').first().json.investmentThreshold }}):*\n{{ $json.opportunities.filter(o => o.investmentScore >= $('Workflow Configuration').first().json.investmentThreshold).map(o => `• *${o.location}* (${o.propertyType}) - Score: ${o.investmentScore} | Growth: ${o.predictedValueGrowth}%`).join(\"\\n\") }}\n\n_Automated alert from Submarket Trend Analyzer_","select":"channel","channelId":{"__rl":true,"mode":"id","value":"={{ $('Workflow Configuration').first().json.slackChannel }}"},"otherOptions":{},"authentication":"oAuth2"},"credentials":{"slackOAuth2Api":{"id":"credential-id","name":"slackOAuth2Api Credential"}},"typeVersion":2.4},{"id":"6a44bc5a-4cec-4871-93ef-0adfa8ae0448","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[80,-464],"parameters":{"color":3,"width":736,"height":272,"content":"## Prerequisites\nMLS data access; public records database; demographic data provider; macroeconomic data source \n## Use Cases\nReal estate investment firms automating deal sourcing across markets; \n## Customization\nAdjust investment analysis criteria and thresholds \n## Benefits\nIdentifies investment opportunities automatically "},"typeVersion":1},{"id":"65de8b49-7446-489d-9271-85799eafdbbf","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-352,-416],"parameters":{"width":368,"height":224,"content":"## Setup Steps\n1. Connect MLS data provider, public records database, and demographic data source APIs.\n2. Configure OpenAI GPT-4 API for investment analysis and opportunity scoring.\n3. Set up investment calculator integration and ROI calculation parameters.\n4. Connect Gmail and Slack for team notifications; define investment thresholds."},"typeVersion":1},{"id":"7d2efe5c-9b4e-4bf4-a7e5-3e857b3d9658","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-1104,-416],"parameters":{"width":720,"height":208,"content":"## How It Works\nAutomates daily analysis of real estate market opportunities by aggregating MLS listings, public records, demographic data, and macroeconomic indicators, applying GPT-4 investment analysis, evaluating investment thresholds, and alerting investors to high-opportunity properties. Fetches MLS data, public property records, demographic profiles, and economic indicators simultaneously, consolidates datasets, applies GPT-4 for comprehensive investment analysis with ROI projections and risk assessment, calculates financial metrics using investment calculator, validates against investment thresholds, and notifies acquisition teams and investors via email and Slack. Targets real estate investors and property acquisition firms."},"typeVersion":1},{"id":"a26f2cef-eccd-4b67-a536-d425dc24ce8e","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[400,-160],"parameters":{"color":7,"width":480,"height":848,"content":"## Alert Acquisition Teams\nWhat: Sends investment alerts to teams via email and Slack with analysis summaries.\nWhy: Enables rapid response to qualifying opportunities."},"typeVersion":1},{"id":"66c53437-8816-44eb-8eba-5600399a95d1","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-208,-160],"parameters":{"color":7,"width":592,"height":848,"content":"## Evaluate Financial Metrics\nWhat: Calculates cap rates, cash-on-cash returns, and investment thresholds \nWhy: Enables objective, quantitative screening of investment properties"},"typeVersion":1},{"id":"c40912fc-ff54-47ca-9bf5-c117ec6e3212","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-1104,-160],"parameters":{"color":7,"width":864,"height":848,"content":"## Aggregate Market Data\nWhat: Fetches MLS listings, public records, demographics, and macroeconomic .\nWhy: Provides comprehensive market context for data-driven investment decisions."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"availableInMCP":false,"executionOrder":"v1"},"versionId":"5cc62205-275e-4c26-a5bd-92ca1f66dc5f","connections":{"OpenAI GPT-4":{"ai_languageModel":[[{"node":"Investment Opportunity Analyzer","type":"ai_languageModel","index":0}]]},"Fetch MLS Data":{"main":[[{"node":"Aggregate All Data Sources","type":"main","index":0}]]},"Calculator Tool":{"ai_tool":[[{"node":"Investment Opportunity Analyzer","type":"ai_tool","index":0}]]},"Fetch Public Records":{"main":[[{"node":"Aggregate All Data Sources","type":"main","index":0}]]},"Market Research Tool":{"ai_tool":[[{"node":"Investment Opportunity Analyzer","type":"ai_tool","index":0}]]},"Fetch Demographic Data":{"main":[[{"node":"Aggregate All Data Sources","type":"main","index":0}]]},"Workflow Configuration":{"main":[[{"node":"Fetch MLS Data","type":"main","index":0},{"node":"Fetch Public Records","type":"main","index":0},{"node":"Fetch Demographic Data","type":"main","index":0},{"node":"Fetch Macroeconomic Data","type":"main","index":0}]]},"Daily Analysis Schedule":{"main":[[{"node":"Workflow Configuration","type":"main","index":0}]]},"Fetch Macroeconomic Data":{"main":[[{"node":"Aggregate All Data Sources","type":"main","index":0}]]},"Aggregate All Data Sources":{"main":[[{"node":"Investment Opportunity Analyzer","type":"main","index":0}]]},"Check Investment Threshold":{"main":[[{"node":"Email Acquisition Team","type":"main","index":0},{"node":"Notify Investors on Slack","type":"main","index":0}]]},"Structured Investment Output":{"ai_outputParser":[[{"node":"Investment Opportunity Analyzer","type":"ai_outputParser","index":0}]]},"Investment Opportunity Analyzer":{"main":[[{"node":"Check Investment Threshold","type":"main","index":0}]]}}}