{
  "name": "Capture leads from a web form into a spreadsheet",
  "active": false,
  "isArchived": false,
  "pinData": {},
  "versionId": "00000000-0000-0000-0000-000000000001",
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "YOUR_N8N_INSTANCE_ID"
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/London",
    "callerPolicy": "workflowsFromSameOwner"
  },
  "tags": [],
  "nodes": [
    {
      "id": "a1e1c001-0001-4000-8000-000000000001",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -280,
        160
      ],
      "parameters": {
        "width": 320,
        "height": 460,
        "color": 7,
        "content": "## Setup (placeholders only)\n\n1. Replace `YOUR_SPREADSHEET_ID` in the Google Sheets node (the long id in the sheet URL).\n2. Create a tab named `Leads` with headers: `name`, `email`, `message`, `source`, `received_at`.\n3. Attach your own Google Sheets credential. Do not paste real keys into this file.\n4. Point your form at this webhook path: `new-lead` (POST).\n5. Test, then publish the workflow when you are ready.\n\nDraft template for Kaizen Flourishing. Use tech. Stay human."
      }
    },
    {
      "id": "a1e1c001-0001-4000-8000-000000000002",
      "name": "New lead form",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        120,
        300
      ],
      "webhookId": "YOUR_WEBHOOK_ID",
      "parameters": {
        "httpMethod": "POST",
        "path": "new-lead",
        "responseMode": "onReceived",
        "options": {}
      }
    },
    {
      "id": "a1e1c001-0001-4000-8000-000000000003",
      "name": "Tidy fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        360,
        300
      ],
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1e1c001-0001-4000-8000-0000000000a1",
              "name": "name",
              "value": "={{ $json.body && $json.body.name ? $json.body.name : $json.name }}",
              "type": "string"
            },
            {
              "id": "a1e1c001-0001-4000-8000-0000000000a2",
              "name": "email",
              "value": "={{ $json.body && $json.body.email ? $json.body.email : $json.email }}",
              "type": "string"
            },
            {
              "id": "a1e1c001-0001-4000-8000-0000000000a3",
              "name": "message",
              "value": "={{ $json.body && $json.body.message ? $json.body.message : $json.message }}",
              "type": "string"
            },
            {
              "id": "a1e1c001-0001-4000-8000-0000000000a4",
              "name": "source",
              "value": "={{ $json.body && $json.body.source ? $json.body.source : ($json.source || 'website') }}",
              "type": "string"
            },
            {
              "id": "a1e1c001-0001-4000-8000-0000000000a5",
              "name": "received_at",
              "value": "={{ $now.toISO() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "a1e1c001-0001-4000-8000-000000000004",
      "name": "Append to Leads sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        620,
        300
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets account (placeholder)"
        }
      },
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Leads",
          "mode": "name"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "name": "={{ $json.name }}",
            "email": "={{ $json.email }}",
            "message": "={{ $json.message }}",
            "source": "={{ $json.source }}",
            "received_at": "={{ $json.received_at }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "email",
              "displayName": "email",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "message",
              "displayName": "message",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "source",
              "displayName": "source",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "received_at",
              "displayName": "received_at",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "New lead form": {
      "main": [
        [
          {
            "node": "Tidy fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tidy fields": {
      "main": [
        [
          {
            "node": "Append to Leads sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
