diff --git a/paperless_get_component.json b/paperless_get_component.json index 6c5a6bf..82698ac 100644 --- a/paperless_get_component.json +++ b/paperless_get_component.json @@ -1,9 +1,9 @@ { - "updatedAt": "2026-01-04T14:54:00.000Z", - "createdAt": "2026-01-04T09:23:16.248Z", - "id": "yvSB21lQNL04DH2l", + "updatedAt": "2026-02-07T17:13:43.905Z", + "createdAt": "2026-02-07T16:45:07.903Z", + "id": "Fw7gwUx6RgHKBZO5cmsjj", "name": "paperless_get_component", - "active": false, + "active": true, "isArchived": false, "nodes": [ { @@ -34,10 +34,10 @@ "type": "n8n-nodes-base.if", "typeVersion": 2.2, "position": [ - 400, - -448 + 672, + 0 ], - "id": "6a14c36a-56d2-4b04-9c32-de7bc4efa1ec", + "id": "41d0050b-f792-4693-806b-1becb62ceffd", "name": "weitere Seiten vorhanden", "alwaysOutputData": false }, @@ -48,10 +48,10 @@ "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [ - 624, - -448 + 896, + 0 ], - "id": "72256153-a6e3-4fd7-9ca9-6daf01711531", + "id": "ccb72276-0ec9-476c-a38f-1b15415111ef", "name": "Code in JavaScript" }, { @@ -68,14 +68,14 @@ "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.3, "position": [ - 176, - -448 + 448, + 0 ], - "id": "aa753efb-2704-4578-902a-847c15317a36", + "id": "1176cd8e-142f-400d-9197-f23ae7e19bd2", "name": "get_correspondents", "credentials": { "httpHeaderAuth": { - "id": "zyL5PgYOGlAptjwA", + "id": "Yn1cJCfoNitCVwdO", "name": "paperless_api_token" } } @@ -146,10 +146,10 @@ "type": "n8n-nodes-base.dataTable", "typeVersion": 1, "position": [ - 1072, - -448 + 1344, + 0 ], - "id": "5ff57627-d129-48f4-a353-ad2f87b34f18", + "id": "f99670d5-1124-4439-a429-23819b045bd9", "name": "Upsert row(s)", "executeOnce": false }, @@ -161,10 +161,10 @@ "type": "n8n-nodes-base.splitOut", "typeVersion": 1, "position": [ - 848, - -448 + 1120, + 0 ], - "id": "a9784b72-a0ae-4653-9195-dfdfbdcc670a", + "id": "0f193634-6bbe-483c-aa85-f65268d7ea49", "name": "Split Out1" }, { @@ -183,10 +183,10 @@ "type": "n8n-nodes-base.executeWorkflowTrigger", "typeVersion": 1.1, "position": [ - -272, - -448 + 0, + 0 ], - "id": "b3a4302b-fb6c-4719-b3f7-9f9dbeee893f", + "id": "87e400f6-9e17-4f47-ab64-5c9dcc3abbc2", "name": "When Executed by Another Workflow" }, { @@ -208,19 +208,19 @@ { "id": "40329995-bcdb-4546-b2dc-d8b33d020198", "name": "paperless_correspondent_db_id", - "value": "WmMZJjFqs1LTGlxy", + "value": "sjO4pAZNP1j1hHH2", "type": "string" }, { "id": "ff02936f-ddb3-40e4-9255-54cdfff6c291", "name": "paperless_tag_db_id", - "value": "O8FtQxHCgJRAtOy1", + "value": "jBGyNOUjWYnAqA8C", "type": "string" }, { "id": "ab142cd3-e7bb-4fd6-9871-d15f57cee573", "name": "paperless_document_type_db_id", - "value": "9CYGbOQ8zjL0gRTE", + "value": "UYRGUJmbU2Q3Ztv6", "type": "string" } ] @@ -230,10 +230,10 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - -48, - -448 + 224, + 0 ], - "id": "ee95c281-caeb-4e2d-87a4-f45c426e5565", + "id": "44c7e2f3-aa59-4087-8664-62ecd3b6df7b", "name": "global_variables" } ], @@ -278,11 +278,6 @@ ] ] }, - "Upsert row(s)": { - "main": [ - [] - ] - }, "Split Out1": { "main": [ [ @@ -315,32 +310,363 @@ } ] ] + }, + "Upsert row(s)": { + "main": [ + [] + ] } }, "settings": { - "executionOrder": "v1" + "executionOrder": "v1", + "availableInMCP": false }, "staticData": null, - "meta": { - "templateCredsSetupCompleted": true + "meta": null, + "pinData": { + "When Executed by Another Workflow": [ + { + "json": { + "component_name": "tags", + "component_url": "http://192.168.178.101:8000/api/tags/" + } + } + ] }, - "pinData": {}, - "versionId": "6d5c26d0-cb68-422a-978b-be63886a0a64", + "versionId": "cf68cb1d-9442-4921-a000-6438a29f44a8", + "activeVersionId": "a8b5c228-6234-4074-8462-7ad002240178", "triggerCount": 0, "shared": [ { - "updatedAt": "2026-01-04T09:23:16.252Z", - "createdAt": "2026-01-04T09:23:16.252Z", + "updatedAt": "2026-02-07T16:45:07.904Z", + "createdAt": "2026-02-07T16:45:07.904Z", "role": "workflow:owner", - "workflowId": "yvSB21lQNL04DH2l", - "projectId": "S4tmpzSj6JlGFOze" + "workflowId": "Fw7gwUx6RgHKBZO5cmsjj", + "projectId": "cSAaWNJydnksD5EB" } ], + "activeVersion": { + "updatedAt": "2026-02-07T16:52:40.000Z", + "createdAt": "2026-02-07T16:51:39.266Z", + "versionId": "a8b5c228-6234-4074-8462-7ad002240178", + "workflowId": "Fw7gwUx6RgHKBZO5cmsjj", + "nodes": [ + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "strict", + "version": 2 + }, + "conditions": [ + { + "id": "abfbb141-819d-4df5-abcb-3facf527e19e", + "leftValue": "={{ $json.next }}", + "rightValue": "={{ $('get_correspondents').last().json.next }}", + "operator": { + "type": "string", + "operation": "notEmpty", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + 672, + 0 + ], + "id": "41d0050b-f792-4693-806b-1becb62ceffd", + "name": "weitere Seiten vorhanden", + "alwaysOutputData": false + }, + { + "parameters": { + "jsCode": "const allData = []\nvar json_lst = []\n\nlet counter = 0;\ndo {\n try {\n const response = $items(\"get_correspondents\", 0, counter)[0].json;\n \n const filtered = response.results.map(item => {\n return {\n id: item.id,\n slug: item.slug,\n name: item.name\n };\n });\n allData.push(...filtered);\n } catch (error) {\n return [{json: {allData}}]; \n }\n\n counter++;\n} while(true);\n\n\n" + }, + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + 896, + 0 + ], + "id": "ccb72276-0ec9-476c-a38f-1b15415111ef", + "name": "Code in JavaScript" + }, + { + "parameters": { + "url": "={{ \n $('weitere Seiten vorhanden').isExecuted == false ? $('global_variables').item.json.component_url: $node['weitere Seiten vorhanden'].json.next\n}}", + "authentication": "genericCredentialType", + "genericAuthType": "httpHeaderAuth", + "options": { + "response": { + "response": {} + } + } + }, + "type": "n8n-nodes-base.httpRequest", + "typeVersion": 4.3, + "position": [ + 448, + 0 + ], + "id": "1176cd8e-142f-400d-9197-f23ae7e19bd2", + "name": "get_correspondents", + "credentials": { + "httpHeaderAuth": { + "id": "Yn1cJCfoNitCVwdO", + "name": "paperless_api_token" + } + } + }, + { + "parameters": { + "operation": "upsert", + "dataTableId": { + "__rl": true, + "value": "={{\n$('global_variables').item.json.component_name == \"tags\" \n?\n$('global_variables').item.json.paperless_tag_db_id\n:\n$('global_variables').item.json.component_name == \"correspondents\" \n?\n$('global_variables').item.json.paperless_correspondent_db_id\n:\n$('global_variables').item.json.component_name == \"document_types\" \n?\n$('global_variables').item.json.paperless_document_type_db_id\n:null\n}}", + "mode": "id" + }, + "filters": { + "conditions": [ + { + "keyName": "paperless_id", + "keyValue": "={{ $json.id }}" + } + ] + }, + "columns": { + "mappingMode": "defineBelow", + "value": { + "paperless_id": "={{ $json.id }}", + "slug": "={{ $json.slug }}", + "name": "={{ $json.name }}" + }, + "matchingColumns": [], + "schema": [ + { + "id": "paperless_id", + "displayName": "paperless_id", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "readOnly": false, + "removed": false + }, + { + "id": "slug", + "displayName": "slug", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "readOnly": false, + "removed": false + }, + { + "id": "name", + "displayName": "name", + "required": false, + "defaultMatch": false, + "display": true, + "type": "string", + "readOnly": false, + "removed": false + } + ], + "attemptToConvertTypes": false, + "convertFieldsToString": false + }, + "options": { + "dryRun": false + } + }, + "type": "n8n-nodes-base.dataTable", + "typeVersion": 1, + "position": [ + 1344, + 0 + ], + "id": "f99670d5-1124-4439-a429-23819b045bd9", + "name": "Upsert row(s)", + "executeOnce": false + }, + { + "parameters": { + "fieldToSplitOut": "allData", + "options": {} + }, + "type": "n8n-nodes-base.splitOut", + "typeVersion": 1, + "position": [ + 1120, + 0 + ], + "id": "0f193634-6bbe-483c-aa85-f65268d7ea49", + "name": "Split Out1" + }, + { + "parameters": { + "workflowInputs": { + "values": [ + { + "name": "component_name" + }, + { + "name": "component_url" + } + ] + } + }, + "type": "n8n-nodes-base.executeWorkflowTrigger", + "typeVersion": 1.1, + "position": [ + 0, + 0 + ], + "id": "87e400f6-9e17-4f47-ab64-5c9dcc3abbc2", + "name": "When Executed by Another Workflow" + }, + { + "parameters": { + "assignments": { + "assignments": [ + { + "id": "653145bb-ff78-4a14-a90a-c20f890f0889", + "name": "component_name", + "value": "={{ \n$('When Executed by Another Workflow').item.json.component_name || \"tags\"\n}}", + "type": "string" + }, + { + "id": "c84e488d-1891-4a18-98be-21c4c5a9f0ae", + "name": "component_url", + "value": "={{ \n$('When Executed by Another Workflow').item.json.component_url\n||\n\"http://192.168.178.101:8000/api/tags/\"\n}}", + "type": "string" + }, + { + "id": "40329995-bcdb-4546-b2dc-d8b33d020198", + "name": "paperless_correspondent_db_id", + "value": "WmMZJjFqs1LTGlxy", + "type": "string" + }, + { + "id": "ff02936f-ddb3-40e4-9255-54cdfff6c291", + "name": "paperless_tag_db_id", + "value": "O8FtQxHCgJRAtOy1", + "type": "string" + }, + { + "id": "ab142cd3-e7bb-4fd6-9871-d15f57cee573", + "name": "paperless_document_type_db_id", + "value": "9CYGbOQ8zjL0gRTE", + "type": "string" + } + ] + }, + "options": {} + }, + "type": "n8n-nodes-base.set", + "typeVersion": 3.4, + "position": [ + 224, + 0 + ], + "id": "44c7e2f3-aa59-4087-8664-62ecd3b6df7b", + "name": "global_variables" + } + ], + "connections": { + "weitere Seiten vorhanden": { + "main": [ + [ + { + "node": "get_correspondents", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "Code in JavaScript", + "type": "main", + "index": 0 + } + ] + ] + }, + "get_correspondents": { + "main": [ + [ + { + "node": "weitere Seiten vorhanden", + "type": "main", + "index": 0 + } + ] + ] + }, + "Code in JavaScript": { + "main": [ + [ + { + "node": "Split Out1", + "type": "main", + "index": 0 + } + ] + ] + }, + "Split Out1": { + "main": [ + [ + { + "node": "Upsert row(s)", + "type": "main", + "index": 0 + } + ] + ] + }, + "When Executed by Another Workflow": { + "main": [ + [ + { + "node": "global_variables", + "type": "main", + "index": 0 + } + ] + ] + }, + "global_variables": { + "main": [ + [ + { + "node": "get_correspondents", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "authors": "Prasanna Ranjan", + "name": "Version a8b5c228", + "description": "", + "autosaved": false + }, "tags": [ { - "updatedAt": "2026-01-04T09:23:14.869Z", - "createdAt": "2026-01-04T09:23:14.869Z", - "id": "7ZDCcNolVMDFEdmE", + "updatedAt": "2026-02-07T16:44:35.454Z", + "createdAt": "2026-02-07T16:44:35.454Z", + "id": "0tHqAlm05JhR7voQ", "name": "ollama_paperless" } ]