{
  "name": "🗲 Creating a Secure Webhook - MUST HAVE",
  "nodes": [
    {
      "id": "d776b55a-65fe-4e12-9071-58911fa9c5cc",
      "name": "Registered API Keys",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        528
      ]
    },
    {
      "id": "d20bdc9b-3020-4fa3-88c3-b6c3d5a585b2",
      "name": "API Key Identified",
      "type": "n8n-nodes-base.if",
      "position": [
        480,
        0
      ]
    },
    {
      "id": "73ee78a3-9e0c-4f24-a05f-f860dc8fda88",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -256
      ],
      "parameters": {
        "width": 300,
        "height": 420,
        "content": "### ⚙️ Key Verification Logic\n\nThis node takes the API key from the incoming request and asks our \"database\" (the second webhook) if it's valid.\n\n**In a real-world scenario, you would replace this and"
      }
    },
    {
      "id": "b34ad49e-351a-4f42-8336-d4300d442c50",
      "name": "Respond to Webhook (success)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        704,
        -96
      ]
    },
    {
      "id": "2da5855a-d54a-43f1-b4c5-3ff510a10bd3",
      "name": "Respond to Webhook (unauthorized)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        704,
        112
      ]
    },
    {
      "id": "0b56b704-4dd6-490a-9998-f8eb2ef0a00e",
      "name": "Secured Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -64,
        0
      ]
    },
    {
      "id": "7308010d-5050-4e5e-8c8b-c57194b88516",
      "name": "Check API Key",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        0
      ]
    },
    {
      "id": "88070916-27b2-42fb-8005-970b6d5a08fc",
      "name": "Find API Key",
      "type": "n8n-nodes-base.filter",
      "position": [
        608,
        528
      ]
    },
    {
      "id": "2a06aaa0-1ac3-4750-9770-6eec7e9310a9",
      "name": "Get API Key",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -64,
        528
      ]
    },
    {
      "id": "3803f9b8-deec-4262-a76b-bfd72d572493",
      "name": "Split Out Users",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        384,
        528
      ]
    },
    {
      "id": "d81a0dd5-9c90-4fee-a7ec-46e9aabb53a3",
      "name": "Test Secure Webhook",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -416,
        0
      ]
    },
    {
      "id": "ca63d58d-4683-4dbc-bd1e-6fd2724152f7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -176
      ],
      "parameters": {
        "width": 600,
        "height": 340,
        "content": "### ▶️ Public Endpoint & Tester\n\n*   **`Secured Webhook`**: This is your public-facing endpoint. It listens for requests containing an `x-api-key` header.\n*   **`Test Secure Webhook`**: Use this node "
      }
    },
    {
      "id": "14afef1c-6a99-46f5-96e1-c536a9afde69",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        320
      ],
      "parameters": {
        "width": 1020,
        "height": 380,
        "content": "### 📦 Mock Database\n\nThese nodes simulate a database of users and their API keys.\n\n*   **`Get API Key`**: A private webhook that receives a key and checks it against the list.\n*   **`Registered API Ke"
      }
    },
    {
      "id": "12074ea9-65a9-4696-8c87-c77842f44467",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -304
      ],
      "parameters": {
        "width": 440,
        "height": 580,
        "content": "#### ✅ Gatekeeper\n\nThis IF node checks the result from our \"database\".\n\n*   If a user was found for the given API key, it proceeds to the **success** response.\n*   If not, it sends a **401 Unauthorize"
      }
    },
    {
      "id": "5a0e2e8a-74df-403d-94ef-d5b8b5a0bd13",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -416
      ],
      "parameters": {
        "width": 540,
        "height": 1104,
        "content": "## Was this helpful? Let me know!\n[![clic](https://supastudio.ia2s.app/storage/v1/object/public/assets/n8n/clic_down_lucas.gif)](https://workflows.ac/form)\n\nI really hope this tutorial helped you unde"
      }
    },
    {
      "id": "bea2b0bd-4175-4e51-9479-7b996ae786e2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -176
      ],
      "parameters": {
        "width": 400,
        "height": 800,
        "content": "## 🛡️ Secure Webhook with API Key Verification\n\nStop unauthorized access to your workflows by implementing a robust \"Gatekeeper\" system that verifies API keys against a database before processing any "
      }
    }
  ],
  "connections": {
    "Get API Key": {
      "main": [
        [
          {
            "node": "Registered API Keys",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check API Key": {
      "main": [
        [
          {
            "node": "API Key Identified",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Secured Webhook": {
      "main": [
        [
          {
            "node": "Check API Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Users": {
      "main": [
        [
          {
            "node": "Find API Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API Key Identified": {
      "main": [
        [
          {
            "node": "Respond to Webhook (success)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Respond to Webhook (unauthorized)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Registered API Keys": {
      "main": [
        [
          {
            "node": "Split Out Users",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}