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 →
{
"id": "AutomationNotePortfolio01",
"name": "AUTOMATION NOTE Inquiry Routing Portfolio",
"description": null,
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "portfolio-inquiry-routing",
"authentication": "none",
"responseMode": "responseNode",
"options": {
"allowedOrigins": "https://automation-note.com"
}
},
"id": "2d386489-3271-4eb3-a308-0c19fffc2933",
"name": "Receive Inquiry",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [
0,
160
]
},
{
"parameters": {
"jsCode": "const input = $json.body ?? $json;\nconst caseId = typeof input.case_id === 'string' ? input.case_id.trim() : '';\nconst subject = typeof input.subject === 'string' ? input.subject.trim() : '';\nconst body = typeof input.body === 'string' ? input.body.trim() : '';\nconst errors = [];\nif (!/^case-[a-z0-9-]{3,40}$/i.test(caseId)) errors.push('case_id');\nif (!subject || subject.length > 120) errors.push('subject');\nif (!body || body.length > 1000) errors.push('body');\nconst source = `${subject} ${body}`;\nconst category = /\u8acb\u6c42|\u91d1\u984d|\u652f\u6255/.test(source) ? 'billing' : /\u30a8\u30e9\u30fc|\u9023\u643a|\u969c\u5bb3/.test(source) ? 'technical' : /\u30a2\u30ab\u30a6\u30f3\u30c8|\u30ed\u30b0\u30a4\u30f3|\u6a29\u9650/.test(source) ? 'account' : 'other';\nconst summary = `${subject}\uff1a${body}`.slice(0, 180);\nreturn [{ json: {\n valid: errors.length === 0,\n errors,\n case_id: caseId || null,\n category,\n summary,\n needs_review: /\u78ba\u8a8d\u304c\u5fc5\u8981|\u5224\u65ad\u304c\u5fc5\u8981|\u66d6\u6627/.test(body),\n idempotency_key: caseId || null\n} }];"
},
"id": "c4ba59bc-1f11-46a4-a34c-bbaeedb2e3ad",
"name": "Validate and Normalize",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
260,
160
]
},
{
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.valid }}",
"operation": "equal",
"value2": true
}
]
},
"combineOperation": "all"
},
"id": "16ef0901-569f-4eae-986a-6df8692f3ff4",
"name": "Is Valid",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
520,
160
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $env.PORTFOLIO_MOCK_API_URL + '/route' }}",
"sendBody": true,
"contentType": "json",
"specifyBody": "json",
"jsonBody": "={{ { case_id: $json.case_id, category: $json.category, summary: $json.summary, needs_review: $json.needs_review, idempotency_key: $json.idempotency_key } }}",
"options": {
"timeout": 3000,
"response": {
"response": {
"responseFormat": "json"
}
}
}
},
"id": "db84337a-c3fa-4b98-9782-cda9e07dccee",
"name": "Route Through Mock API",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.4,
"position": [
780,
80
],
"retryOnFail": true,
"maxTries": 3,
"waitBetweenTries": 250,
"onError": "continueErrorOutput"
},
{
"parameters": {
"jsCode": "return $input.all().map((item) => ({ json: {\n ok: true,\n status: item.json.status,\n case_id: item.json.case_id,\n ticket_id: item.json.ticket_id,\n category: item.json.category,\n needs_review: item.json.needs_review,\n duplicate: item.json.status === 'duplicate'\n} }));"
},
"id": "e4309ace-d62e-4ce3-8d31-d5ba99595ba7",
"name": "Build Accepted Response",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1040,
80
]
},
{
"parameters": {
"respondWith": "firstIncomingItem",
"options": {
"responseCode": 202,
"responseHeaders": {
"entries": [
{
"name": "Cache-Control",
"value": "no-store"
}
]
}
}
},
"id": "aab560ad-5693-4e68-b73e-57490b6a6970",
"name": "Respond Accepted",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.4,
"position": [
1300,
80
]
},
{
"parameters": {
"jsCode": "return $input.all().map((item) => ({ json: {\n ok: false,\n status: 'rejected',\n case_id: item.json.case_id,\n invalid_fields: item.json.errors\n} }));"
},
"id": "ca9c8eb9-26ee-4a67-9827-ec30cc8814a8",
"name": "Build Rejected Response",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
780,
280
]
},
{
"parameters": {
"respondWith": "firstIncomingItem",
"options": {
"responseCode": 400,
"responseHeaders": {
"entries": [
{
"name": "Cache-Control",
"value": "no-store"
}
]
}
}
},
"id": "23878128-d7b2-44c1-ab57-4015a1a6a775",
"name": "Respond Rejected",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.4,
"position": [
1040,
280
]
},
{
"parameters": {
"jsCode": "return [{ json: { ok: false, status: 'upstream_unavailable' } }];"
},
"id": "d7985e07-f0da-4dbf-a95f-10c2ecff5189",
"name": "Build Upstream Failure",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1040,
-120
]
},
{
"parameters": {
"respondWith": "firstIncomingItem",
"options": {
"responseCode": 502,
"responseHeaders": {
"entries": [
{
"name": "Cache-Control",
"value": "no-store"
}
]
}
}
},
"id": "c438f9dc-6141-4334-8ad3-03b9671f333e",
"name": "Respond Upstream Failure",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.4,
"position": [
1300,
-120
]
}
],
"connections": {
"Receive Inquiry": {
"main": [
[
{
"node": "Validate and Normalize",
"type": "main",
"index": 0
}
]
]
},
"Validate and Normalize": {
"main": [
[
{
"node": "Is Valid",
"type": "main",
"index": 0
}
]
]
},
"Is Valid": {
"main": [
[
{
"node": "Route Through Mock API",
"type": "main",
"index": 0
}
],
[
{
"node": "Build Rejected Response",
"type": "main",
"index": 0
}
]
]
},
"Route Through Mock API": {
"main": [
[
{
"node": "Build Accepted Response",
"type": "main",
"index": 0
}
],
[
{
"node": "Build Upstream Failure",
"type": "main",
"index": 0
}
]
]
},
"Build Accepted Response": {
"main": [
[
{
"node": "Respond Accepted",
"type": "main",
"index": 0
}
]
]
},
"Build Rejected Response": {
"main": [
[
{
"node": "Respond Rejected",
"type": "main",
"index": 0
}
]
]
},
"Build Upstream Failure": {
"main": [
[
{
"node": "Respond Upstream Failure",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true
},
"nodeGroups": [],
"versionId": "b881f1e6-ce9a-4bd2-8b42-de7dfa7d628f",
"activeVersionId": "b881f1e6-ce9a-4bd2-8b42-de7dfa7d628f",
"sourceWorkflowId": null,
"tags": [],
"versionMetadata": {
"name": null,
"description": null
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
AUTOMATION NOTE Inquiry Routing Portfolio. Uses httpRequest. Webhook trigger; 10 nodes.
Source: https://github.com/rains-hori/n8n-automation-recipes/blob/main/workflows/inquiry-routing/workflow.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 .
eek-Go v2 (Batch-Then-Review). Uses httpRequest. Webhook trigger; 75 nodes.
This workflow receives webhook requests from a content calendar and uses the X API v2 to publish text posts, threads, image/video posts, and polls, as well as delete existing posts and run a credentia
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