{
  "name": "Lead Capture - Form to CRM",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-capture",
        "responseMode": "onReceived"
      },
      "id": "5482066a-4418-4af3-82a2-511aed0944d6",
      "name": "Form Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        260,
        300
      ],
      "notes": "Point your site form here."
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1cd2b461-1b29-44d7-97d7-2545729c6b5b",
              "name": "email",
              "value": "={{ $json.body.email }}",
              "type": "string"
            },
            {
              "id": "cf203e63-febc-4d76-bb90-ddba89aa9471",
              "name": "name",
              "value": "={{ $json.body.name }}",
              "type": "string"
            },
            {
              "id": "621270ae-0c90-422f-9680-1e35f45030ff",
              "name": "company",
              "value": "={{ $json.body.company }}",
              "type": "string"
            }
          ]
        }
      },
      "id": "f12057c5-89a3-4782-9314-3559d6867ad0",
      "name": "Normalize Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        560,
        300
      ]
    },
    {
      "parameters": {
        "resource": "contact",
        "operation": "upsert"
      },
      "id": "76dc32cd-6477-4ca2-84b9-c12e61d32f95",
      "name": "Create/Update Contact",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2.1,
      "position": [
        860,
        300
      ],
      "notes": "Assign HubSpot credentials on import."
    },
    {
      "parameters": {
        "conditions": {
          "conditions": [
            {
              "id": "1cb378fb-bba8-48cf-9dfb-97a1843e8d22",
              "leftValue": "={{ $json.score }}",
              "rightValue": 50,
              "operator": {
                "type": "number",
                "operation": "gte"
              }
            }
          ]
        }
      },
      "id": "707cd943-2f2f-49b9-aa92-7bdc02189181",
      "name": "Score >= 50?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1160,
        300
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "text": "=New hot lead: {{ $json.name }} ({{ $json.company }})"
      },
      "id": "a7293415-d7da-4dfd-810c-21078befe729",
      "name": "Alert Sales",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        260,
        520
      ],
      "notes": "Assign Slack credentials."
    }
  ],
  "connections": {
    "Form Webhook": {
      "main": [
        [
          {
            "node": "Normalize Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Fields": {
      "main": [
        [
          {
            "node": "Create/Update Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create/Update Contact": {
      "main": [
        [
          {
            "node": "Score >= 50?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score >= 50?": {
      "main": [
        [
          {
            "node": "Alert Sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
