{
  "nodes": [
    {
      "parameters": {
        "path": "contact-form",
        "method": "POST"
      },
      "name": "Contact Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return [{ json: { name: $json.name || '', email: $json.email || '', message: $json.message || '', submittedAt: new Date().toISOString() } }];"
      },
      "name": "Prepare Row",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        500,
        300
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "sheetId": "YOUR_SHEET_ID",
        "range": "Submissions!A:D"
      },
      "name": "Append to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 2,
      "position": [
        800,
        300
      ]
    },
    {
      "parameters": {
        "fromEmail": "noreply@example.com",
        "toEmail": "admin@example.com",
        "subject": "New Contact Form Submission",
        "text": "Name: {{$json.name}}\nEmail: {{$json.email}}\nMessage: {{$json.message}}"
      },
      "name": "Notify Admin",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        1100,
        300
      ]
    }
  ],
  "connections": {
    "Contact Webhook": {
      "main": [
        [
          {
            "node": "Prepare Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Row": {
      "main": [
        [
          {
            "node": "Append to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append to Sheet": {
      "main": [
        [
          {
            "node": "Notify Admin",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}