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 →
{
"name": "Gateway",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "gateway",
"authentication": "headerAuth",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-gateway",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
256,
304
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "check-intent-exists",
"leftValue": "={{ $json.body.intent }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "exists"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "check-intent",
"name": "Has Intent?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
480,
304
]
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $json.body.intent }}",
"rightValue": "hello",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "13768a49-60e1-4fe2-8902-b008e1805045"
}
],
"combinator": "and"
},
"renameOutput": true,
"outputKey": "hello"
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"id": "route-intent",
"name": "Route Intent",
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
704,
240
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "status",
"name": "status",
"value": "ok",
"type": "string"
},
{
"id": "intent",
"name": "intent",
"value": "={{ $json.body.intent }}",
"type": "string"
},
{
"id": "result-message",
"name": "result.message",
"value": "Hello from n8n gateway",
"type": "string"
},
{
"id": "result-received",
"name": "result.received",
"value": "={{ $json.body.payload }}",
"type": "object"
}
]
},
"options": {}
},
"id": "hello-response",
"name": "Hello Response",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
912,
192
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "status",
"name": "status",
"value": "error",
"type": "string"
},
{
"id": "error",
"name": "error",
"value": "={{ 'Unknown intent: ' + $json.body.intent }}",
"type": "string"
},
{
"id": "valid-intents",
"name": "valid_intents",
"value": "=['hello']",
"type": "array"
}
]
},
"options": {}
},
"id": "unknown-intent",
"name": "Unknown Intent",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
912,
352
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "status",
"name": "status",
"value": "error",
"type": "string"
},
{
"id": "error",
"name": "error",
"value": "Missing required field: intent",
"type": "string"
},
{
"id": "valid-intents",
"name": "valid_intents",
"value": "=['hello']",
"type": "array"
}
]
},
"options": {}
},
"id": "missing-intent",
"name": "Missing Intent",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
704,
464
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}",
"options": {
"responseCode": 200
}
},
"id": "respond-ok",
"name": "Respond OK",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1136,
192
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}",
"options": {
"responseCode": 400
}
},
"id": "respond-unknown",
"name": "Respond 400 Unknown",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
1136,
352
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}",
"options": {
"responseCode": 400
}
},
"id": "respond-missing",
"name": "Respond 400 Missing",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
912,
464
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Has Intent?",
"type": "main",
"index": 0
}
]
]
},
"Has Intent?": {
"main": [
[
{
"node": "Route Intent",
"type": "main",
"index": 0
}
],
[
{
"node": "Missing Intent",
"type": "main",
"index": 0
}
]
]
},
"Route Intent": {
"main": [
[
{
"node": "Hello Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Unknown Intent",
"type": "main",
"index": 0
}
]
]
},
"Hello Response": {
"main": [
[
{
"node": "Respond OK",
"type": "main",
"index": 0
}
]
]
},
"Unknown Intent": {
"main": [
[
{
"node": "Respond 400 Unknown",
"type": "main",
"index": 0
}
]
]
},
"Missing Intent": {
"main": [
[
{
"node": "Respond 400 Missing",
"type": "main",
"index": 0
}
]
]
}
},
"active": true,
"settings": {
"executionOrder": "v1",
"binaryMode": "separate"
},
"versionId": "c6874074-3d39-4677-b0c3-c7382412582e",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "2",
"tags": []
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Gateway. Webhook trigger; 9 nodes.
Source: https://github.com/traylorre/openclaw-mac/blob/main/n8n/workflows/gateway.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
A production-ready authentication workflow implementing secure user registration, login, token verification, and refresh token mechanisms. Perfect for adding authentication to any application without
Portfolio Orchestrator. Uses httpRequest. Webhook trigger; 59 nodes.
This n8n template demonstrates how a simple Multi-Layer Perceptron (MLP) neural network can predict housing prices. The prediction is based on four key features, processed through a three-layer model.
github code Try yourself
This workflow receives new consult bookings via webhook (Calendly v2 or a generic scheduling tool), generates timed confirmation and reminder messages, runs each SMS through a separate compliance work