Automatyzacja n8n · Analiza dokumentow
Automatyzacja rozpoznaje tekst ze skanu lub PDF za pomocą OCR, a następnie weryfikuje dokument względem źródeł prawnych. Idealna do szybkiej analizy umów i dokumentów papierowych.
Przebieg
Te same kroki co w edytorze n8n, opisane po polsku. Kroki w jednym rzędzie działają równolegle.
Kliknij krok, żeby zobaczyć, co robi.
Workflow rusza, gdy inny system (formularz, CRM, skrypt) wyśle żądanie na adres webhooka.
Węzeł w n8n: Webhook Intake
Uruchomienie
Potrzebujesz instancji n8n (w chmurze albo na własnym serwerze) i konta Gaius-Lex.
curl -X POST "https://<twoja-instancja-n8n>/webhook/ocr-weryfikacja" \
-F "data=@dokument.pdf" \
-F "notifyEmail=…"Zastąp adres swoją instancją n8n, a wielokropki danymi ze sprawy.
n8n-nodes-gaius.{
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "ocr-weryfikacja",
"responseMode": "responseNode",
"options": {}
},
"id": "f1a1",
"name": "Webhook Intake",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-800,
200
]
},
{
"parameters": {
"keepOnlySet": true,
"values": {
"string": [
{
"name": "notifyEmail",
"value": "={{$json.body.notifyEmail || ''}}"
}
]
},
"options": {}
},
"id": "f1b2",
"name": "Extract Params",
"type": "n8n-nodes-base.set",
"typeVersion": 2,
"position": [
-560,
200
]
},
{
"parameters": {
"operation": "ocrPollCreate",
"binaryFile": "data"
},
"id": "f1a3",
"name": "OCR Document",
"type": "n8n-nodes-gaius.gaiusLex",
"typeVersion": 1,
"position": [
-320,
200
],
"credentials": {
"gaiusLexApi": {
"name": "Gaius-Lex account"
}
}
},
{
"parameters": {
"amount": 8,
"unit": "seconds"
},
"id": "f1a4",
"name": "Wait OCR",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-80,
200
]
},
{
"parameters": {
"operation": "ocrPollGet",
"requestId": "={{$('OCR Document').item.json.request_id}}"
},
"id": "f1a5",
"name": "Get OCR Result",
"type": "n8n-nodes-gaius.gaiusLex",
"typeVersion": 1,
"position": [
160,
200
],
"credentials": {
"gaiusLexApi": {
"name": "Gaius-Lex account"
}
}
},
{
"parameters": {
"operation": "docVerificationPollCreate",
"text": "={{$json.text}}",
"deepCheck": true,
"checkJudiciary": true,
"checkInterpretations": true,
"checkActs": true,
"checkKio": true
},
"id": "f1a6",
"name": "Verify Document",
"type": "n8n-nodes-gaius.gaiusLex",
"typeVersion": 1,
"position": [
400,
200
],
"credentials": {
"gaiusLexApi": {
"name": "Gaius-Lex account"
}
}
},
{
"parameters": {
"amount": 10,
"unit": "seconds"
},
"id": "f1a7",
"name": "Wait Verify",
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
640,
200
]
},
{
"parameters": {
"operation": "docVerificationPollGet",
"requestId": "={{$('Verify Document').item.json.request_id}}"
},
"id": "f1a8",
"name": "Get Verification",
"type": "n8n-nodes-gaius.gaiusLex",
"typeVersion": 1,
"position": [
880,
200
],
"credentials": {
"gaiusLexApi": {
"name": "Gaius-Lex account"
}
}
},
{
"parameters": {
"fromEmail": "automatyzacja@kancelaria.pl",
"toEmail": "={{$('Extract Params').item.json.notifyEmail}}",
"subject": "Raport OCR i weryfikacji dokumentu",
"message": "<h2>Wynik OCR</h2><p>Tekst rozpoznany.</p><h2>Wynik weryfikacji</h2><pre>{{$json}}</pre>",
"options": {}
},
"id": "f1a9",
"name": "Send Report",
"type": "n8n-nodes-base.emailSend",
"typeVersion": 2.1,
"position": [
1120,
200
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ status: 'completed', verification: $json }) }}",
"options": {}
},
"id": "f1a10",
"name": "Respond",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
1360,
200
]
}
],
"connections": {
"Webhook Intake": {
"main": [
[
{
"node": "Extract Params",
"type": "main",
"index": 0
}
]
]
},
"Extract Params": {
"main": [
[
{
"node": "OCR Document",
"type": "main",
"index": 0
}
]
]
},
"OCR Document": {
"main": [
[
{
"node": "Wait OCR",
"type": "main",
"index": 0
}
]
]
},
"Wait OCR": {
"main": [
[
{
"node": "Get OCR Result",
"type": "main",
"index": 0
}
]
]
},
"Get OCR Result": {
"main": [
[
{
"node": "Verify Document",
"type": "main",
"index": 0
}
]
]
},
"Verify Document": {
"main": [
[
{
"node": "Wait Verify",
"type": "main",
"index": 0
}
]
]
},
"Wait Verify": {
"main": [
[
{
"node": "Get Verification",
"type": "main",
"index": 0
}
]
]
},
"Get Verification": {
"main": [
[
{
"node": "Send Report",
"type": "main",
"index": 0
}
]
]
},
"Send Report": {
"main": [
[
{
"node": "Respond",
"type": "main",
"index": 0
}
]
]
}
},
"meta": {
"templateCredsSetupCompleted": true
}
}Plik nie zawiera identyfikatorów poświadczeń; po imporcie n8n poprosi o podłączenie własnych kont.
Od autora
Janusz Marszałek · aktualizacja 10 maja 2026
Automatyzacja przyjmuje plik (PDF, skan, zdjecie dokumentu) przez webhook. Node OCR rozpoznaje tekst ze dokumentu, a następnie system uruchamia weryfikacje względem źródeł prawnych — orzecznictwa, interpretacji podatkowych i ustaw. Wynik zawiera pełny tekst OCR oraz raport weryfikacji z odniesieniami do konkretnych aktów prawnych.
Mozesz dostosowac automatyzacje: włączyć/wyłączyć sprawdzanie poszczególnych źródeł (orzecznictwo, Interpretacje, Ustawy, KIO), zmienić adresata powiadomienia, lub dodać dodatkowe kroki przetwarzania po OCR.
Analiza dokumentow
Rozpoznaje tekst ze skanu przez OCR i wysyła wynik na Gmail. Wersja dla użytkowników Google Workspace.
Masowe OCR wielu dokumentów. Dzieli pliki na partie i przetwarza równolegle z opcjonalnym limitem prob.
OCR i Weryfikacja Dokumentu
Załóż konto Gaius-Lex, podłącz je w n8n i sprawdź wynik na prawdziwej sprawie. Wdrożenie automatyzacji w zespole omówimy na rozmowie.