{
  "name": "Validate JSON payloads against a schema with detailed error messages (no AI)",
  "nodes": [
    {
      "id": "0bff1b8c-ed35-4673-835a-47f413847ef2",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        1328,
        352
      ]
    },
    {
      "id": "d639a119-f215-41b5-9669-85306a3146bf",
      "name": "Schema Validation",
      "type": "n8n-nodes-base.code",
      "position": [
        1664,
        352
      ]
    },
    {
      "id": "00618ad0-367e-4ca0-9032-8357d3cc87dd",
      "name": "PLACEHOLDER: Source of your data",
      "type": "n8n-nodes-base.set",
      "position": [
        2000,
        560
      ]
    },
    {
      "id": "8287706f-d600-42fd-b843-2b13bd106d14",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        432
      ],
      "parameters": {
        "width": 528,
        "height": 320,
        "content": "## Copy and paste this sticky with the nodes inside of it into your AI prompt\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n_these nodes are just here to give the llm extra context_\n\n## JSON Schema Generator\n\nThe nodes below are p"
      }
    },
    {
      "id": "23b82931-8571-4d0f-b4c7-bbfd3dbd6ed2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        224
      ],
      "parameters": {
        "width": 704,
        "height": 816,
        "content": "# JSON Schema Validator\n\n## How it works\n\nCall this via an **Execute Sub-Workflow** node with two params:\n\n- **`requiredSchema`** — your JSON Schema (wrapped in `={{ }}`)\n- **`paramsToValidate`** — th"
      }
    },
    {
      "id": "10948397-947f-4006-95dd-fb9db33f3cf0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        224
      ],
      "parameters": {
        "width": 528,
        "height": 208,
        "content": "# Schema Creation\nAIs are great at making schemas. Copy and paste the two nodes below with the entire sticky into your agent of choice with an example of your request.\n\n\n_Out of view in the sticky is "
      }
    },
    {
      "id": "d2af7f8f-c367-4fc9-a794-ed697ed6e7cd",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2496,
        224
      ],
      "parameters": {
        "width": 1248,
        "height": 624,
        "content": "# Usage Example\nThis is an example showing how to wire the validator into a webhook endpoint"
      }
    },
    {
      "id": "1375dac8-c6bf-4b76-bb26-8e935e1540bf",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        2576,
        368
      ]
    },
    {
      "id": "38928989-fd9a-4fac-873f-12dfa4d7dcfd",
      "name": "If Params Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        2992,
        368
      ]
    },
    {
      "id": "1aef7e3c-1e25-417d-9ea9-368a2e85c49e",
      "name": "Return 400 param error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2992,
        592
      ]
    },
    {
      "id": "698fff1b-c266-47e1-81cb-ad252a448889",
      "name": "Your workflow logic here",
      "type": "n8n-nodes-base.noOp",
      "position": [
        3248,
        368
      ]
    },
    {
      "id": "93d5b54b-cbc2-4db3-a486-81a8d3e695f3",
      "name": "Return Success Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3456,
        368
      ]
    },
    {
      "id": "ccac00e9-f3fd-4345-992f-cee6858c1ebb",
      "name": "Validate Schema",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2784,
        368
      ]
    },
    {
      "id": "17f5acfd-bb81-4078-bac2-ce995514f128",
      "name": "Call 'Param Schema Validation Template'",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2256,
        560
      ]
    },
    {
      "id": "e6e699de-7f68-41cd-a201-5974877bdc5a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3232,
        560
      ],
      "parameters": {
        "width": 512,
        "height": 288,
        "content": "Then the `error` field gives a detailed readable description of all of the errors:\n\nValidation failed (6 issues):\n• name: Missing required field \\\"name\\\" — Customer full name\n• email: \\\"not-an-email\\\""
      }
    },
    {
      "id": "5b24fc13-03da-46ec-809c-887c2ad72e86",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        224
      ],
      "parameters": {
        "width": 640,
        "height": 304,
        "content": "### The Actual Workflow\nThese two nodes are the actual functional part of the template, all of the other nodes on the canvas are just for demonstration. \n\n"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Validate Schema",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Params Valid": {
      "main": [
        [
          {
            "node": "Your workflow logic here",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Return 400 param error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Schema": {
      "main": [
        [
          {
            "node": "If Params Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Your workflow logic here": {
      "main": [
        [
          {
            "node": "Return Success Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PLACEHOLDER: Source of your data": {
      "main": [
        [
          {
            "node": "Call 'Param Schema Validation Template'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Schema Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}