{
  "name": "Transform and validate webhook records with configurable type conversion",
  "nodes": [
    {
      "id": "6d91c4c4-ce5c-4002-ba1c-4d6e7719db0a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        1424
      ],
      "parameters": {
        "width": 820,
        "height": 952,
        "content": "## Transform and Map Data Fields, Standalone, No External Services\n\nA **self-contained data transformation workflow** that runs entirely inside n8n. No external APIs, no credentials, no third-party se"
      }
    },
    {
      "id": "82078d1b-d018-44a8-8bc1-e949bd5c3adb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        1424
      ],
      "parameters": {
        "width": 372,
        "height": 548,
        "content": "### Step 1: Receive Data\nPOST an array of records or a single object:\n```json\n{\n  \"records\": [\n    {\n      \"Artikelnr\": \"A-1001\",\n      \"Bezeichnung\": \"Schraube M8\",\n      \"Preis\": \"12,50\",\n      \"Gew"
      }
    },
    {
      "id": "b79d26e2-6033-41f4-b0d0-0b9500ccceee",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        1424
      ],
      "parameters": {
        "width": 340,
        "height": 548,
        "content": "### Step 2: Configure Field Mapping\nEdit the **Configure Field Mapping** node:\n\n**fieldMappings** — array of rules:\n- `sourceField`: field name in the input data\n- `targetField`: desired field name in"
      }
    },
    {
      "id": "976508ce-9c2f-4e3a-830d-e6998b11e019",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        1424
      ],
      "parameters": {
        "width": 300,
        "height": 540,
        "content": "### Step 3: Transform Records\nThe Code node processes each record:\n1. Iterates over all field mappings\n2. Reads the source field value\n3. Applies type conversion (number, boolean, date)\n4. Falls back "
      }
    },
    {
      "id": "115b1a34-7165-42b0-bfb9-b4bf7c3836f8",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1312,
        1424
      ],
      "parameters": {
        "width": 308,
        "height": 540,
        "content": "### Step 4: Return Result\nThe webhook responds with:\n```json\n{\n  \"success\": true,\n  \"totalRecords\": 47,\n  \"validRecords\": 45,\n  \"errorCount\": 2,\n  \"records\": [ /* transformed data */ ],\n  \"errors\": [\n"
      }
    },
    {
      "id": "eb8d97d1-2c25-4ad5-91bf-0466061a53a9",
      "name": "Receive Data",
      "type": "n8n-nodes-base.webhook",
      "position": [
        336,
        1984
      ]
    },
    {
      "id": "76c80090-9671-4b41-8def-3d186a34bf98",
      "name": "Configure Field Mapping",
      "type": "n8n-nodes-base.set",
      "position": [
        672,
        1984
      ]
    },
    {
      "id": "313f4228-2e63-45a7-895c-9bebc3a1be93",
      "name": "Transform Records",
      "type": "n8n-nodes-base.code",
      "position": [
        1008,
        1984
      ]
    },
    {
      "id": "2d4bf337-0bcf-4f0b-afe8-1bf1cd530219",
      "name": "Return Transformed Data",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1344,
        1984
      ]
    }
  ],
  "connections": {
    "Receive Data": {
      "main": [
        [
          {
            "node": "Configure Field Mapping",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform Records": {
      "main": [
        [
          {
            "node": "Return Transformed Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Field Mapping": {
      "main": [
        [
          {
            "node": "Transform Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}