{
  "name": "Real Estate Inactive Lead Reactivation",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "ca3395c3-a152-4aff-95ab-4838bdf7f294",
      "name": "Daily Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "method": "GET",
        "url": "={{ $env.CRM_INACTIVE_LEADS_ENDPOINT }}",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "inactive_days",
              "value": "3"
            }
          ]
        },
        "options": {}
      },
      "id": "3c81555b-3367-4156-839d-2453bf291770",
      "name": "Get Inactive Leads",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        260,
        0
      ]
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "069247b9-3fb0-4cbd-9e1c-8dc209d9555b",
      "name": "Loop Leads",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 2,
      "position": [
        520,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.WHATSAPP_SEND_ENDPOINT }}",
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{ JSON.stringify({to:$json.phone,template:$env.REACTIVATION_TEMPLATE}) }}",
        "options": {}
      },
      "id": "121a4bd5-c538-4cff-a190-ce481720788a",
      "name": "Send Follow Up",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        780,
        0
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "={{ $env.CRM_ACTIVITY_ENDPOINT }}",
        "sendBody": true,
        "contentType": "raw",
        "rawContentType": "application/json",
        "body": "={{ JSON.stringify({lead_id:$json.id,type:\"reactivation_sent\"}) }}",
        "options": {}
      },
      "id": "32e62462-e455-4cd2-9894-052a3530a111",
      "name": "Record Touch",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 2,
      "position": [
        1040,
        0
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Daily Schedule": {
      "main": [
        [
          {
            "node": "Get Inactive Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Inactive Leads": {
      "main": [
        [
          {
            "node": "Loop Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Leads": {
      "main": [
        [
          {
            "node": "Send Follow Up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Follow Up": {
      "main": [
        [
          {
            "node": "Record Touch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9c08787f-2c04-4b24-9f60-6740912a672f",
  "meta": {
    "templateCredsSetupCompleted": false,
    "kumoDraftAsset": true,
    "credentialPlaceholdersRequired": true
  },
  "tags": []
}