{
  "name": "Webhook to Slack and Google Sheets",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "customer-webhook",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "f8b6c8e0-7d4a-4c5b-9e1f-2a3b4c5d6e7f",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "customerEmail",
              "value": "={{ $json.email || $json.customer_email || $json.customerEmail }}"
            },
            {
              "name": "timestamp",
              "value": "={{ $now }}"
            },
            {
              "name": "source",
              "value": "webhook"
            },
            {
              "name": "fullPayload",
              "value": "={{ JSON.stringify($json) }}"
            }
          ]
        },
        "options": {}
      },
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Extract Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "general",
          "mode": "name"
        },
        "text": "=\ud83d\udce7 New customer email received: {{ $json.customerEmail }}\n\n\u23f0 Time: {{ $json.timestamp }}\n\ud83d\udcc4 Source: {{ $json.source }}",
        "otherOptions": {}
      },
      "id": "b2c3d4e5-f6g7-8901-bcde-f23456789012",
      "name": "Send Slack Notification",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.1,
      "position": [
        680,
        200
      ]
    },
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "value": "",
          "mode": "list"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Email": "={{ $json.customerEmail }}",
            "Timestamp": "={{ $json.timestamp }}",
            "Source": "={{ $json.source }}",
            "Full_Payload": "={{ $json.fullPayload }}"
          },
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      },
      "id": "c3d4e5f6-g7h8-9012-cdef-345678901234",
      "name": "Store in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.4,
      "position": [
        680,
        400
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={\"status\":\"success\",\"message\":\"Customer data processed successfully\"}"
      },
      "id": "d4e5f6g7-h8i9-0123-defg-456789012345",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        900,
        300
      ]
    },
    {
      "parameters": {
        "content": "## Webhook Trigger\n\nThis node receives POST requests at the /customer-webhook endpoint.\n\nExpected payload format:\n```json\n{\n  \"email\": \"customer@example.com\",\n  \"name\": \"John Doe\"\n}\n```\n\nSupports multiple email field names:\n- email\n- customer_email\n- customerEmail",
        "height": 160,
        "width": 280,
        "color": 4
      },
      "id": "e5f6g7h8-i9j0-1234-efgh-567890123456",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        40,
        180
      ]
    },
    {
      "parameters": {
        "content": "## Data Processing\n\nExtracts customer email from webhook payload and prepares data for downstream nodes.\n\nOutputs:\n- customerEmail\n- timestamp\n- source\n- fullPayload (JSON string)",
        "height": 140,
        "width": 260,
        "color": 5
      },
      "id": "f6g7h8i9-j0k1-2345-fghi-678901234567",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        380,
        140
      ]
    },
    {
      "parameters": {
        "content": "## Slack Integration\n\n\u26a0\ufe0f Setup Required:\n- Configure Slack credentials\n- Update channel name/ID\n- Customize notification message\n\nSends formatted notification with customer email and timestamp.",
        "height": 120,
        "width": 240,
        "color": 6
      },
      "id": "g7h8i9j0-k1l2-3456-ghij-789012345678",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        620,
        60
      ]
    },
    {
      "parameters": {
        "content": "## Google Sheets Storage\n\n\u26a0\ufe0f Setup Required:\n- Configure Google Sheets credentials\n- Select your spreadsheet\n- Verify column mappings\n\nStores customer webhook data for tracking and analytics.",
        "height": 140,
        "width": 260,
        "color": 7
      },
      "id": "h8i9j0k1-l2m3-4567-hijk-890123456789",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        620,
        500
      ]
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Extract Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data": {
      "main": [
        [
          {
            "node": "Send Slack Notification",
            "type": "main",
            "index": 0
          },
          {
            "node": "Store in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Notification": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store in Google Sheets": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "tags": []
}