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": "File-Sort Webhook",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "file-sort",
"responseMode": "onReceived",
"options": {
"rawBody": true
}
},
"id": "webhook-trigger",
"name": "Webhook: Dateien reinschicken",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
240,
300
]
},
{
"parameters": {
"jsCode": "// JSON-Body parsen: { files: [{ filename, path?, url?, category?, target_folder? }] }\nconst input = $input.first().json;\nconst body = typeof input.body === 'string' ? JSON.parse(input.body) : (input.body || input);\nconst files = Array.isArray(body.files) ? body.files : [body];\n\nreturn files.map(f => ({\n json: {\n filename: f.filename || f.name || 'unknown',\n path: f.path,\n url: f.url,\n category: f.category || 'Unsortiert',\n target_folder: f.target_folder || 'INPUT/' + (f.category || 'Unsortiert'),\n source: body.source || 'webhook'\n }\n}));"
},
"id": "parse-json",
"name": "JSON parsen",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
460,
300
]
},
{
"parameters": {
"rules": {
"rules": [
{
"outputKey": "Rechnung",
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": ""
},
"conditions": [
{
"leftValue": "={{ $json.category }}",
"rightValue": "Rechnung",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
},
{
"outputKey": "Dokument",
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": ""
},
"conditions": [
{
"leftValue": "={{ $json.category }}",
"rightValue": "Dokument",
"operator": {
"type": "string",
"operation": "equals"
}
}
]
}
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"id": "switch-category",
"name": "Nach Kategorie sortieren",
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
680,
300
]
},
{
"parameters": {
"content": "## File-Sort Webhook\n\n**Eingabe:** POST JSON mit `files`-Array\n**Beispiel:**\n```json\n{\n \"files\": [\n {\"filename\": \"rechnung.pdf\", \"category\": \"Rechnung\"},\n {\"filename\": \"notiz.md\", \"category\": \"Dokument\"}\n ]\n}\n```\n\n**N\u00e4chster Schritt:** NocoDB-Create oder Nextcloud-Upload einbinden",
"height": 220,
"width": 400
},
"id": "sticky-note",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
240,
80
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ { status: 'ok', processed: $input.all().length } }}"
},
"id": "respond",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
900,
300
]
}
],
"connections": {
"Webhook: Dateien reinschicken": {
"main": [
[
{
"node": "JSON parsen",
"type": "main",
"index": 0
}
]
]
},
"JSON parsen": {
"main": [
[
{
"node": "Nach Kategorie sortieren",
"type": "main",
"index": 0
}
]
]
},
"Nach Kategorie sortieren": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 1,
"meta": {
"templateCredsSetupCompleted": false
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
File-Sort Webhook. Webhook trigger; 5 nodes.
Source: https://github.com/timo-goetz-ai/apki-core-platform/blob/main/automations/n8n-workflows/event-driven/file-sort-webhook.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 clean, extensible REST-style API routing template for n8n webhooks with up to 3 path levels. Serves API routes via Webhooks with path variables Normalizes incoming requests into "global" REQUEST and
PUQ Docker NextCloud deploy. Uses respondToWebhook, stickyNote, httpRequest, ssh. Webhook trigger; 44 nodes.
puq-docker-immich-deploy. Uses respondToWebhook, ssh, stickyNote. Webhook trigger; 35 nodes.
Analyze_email_headers_for_IPs_and_spoofing__3. Uses stickyNote, respondToWebhook, itemLists, httpRequest. Webhook trigger; 35 nodes.
puq-docker-n8n-deploy. Uses respondToWebhook, ssh, stickyNote. Webhook trigger; 34 nodes.