AutomationFlowsGeneral › Webhook Input-validation API

Webhook Input-validation API

Webhook Input-Validation API. Webhook trigger; 6 nodes.

Webhook trigger★★☆☆☆ complexity6 nodes
General Trigger: Webhook Nodes: 6 Complexity: ★★☆☆☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Webhook Input-Validation API",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "submit",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "f1000000-1111-4a01-8b01-000000000001",
      "name": "POST /submit",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -360,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "cond-email-present",
              "leftValue": "={{ $json.body.email }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "f2000000-2222-4b02-9c02-000000000002",
      "name": "Has email?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        -140,
        0
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a-status-ok",
              "name": "status",
              "value": "accepted",
              "type": "string"
            },
            {
              "id": "a-email-ok",
              "name": "email",
              "value": "={{ $json.body.email }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "f3000000-3333-4c03-ad03-000000000003",
      "name": "Build OK",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        80,
        -100
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a-status-err",
              "name": "error",
              "value": "email is required",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "f4000000-4444-4d04-be04-000000000004",
      "name": "Build Error",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        80,
        120
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": 200
        }
      },
      "id": "f5000000-5555-4e05-cf05-000000000005",
      "name": "Respond 200",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        300,
        -100
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ $json }}",
        "options": {
          "responseCode": 400
        }
      },
      "id": "f6000000-6666-4f06-da06-000000000006",
      "name": "Respond 400",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        300,
        120
      ]
    }
  ],
  "connections": {
    "POST /submit": {
      "main": [
        [
          {
            "node": "Has email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has email?": {
      "main": [
        [
          {
            "node": "Build OK",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Build Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build OK": {
      "main": [
        [
          {
            "node": "Respond 200",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Error": {
      "main": [
        [
          {
            "node": "Respond 400",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "api"
    }
  ]
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Webhook Input-Validation API. Webhook trigger; 6 nodes.

Source: https://github.com/AkuchiS/n8n-templates/blob/main/webhook-input-validation-api.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

HR tool. Uses googleSheets. Webhook trigger; 12 nodes.

Google Sheets
General

This workflow receives inbound emails from EmailConnect.eu via an n8n webhook, extracts key message fields, drops spam, and routes emails to different downstream paths based on the recipient alias (fo

General

Create_Unique_Jira_tickets_from_Splunk_alerts. Uses jira. Webhook trigger; 11 nodes.

Jira
General

Http Stickynote. Uses stickyNote, httpRequest, highLevel. Webhook trigger; 10 nodes.

HTTP Request, High Level
General

Http Keap. Uses stickyNote, httpRequest, keap. Webhook trigger; 10 nodes.

HTTP Request, Keap