{
  "name": "Enrich Lead Profile (v2)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "enrich-lead-v2",
        "options": {}
      },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://api.hunter.io/v2/email-finder?domain={{$json.body.email.split('@')[1]}}&api_key=YOUR_KEY",
        "options": {}
      },
      "name": "Fetch Social Data",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        450,
        300
      ],
      "notes": "Simulates fetching data from Hunter/Clearbit"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gemini-1.5-flash",
          "mode": "list"
        },
        "prompt": "=Based on this raw data: {{$json.data}}, write a short 2-sentence summary of the lead's professional background and likely income bracket for a real estate CRM.",
        "options": {}
      },
      "name": "Gemini Summarizer",
      "type": "n8n-nodes-base.googleGeminiChat",
      "typeVersion": 1,
      "position": [
        650,
        300
      ],
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "baseId": "appYOURBASEID",
        "table": "Leads",
        "id": "={{$node[\"Webhook\"].json.body.leadId}}",
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "AI_Summary_Text": "={{$json.output}}",
            "Tags": "Enriched, Verified",
            "Status": "Nurture"
          }
        }
      },
      "name": "Update Airtable",
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 1,
      "position": [
        850,
        300
      ],
      "credentials": {
        "airtableApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Fetch Social Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Social Data": {
      "main": [
        [
          {
            "node": "Gemini Summarizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Summarizer": {
      "main": [
        [
          {
            "node": "Update Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}