An n8n community node for connecting workflows with the Gaius-Lex API.
Use it to search legal sources, ask legal questions, run OCR and anonymization, process async legal analysis jobs, and plug Gaius-Lex capabilities into your automation flows.
- Search legal sources directly from n8n
- Run question answering and agent-based workflows
- Upload files for OCR and external vectorization
- Process async jobs with polling or webhook callbacks
- Use legal analysis endpoints like abusivity, theses analysis, alignment, and KRS tools
Install the package in your n8n environment:
npm install n8n-nodes-gaius-lexFor a local custom setup, place this project in your n8n custom nodes directory and build it:
npm install
npm run buildCreate a Gaius-Lex API credential in n8n and provide:
API Key- sent asAuthorization: Api-Key <KEY>Base URL- defaults tohttps://api.gaius-lex.pl
The Gaius-Lex node currently supports the following operations.
Available SourcesSearchAgent Profiles
External - Vectorize FileExternal - Get DocumentExternal - List Documents
Agent - Create (Poll)Agent - Get StatusAgent - Create (Webhook)
Answer - Create (Poll)Answer - Get StatusAnswer - Create (Webhook)
OCR - CreateOCR - Get StatusAnonymizationDoc Verification - CreateDoc Verification - Get Status
[BETA] Abusivity - Create (Poll)[BETA] Abusivity - Get Status[BETA] Abusivity - Create (Webhook)[BETA] Theses Analysis - Create (Poll)[BETA] Theses Analysis - Get Status[BETA] Theses Analysis - Create (Webhook)[BETA] Alignment - Create (Poll)[BETA] Alignment - Get Status[BETA] Alignment - Create (Webhook)[BETA] Alignment - Rule Extraction[BETA] KRS Lookup[BETA] KRS Text Analysis[BETA] KRS Agreement
- Use polling operations when you want n8n to request results later with a
requestId - Use webhook operations when Gaius-Lex should call back to your workflow endpoint
- File-based operations such as OCR and external vectorization expect binary input data
- JSON fields in the node, such as messages, rules, or source filters, must contain valid JSON
- Add the
Gaius-Lexnode - Select
Search - Fill in
Queryand optional filters likeLanguage,Date From, orCategories - Run the node to receive search results as JSON
- Select
Answer - Create (Poll) - Enter the question text
- Run the node and keep the returned
requestId - Use
Answer - Get Statusto fetch the final result
- Pass a binary file into the node
- Select
OCR - Create - Set the binary property name, default
data - Poll the OCR result with
OCR - Get Status
- Select a webhook-enabled operation such as
Agent - Create (Webhook) - Provide your callback URL in
Callback Endpoint - Optionally include a
Temp Tokenfor verification - Receive the result asynchronously in your n8n webhook flow
Install dependencies and build the node:
npm install
npm run buildThis package is configured as an n8n community node and builds to dist/.
MIT