{
  "id": "lr7vWq5jc7SDxGSp",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Real Estate Deal Analyzer",
  "tags": [],
  "nodes": [
    {
      "id": "6001c37b-8b38-44f8-bcfc-161304c87850",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -512
      ],
      "parameters": {
        "width": 528,
        "height": 720,
        "content": "## Real Estate Deal Analyzer\n## How it works\n\nThis workflow automates property investment analysis using Google Sheets and AI. When a new property entry is added, it calculates key metrics like annual rent, profit, rental yield and ROI automatically. It then checks for duplicate entries to ensure the same property isn\u2019t processed twice. If the entry is unique, AI analyzes the deal and classifies it as good, average or risky, along with a short summary of insights. For duplicate entries, the workflow skips the analysis and marks them accordingly to keep the data clean and organized. Finally, the sheet is updated by marking each row as processed and tagging duplicates, ensuring every property is handled only once without errors.\n\n## Setup Steps\n\n## 1. Connect Google Sheets\nSelect your input sheet where property data will be added and processed.\n\n## 2. Add OpenAI Credentials\nConfigure OpenAI to enable AI-based property analysis and classification.\n\n## 3. Connect Gmail\nSet up Gmail to send summary emails with investment insights.\n\n## 4. Add Property Data\nEnter property details in the sheet to trigger the workflow automatically."
      },
      "typeVersion": 1
    },
    {
      "id": "ae3eef84-170d-4dbb-a21a-93a0e217c034",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 646,
        "height": 352,
        "content": "## Input & Trigger\n\nThe workflow is triggered when a new property entry is added to Google Sheets. It processes only unprocessed rows, ensuring that previously handled data is ignored and preventing duplicate execution."
      },
      "typeVersion": 1
    },
    {
      "id": "826e97cf-a864-40fa-b108-fb35d085e084",
      "name": "Prepare Property Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -128,
        352
      ],
      "parameters": {
        "options": {
          "dotNotation": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "f5217962-7ea8-4bc0-ac73-65bad49daad2",
              "name": "price",
              "type": "number",
              "value": "={{ $json.price }}"
            },
            {
              "id": "2c9891b6-c5aa-40ab-8c8a-dd924fb47608",
              "name": "monthly_rent",
              "type": "number",
              "value": "={{ $json.monthly_rent }}"
            },
            {
              "id": "762841ca-46b3-4105-8c00-71f21e52ba9d",
              "name": "annual_expenses",
              "type": "number",
              "value": "={{ $json.annual_expenses }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "a369faee-a586-4498-b760-80a7d623b5cf",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -176,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 352,
        "content": "## Financial Calculations\n\nKey investment metrics such as annual rent, profit, rental yield and ROI are automatically calculated using the provided property data. These calculations form the foundation for evaluating the property's financial performance."
      },
      "typeVersion": 1
    },
    {
      "id": "e315de5c-20ec-4e85-bd6b-e40c9e96ef01",
      "name": "Calculate ROI & Yield",
      "type": "n8n-nodes-base.code",
      "position": [
        112,
        352
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const price = +$json.price;\nconst rent = +$json.monthly_rent;\nconst expenses = +$json.annual_expenses;\n\nconst annualRent = rent * 12;\nconst profit = annualRent - expenses;\n\nconst rentalYield = (annualRent / price) * 100;\nconst roi = (profit / price) * 100;\n\nreturn {\n  json: {\n    ...$json,\n    annual_rent: annualRent,\n    profit: profit,\n    rental_yield: Number(rentalYield.toFixed(2)),\n    roi: Number(roi.toFixed(2))\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "e3bc663c-651f-4aa1-a09a-6f13c6cbe0fc",
      "name": "AI - Investment Recommendation",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1200,
        432
      ],
      "parameters": {
        "text": "=You are a real estate investment expert.\n\nAnalyze the following property:\n\nPrice: {{$json[\"price\"]}}\nAnnual Rent: {{$json[\"annual_rent\"]}}\nRental Yield: {{$json[\"rental_yield\"]}}%\nROI: {{$json[\"roi\"]}}%\n\nRules:\n- ROI > 8% \u2192 BUY\n- ROI between 5% and 8% \u2192 HOLD\n- ROI < 5% \u2192 AVOID\n\nReturn ONLY JSON:\n{\n  \"decision\": \"BUY / HOLD / AVOID\",\n  \"recommendation\": \"Good / Average / Bad\",\n  \"reason\": \"Short explanation\",\n  \"risk_level\": \"Low / Medium / High\",\n  \"improvement_suggestion\": \"How to improve ROI\"\n}",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "d7d1ef8d-57f1-4ac0-b6a1-7d62e2efdc04",
      "name": "Groq Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        1200,
        608
      ],
      "parameters": {
        "model": "openai/gpt-oss-20b",
        "options": {}
      },
      "credentials": {
        "groqApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d611c5d5-626f-4767-b1a8-bdf5cdbfc6b3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1792,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 304,
        "content": "## Final Update & Notification\n\nAfter processing, the workflow updates the sheet by marking entries as processed and identifying duplicates. A summary email with key insights is also sent to keep users informed."
      },
      "typeVersion": 1
    },
    {
      "id": "5cd6c7cb-f871-4b21-b8ba-c21b130f725f",
      "name": "Check existing details",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        416,
        352
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 427069001,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=427069001",
          "cachedResultName": "estate-history"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7,
      "alwaysOutputData": true
    },
    {
      "id": "7dfc60ce-1dfb-49d2-8810-e14d3ade9b35",
      "name": "duplicate property email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1232,
        80
      ],
      "parameters": {
        "message": "Hi,  This property has already been analyzed earlier.  Please check your records before adding again.  Thanks, Real Estate Analyzer",
        "options": {},
        "subject": "=Duplicate Property Alert",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1642e8cd-1581-43f8-8988-f77eed1620d7",
      "name": "investment report email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2080,
        432
      ],
      "parameters": {
        "sendTo": "=",
        "message": "=Hi,\n\nHere is your property investment analysis:\n\n Property Details:\n- Price: {{ $('Calculate ROI & Yield').first().json.price }}\n- Annual Rent: {{ $('Calculate ROI & Yield').first().json.annual_rent }}\n- Rental Yield: {{ $('Calculate ROI & Yield').first().json.rental_yield }}%\n- ROI: {{ $('Calculate ROI & Yield').first().json.roi }}%\n\n AI Recommendation:\n\n- Decision:\n{{ \n(() => {\n  const clean = $('AI - Investment Recommendation').first().json.output.replace(/```json|```/g, '').trim();\n  const data = JSON.parse(clean);\n  return data.decision === \"BUY\" ? \" BUY\" :\n         data.decision === \"HOLD\" ? \" HOLD\" :\n         \" AVOID\";\n})()\n}}\n\n- Recommendation:\n{{ \n(() => {\n  const clean = $('AI - Investment Recommendation').first().json.output.replace(/```json|```/g, '').trim();\n  return JSON.parse(clean).recommendation;\n})()\n}}\n\n- Reason:\n{{ \n(() => {\n  const clean = $('AI - Investment Recommendation').first().json.output.replace(/```json|```/g, '').trim();\n  return JSON.parse(clean).reason;\n})()\n}}\n\n- Risk Level:\n{{ \n(() => {\n  const clean = $('AI - Investment Recommendation').first().json.output.replace(/```json|```/g, '').trim();\n  return JSON.parse(clean).risk_level;\n})()\n}}\n\n- Improvement Suggestion:\n{{ \n(() => {\n  const clean = $('AI - Investment Recommendation').first().json.output.replace(/```json|```/g, '').trim();\n  return JSON.parse(clean).improvement_suggestion;\n})()\n}}\n\nThanks,  \nReal Estate Analyzer",
        "options": {},
        "subject": "Property Investment Analysis Report",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b4250533-d938-42c2-8869-9f4549188dea",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        192
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 352,
        "content": "## Duplicate Detection\n\nThe system checks existing records to identify duplicate entries based on property data. If a duplicate is found, it is flagged to prevent redundant processing and maintain clean, reliable data."
      },
      "typeVersion": 1
    },
    {
      "id": "5fc4a481-3d73-4107-afed-86d3a43ebf54",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 416,
        "content": "## AI-Based Evaluation\n\nFor valid entries, an AI model analyzes the calculated metrics and classifies the investment as good, average or high-risk. This provides quick and actionable insights for decision-making."
      },
      "typeVersion": 1
    },
    {
      "id": "61d9a130-dac5-48ac-8b91-5bd5af04b974",
      "name": "check duplicate",
      "type": "n8n-nodes-base.code",
      "position": [
        656,
        352
      ],
      "parameters": {
        "jsCode": "const current = $items(\"Calculate ROI & Yield\")[0].json;\nconst currentPrice = String(current.price).trim();\n\n// get ALL rows from history node\nconst history = $items(\"Check existing details\");\n\n// check duplicate\nconst isDuplicate = history.some(item => {\n  return String(item.json.Price).trim() === currentPrice;\n});\n\nreturn [{\n  json: {\n    ...current,\n    is_duplicate: isDuplicate\n  }\n}];"
      },
      "typeVersion": 2,
      "alwaysOutputData": false
    },
    {
      "id": "da8844e9-482e-40f0-ad28-6164989f0a4d",
      "name": "single item",
      "type": "n8n-nodes-base.code",
      "position": [
        1552,
        432
      ],
      "parameters": {
        "jsCode": "const aiData = $json;\nconst original = $items(\"Calculate ROI & Yield\")[0].json;\n\nreturn [{\n  json: {\n    ...original,\n    ...aiData\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "de678a45-b172-4ccc-9374-8614b9ce0625",
      "name": "check already processed",
      "type": "n8n-nodes-base.if",
      "position": [
        -416,
        352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "562b86d3-225a-4fac-9e22-8d977edf0a48",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.Processed }}",
              "rightValue": "No"
            },
            {
              "id": "35529cb5-9c78-4efc-a968-3af1ab8f8092",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              },
              "leftValue": "={{ $json.Duplicate }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "ade2b4bb-f95e-405d-a355-11dc3b5f1cdd",
      "name": "processed updated yes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2336,
        432
      ],
      "parameters": {
        "columns": {
          "value": {
            "price": "={{ $('Save Deal History').item.json.Price }}",
            "Processed": "Yes"
          },
          "schema": [
            {
              "id": "price",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "monthly_rent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "monthly_rent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "annual_expenses",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "annual_expenses",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Processed",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Processed",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "price"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 958932403,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=958932403",
          "cachedResultName": "real estate"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a7c61dc7-8ed4-4a92-a182-0fa013ea7d53",
      "name": "duplicate yes",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1680,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Duplicate": "Yes",
            "row_number": "={{ $json.row_number }}"
          },
          "schema": [
            {
              "id": "price",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "monthly_rent",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "monthly_rent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "annual_expenses",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "annual_expenses",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Processed",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "Processed",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Duplicate",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Duplicate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 958932403,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=958932403",
          "cachedResultName": "real estate"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "6b6daae1-4a0a-4406-82a6-8b6f8712a39c",
      "name": "New property entry",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -688,
        352
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 958932403,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=958932403",
          "cachedResultName": "real estate"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "4499641a-e712-4f04-ad96-bacc91c66d1e",
      "name": "If Duplicate",
      "type": "n8n-nodes-base.if",
      "position": [
        896,
        352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ba122881-7b6a-4905-9621-714e85ef1daf",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_duplicate }}",
              "rightValue": false
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "330e6983-b1e5-4226-943c-a9408055c790",
      "name": "Save Deal History",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1840,
        432
      ],
      "parameters": {
        "columns": {
          "value": {
            "ROI": "={{ $json.roi }}",
            "Date": "={{new Date().toLocaleDateString()}}",
            "Price": "={{$json[\"price\"]}}",
            "Decision": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, '').trim()).decision }}",
            "Risk Level": "={{ JSON.parse($json[\"output\"].replace(/```json|```/g, '').trim()).risk_level }}",
            "Annual Rent": "={{ $json.annual_rent }}"
          },
          "schema": [
            {
              "id": "Price",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Price",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Annual Rent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Annual Rent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ROI",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "ROI",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Decision",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Decision",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Risk Level",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Risk Level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 427069001,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=427069001",
          "cachedResultName": "estate-history"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "c4da1686-f24a-4af4-a282-7809e4e04a21",
      "name": "Get all rows",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1472,
        80
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "No",
              "lookupColumn": "Processed"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 958932403,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit#gid=958932403",
          "cachedResultName": "real estate"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Z9JlUPMr00U9k385p64yZbj4VKMDcQVd9AKa6FVXE60/edit?usp=drivesdk",
          "cachedResultName": "n8n meeting notes automation"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "445f4b1c-27c3-4e45-a18f-c2fdb706db83",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 352,
        "content": "## Duplicate Handling\n\nWhen a duplicate entry is detected, a notification email is sent and existing rows are retrieved. The workflow updates the relevant unprocessed entry by marking it as duplicate and setting it as processed, ensuring accurate tracking and preventing reprocessing."
      },
      "typeVersion": 1
    },
    {
      "id": "e2ebcc23-13c2-4616-a987-e95de5237756",
      "name": "starting trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        352
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "6b8fee23-d13e-44b9-ae7e-4e70a3a91288",
  "connections": {
    "single item": {
      "main": [
        [
          {
            "node": "Save Deal History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all rows": {
      "main": [
        [
          {
            "node": "duplicate yes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Duplicate": {
      "main": [
        [
          {
            "node": "duplicate property email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI - Investment Recommendation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "duplicate yes": {
      "main": [
        []
      ]
    },
    "Groq Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI - Investment Recommendation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "check duplicate": {
      "main": [
        [
          {
            "node": "If Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "starting trigger": {
      "main": [
        [
          {
            "node": "New property entry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Deal History": {
      "main": [
        [
          {
            "node": "investment report email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "New property entry": {
      "main": [
        [
          {
            "node": "check already processed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate ROI & Yield": {
      "main": [
        [
          {
            "node": "Check existing details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Property Data": {
      "main": [
        [
          {
            "node": "Calculate ROI & Yield",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check existing details": {
      "main": [
        [
          {
            "node": "check duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check already processed": {
      "main": [
        [
          {
            "node": "Prepare Property Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "investment report email": {
      "main": [
        [
          {
            "node": "processed updated yes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "duplicate property email": {
      "main": [
        [
          {
            "node": "Get all rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI - Investment Recommendation": {
      "main": [
        [
          {
            "node": "single item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}