diff --git a/ollama.json b/ollama.json index 086f133..68a2726 100644 --- a/ollama.json +++ b/ollama.json @@ -1,5 +1,5 @@ { - "updatedAt": "2026-01-01T22:37:57.000Z", + "updatedAt": "2026-01-01T23:29:48.000Z", "createdAt": "2025-12-21T08:27:02.744Z", "id": "N4n2HmA6azz8n7Uw", "name": "ollama", @@ -33,19 +33,19 @@ ] }, "options": { - "system": "Kannst du bitte für dieses Dokument einen Title, Korrespondent und Dokumenttyp extrahieren. Die ich für mein Paperless verwenden kann?\nVersuche erst einen passenden Korrespondent aus meiner Liste was ich anhänge zu finden. Wenn du es nicht findest weise selber eins zu.\n\nAntworte nur als JSON Ausgabe wie z.B. hier, wenn eine Korrespondent ID vorhanden ist\n\n{\n\"Title\": \"SLK Klinik Beinoperation\",\n\"Korrespondent-ID\": 1,\n\"Korrespondent\": \"SLK Klinik\",\n\"Dokumenttyp\": \"Arztbrief\"\n}\n\nAntworte nur als JSON Ausgabe wie z.B. hier, wenn eine Korrespondent ID nicht vorhanden ist\n{\n\"Title\": \"SLK Klinik Beinoperation\",\n\"Korrespondent-ID\": null,\n\"Korrespondent\": \"SLK Klinik\",\n\"Dokumenttyp\": \"Arztbrief\"\n}\n\nStelle sicher das ausschließlich mit purem JSON. Nutze keine Markdown-Formatierung wie ` ` `json. Beginne direkt mit der öffnenden geschweiften Klammer {.", + "system": "Kannst du bitte für dieses Dokument einen Title, Korrespondent und Dokumenttyp extrahieren. Die ich für mein Paperless verwenden kann?\nVersuche erst einen passenden Korrespondent aus meiner Liste was ich anhänge zu finden. Wenn du es nicht findest weise selber eins zu.\n\nStelle sicher das ausschließlich mit purem JSON. Nutze keine Markdown-Formatierung wie ` ` `json. Beginne direkt mit der öffnenden geschweiften Klammer {.\n\nBeispielantwort 1 wenn eine Korrespondent ID vorhanden ist\n\n{\n\"Title\": \"SLK Klinik Beinoperation\",\n\"Korrespondent-ID\": 1,\n\"Korrespondent\": \"SLK Klinik\",\n\"Dokumenttyp\": \"Arztbrief\"\n}\n\nBeispielantwort 2 wenn eine Korrespondent ID nicht vorhanden ist\n{\n\"Title\": \"SLK Klinik Beinoperation\",\n\"Korrespondent-ID\": null,\n\"Korrespondent\": \"SLK Klinik\",\n\"Dokumenttyp\": \"Arztbrief\"\n}\n\n", "format": "json" } }, "type": "@n8n/n8n-nodes-langchain.ollama", "typeVersion": 1, "position": [ - 1168, - -56 + 1104, + -352 ], "id": "8e7a99f1-ca7f-4b2d-8b30-22749e613aa2", "name": "Message a model", - "executeOnce": true, + "executeOnce": false, "credentials": { "ollamaApi": { "id": "4Timi9hA5ACxVRmT", @@ -62,8 +62,8 @@ "queryParameters": { "parameters": [ { - "name": "tags", - "value": "Inbox" + "name": "tags__name__icontains", + "value": "inbox" } ] }, @@ -110,7 +110,7 @@ ], "id": "d1346069-1484-453f-b2a1-85dc69c8cb62", "name": "Edit Fields", - "executeOnce": true + "executeOnce": false }, { "parameters": { @@ -135,51 +135,13 @@ "type": "n8n-nodes-base.splitInBatches", "typeVersion": 3, "position": [ - 496, - -32 + 528, + 48 ], "id": "2c3873ee-ce74-4c04-bb32-88b7c2f51c28", "name": "Loop Over Items", "executeOnce": false }, - { - "parameters": { - "fieldsToAggregate": { - "fieldToAggregate": [ - { - "fieldToAggregate": "= {{ $json.data }}" - }, - { - "fieldToAggregate": "title" - } - ] - }, - "options": {} - }, - "type": "n8n-nodes-base.aggregate", - "typeVersion": 1, - "position": [ - 272, - -448 - ], - "id": "b3146320-bae1-480e-8d52-e9c8ce44620e", - "name": "Aggregate1" - }, - { - "parameters": { - "mode": "raw", - "jsonOutput": "={\n \"id\": {{ $('Loop Over Items').item.json.id }},\n \"title\": \"{{$json.data.Title}}\",\n \"korrespondent\": \"{{ $json.data.Korrespondent }}\",\n \"dokumenttyp\": \"{{ $json.data.Dokumenttyp }}\"\n}\n", - "options": {} - }, - "type": "n8n-nodes-base.set", - "typeVersion": 3.4, - "position": [ - 48, - -448 - ], - "id": "f8d862e2-cdbd-4e3c-95ba-1e99a4564be0", - "name": "Edit Fields1" - }, { "parameters": { "assignments": { @@ -187,7 +149,7 @@ { "id": "5ef46e88-d057-485e-9a75-8dcd244c737f", "name": "data", - "value": "={{ $json.content }}", + "value": "={{ $json.content.removeMarkdown().replaceAll('`','') }}", "type": "object" } ] @@ -197,8 +159,8 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - -176, - -448 + 1472, + -368 ], "id": "3caf3164-5298-47ea-9696-eec8fd64bb39", "name": "Edit Fields2" @@ -278,15 +240,20 @@ } }, { - "parameters": {}, + "parameters": { + "mode": "combine", + "combineBy": "combineAll", + "options": {} + }, "type": "n8n-nodes-base.merge", "typeVersion": 3.2, "position": [ - 944, - -128 + 976, + -96 ], "id": "73a54e13-82ed-4ce8-9678-4931272b86fd", - "name": "Merge1" + "name": "Merge1", + "notesInFlow": false }, { "parameters": { @@ -297,33 +264,24 @@ "type": "n8n-nodes-base.set", "typeVersion": 3.4, "position": [ - 720, - -32 + 816, + 64 ], "id": "9b804e40-985c-4573-8828-6f38baa284d9", "name": "Edit Fields3" }, { "parameters": { - "method": "POST", - "url": "=http://192.168.178.101:8000/api/documents/", + "method": "PATCH", + "url": "=http://192.168.178.101:8000/api/documents/{{ $json.data['document-id'] }}/", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", - "sendQuery": true, - "queryParameters": { - "parameters": [ - { - "name": "id", - "value": "={{ $json.data['document-id'] }}" - } - ] - }, "sendBody": true, "bodyParameters": { "parameters": [ { "name": "title", - "value": "={{ $json.data.content.parseJson().Title }}" + "value": "={{ $json.data.data.Title }}" } ] }, @@ -349,7 +307,11 @@ } }, { - "parameters": {}, + "parameters": { + "mode": "combine", + "combineBy": "combineAll", + "options": {} + }, "type": "n8n-nodes-base.merge", "typeVersion": 3.2, "position": [ @@ -392,7 +354,7 @@ "main": [ [ { - "node": "Merge", + "node": "Edit Fields2", "type": "main", "index": 0 } @@ -433,22 +395,11 @@ ] ] }, - "Edit Fields1": { - "main": [ - [ - { - "node": "Aggregate1", - "type": "main", - "index": 0 - } - ] - ] - }, "Edit Fields2": { "main": [ [ { - "node": "Edit Fields1", + "node": "Merge", "type": "main", "index": 0 } @@ -495,11 +446,6 @@ ] ] }, - "Aggregate1": { - "main": [ - [] - ] - }, "Merge1": { "main": [ [ @@ -537,6 +483,11 @@ } ] ] + }, + "HTTP Request2": { + "main": [ + [] + ] } }, "settings": { @@ -546,16 +497,8 @@ "meta": { "templateCredsSetupCompleted": true }, - "pinData": { - "Message a model": [ - { - "json": { - "content": "{\n\"Title\": \"Einkommensteuererklärung 2021 – Ranjan Prasanna\",\n\"Korrespondent-ID\": null,\n\"Korrespondent\": \"Finanzamt Heilbronn\",\n\"Dokumenttyp\": \"ESt-Erklärung (Hauptvordruck ESt 1A)\"\n}" - } - } - ] - }, - "versionId": "49c87adb-2f1d-4ee3-b28b-2f8ae735afaa", + "pinData": {}, + "versionId": "03025593-e7d9-4312-8ea1-c69ccfed1b87", "triggerCount": 0, "shared": [ {