{
  "name": "Luda AI Starter Pack - New Lead Notifier",
  "nodes": [
    {
      "parameters": {
        "content": "## New Lead Notifier\n\nWatches for a form/webhook submission and sends you a notification the moment it happens.\n\n**Before you activate:**\n1. Replace the webhook path below if you want a custom URL.\n2. Point your form tool (or your own site's form) at this webhook's Production URL.\n3. Choose Slack OR Gmail below (delete the one you don't use, or keep both).\n4. Submit one test entry and check the 'Format Lead Data' node's output to confirm the field names match your form.\n\nMost forms send fields as 'name' / 'email' / 'message' but yours may differ. Adjust the expressions in 'Format Lead Data' to match.",
        "height": 340,
        "width": 380
      },
      "id": "sticky-1",
      "name": "Setup Notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-380, -180]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "new-lead-notifier",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "node-webhook",
      "name": "Lead Form Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [-160, 0],
      "webhookId": "new-lead-notifier"
    },
    {
      "parameters": {
        "mode": "manual",
        "assignments": {
          "assignments": [
            {
              "id": "1",
              "name": "leadName",
              "value": "={{ $json.body.name || $json.body.Name || 'Unknown' }}",
              "type": "string"
            },
            {
              "id": "2",
              "name": "leadEmail",
              "value": "={{ $json.body.email || $json.body.Email || 'Unknown' }}",
              "type": "string"
            },
            {
              "id": "3",
              "name": "leadMessage",
              "value": "={{ $json.body.message || $json.body.Message || '' }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": false
      },
      "id": "node-set",
      "name": "Format Lead Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [60, 0]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultName": "new-leads"
        },
        "messageType": "text",
        "text": "=New lead just came in:\n\n*Name:* {{ $json.leadName }}\n*Email:* {{ $json.leadEmail }}\n*Message:* {{ $json.leadMessage }}"
      },
      "id": "node-slack",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.5,
      "position": [300, -100],
      "credentials": {
        "slackApi": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Your Slack account"
        }
      }
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "send",
        "sendTo": "you@example.com",
        "subject": "=New lead: {{ $json.leadName }}",
        "emailType": "html",
        "message": "=<p><strong>Name:</strong> {{ $json.leadName }}</p><p><strong>Email:</strong> {{ $json.leadEmail }}</p><p><strong>Message:</strong> {{ $json.leadMessage }}</p>",
        "options": {}
      },
      "id": "node-gmail",
      "name": "Notify Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [300, 100],
      "credentials": {
        "gmailOAuth2": {
          "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID",
          "name": "Your Gmail account"
        }
      }
    }
  ],
  "connections": {
    "Lead Form Webhook": {
      "main": [
        [
          {
            "node": "Format Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Lead Data": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  }
}
