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": "TableFlow \u2014 Incoming Message Handler",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "incoming-message",
"responseMode": "responseNode",
"options": {}
},
"id": "n8n-node-webhook",
"name": "Incoming Message Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
240,
300
],
"notes": "Receives messages from email parsers, Twilio SMS, WhatsApp Business API, etc."
},
{
"parameters": {
"jsCode": "const body = $input.first().json.body;\n\n// Normalize different message source formats\nconst message = body.text || body.Body || body.message || body.content || '';\nconst from = body.from || body.From || body.sender || '';\nconst channel = body.channel || (body.From ? 'sms' : 'email');\n\nif (!message.trim()) {\n return [{ json: { error: 'Empty message', skip: true } }];\n}\n\nreturn [{\n json: {\n raw_message: message,\n from_contact: from,\n channel: channel,\n received_at: new Date().toISOString()\n }\n}];"
},
"id": "n8n-node-normalize",
"name": "Normalize Message",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
300
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.skip }}",
"value2": true
}
]
}
},
"id": "n8n-node-skip-check",
"name": "Skip Empty?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
680,
300
]
},
{
"parameters": {
"url": "={{ $env.N8N_BASE_URL }}/webhook/ai-classifier",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "message",
"value": "={{ $json.raw_message }}"
},
{
"name": "channel",
"value": "={{ $json.channel }}"
},
{
"name": "from",
"value": "={{ $json.from_contact }}"
}
]
},
"options": {
"timeout": 30000
}
},
"id": "n8n-node-classify",
"name": "Call AI Classifier",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
900,
220
]
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.intent }}",
"value2": "new_reservation"
}
]
}
},
"id": "n8n-node-intent-check",
"name": "Is New Reservation?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
1120,
220
]
},
{
"parameters": {
"url": "={{ $env.POCKETBASE_URL }}/api/collections/reservations/records",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "restaurant_id",
"value": "={{ $env.DEFAULT_RESTAURANT_ID }}"
},
{
"name": "guest_name",
"value": "={{ $('Call AI Classifier').item.json.name || $('Normalize Message').item.json.from_contact }}"
},
{
"name": "guest_phone",
"value": "={{ $('Call AI Classifier').item.json.phone || '' }}"
},
{
"name": "guest_email",
"value": "={{ $('Call AI Classifier').item.json.email || '' }}"
},
{
"name": "party_size",
"value": "={{ $('Call AI Classifier').item.json.party_size || 2 }}"
},
{
"name": "reserved_at",
"value": "={{ $('Call AI Classifier').item.json.datetime || '' }}"
},
{
"name": "duration_minutes",
"value": "90"
},
{
"name": "status",
"value": "pending"
},
{
"name": "source",
"value": "ai_classified"
},
{
"name": "ai_confidence",
"value": "={{ $('Call AI Classifier').item.json.confidence || 0 }}"
},
{
"name": "notes",
"value": "=Auto-created from {{ $('Normalize Message').item.json.channel }} message: {{ $('Normalize Message').item.json.raw_message.slice(0, 200) }}"
}
]
},
"options": {}
},
"id": "n8n-node-create-reservation",
"name": "Create Reservation in PocketBase",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
1340,
140
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ received: true, intent: $('Call AI Classifier').item.json.intent, message: 'Your request has been received and will be processed shortly.' }) }}"
},
"id": "n8n-node-respond",
"name": "Respond to Sender",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1560,
220
]
}
],
"connections": {
"Incoming Message Webhook": {
"main": [
[
{
"node": "Normalize Message",
"type": "main",
"index": 0
}
]
]
},
"Normalize Message": {
"main": [
[
{
"node": "Skip Empty?",
"type": "main",
"index": 0
}
]
]
},
"Skip Empty?": {
"main": [
[],
[
{
"node": "Call AI Classifier",
"type": "main",
"index": 0
}
]
]
},
"Call AI Classifier": {
"main": [
[
{
"node": "Is New Reservation?",
"type": "main",
"index": 0
}
]
]
},
"Is New Reservation?": {
"main": [
[
{
"node": "Create Reservation in PocketBase",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Sender",
"type": "main",
"index": 0
}
]
]
},
"Create Reservation in PocketBase": {
"main": [
[
{
"node": "Respond to Sender",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"meta": {
"notes": "Receives incoming reservation messages from any channel (email, SMS, WhatsApp). Normalizes the message, calls the AI classifier workflow, and if intent is 'new_reservation', creates it in PocketBase automatically. Webhook URL: POST http://<n8n-host>:5678/webhook/incoming-message"
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
TableFlow — Incoming Message Handler. Uses httpRequest. Webhook trigger; 7 nodes.
Source: https://github.com/SanchezAlbaladejoPablo/tableflow/blob/72a4c27d1469a2f43764787cd24332c050448e9d/automations/n8n/incoming-message-handler.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.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c
Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.
📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a