Back to Nodes

WeKnora

Last updated Aug 4, 2026

n8n community node for WeKnora knowledge bases, document ingestion, search, and RAG chat

975 Weekly Downloads
975 Monthly Downloads

Included Nodes

WeKnora

Description

n8n-nodes-weknora

An n8n community node for WeKnora. It provides native operations for knowledge-base management, document ingestion, retrieval, sessions, and RAG chat without requiring HTTP Request or Code nodes.

![GitHub stars](https://github.com/PatrickLee243/n8n-nodes-weknora)

> ⭐ If this node is useful to you, please give the project a star on GitHub. Your support helps more n8n and WeKnora users discover it.
>
> 如果这个节点对你有帮助,欢迎前往 GitHub 仓库点个 Star。你的支持能帮助更多 n8n 和 WeKnora 用户发现这个项目。

Features

  • Store the WeKnora URL and API key in an n8n credential.
  • Upload n8n binary data as a WeKnora knowledge file.
  • Import a URL or create Markdown knowledge.
  • Read parse status and reparse failed knowledge.
  • Search one or more knowledge bases and emit one n8n item per hit.
  • Create sessions and ask grounded RAG questions.
  • Parse WeKnora SSE responses, combine answer tokens, and clean inline reference markers.
  • No runtime npm dependencies.
  • Installation

    n8n Community Nodes UI

    Open Settings > Community Nodes, choose Install, and enter:

    n8n-nodes-weknora
    

    Unverified community nodes require a self-hosted n8n instance that allows their installation. After the package is verified, it can also be installed through the verified-node flow.

    Manual self-hosted installation

    From the n8n user directory:

    npm install n8n-nodes-weknora
    

    Restart n8n after installation.

    Credential

    Create a WeKnora API credential with:

    | Field | Example |
    | ——– | —————————- |
    | Base URL | http://weknora:8080/api/v1 |
    | API Key | sk-... |

    The base URL must be reachable from the n8n runtime. In Docker, localhost refers to the n8n container itself; use the WeKnora service name when both applications share a Docker network.

    The credential sends X-API-Key and tests the connection by listing one knowledge base. Each node request also includes an X-Request-ID derived from the n8n execution ID.

    Operations

    Knowledge Base

  • Create: Create a document or FAQ knowledge base. LLM and Embedding models are loaded from the models configured in WeKnora; advanced fields can be passed through Additional Fields JSON.
  • Get: Get one knowledge base by ID.
  • Get Many: Get a page of knowledge bases.
  • Knowledge

  • Upload File: Upload the selected n8n binary field as multipart form data.
  • Create From URL: Import a web page or remote file URL.
  • Create Markdown: Create and publish a manual Markdown knowledge item for indexing. Optional Tag IDs assign existing WeKnora tags; tag IDs themselves are generated when tags are created in WeKnora.
  • Get: Read a knowledge item, including parse_status.
  • Get Many: List knowledge items in a knowledge base. Each returned item’s id is its Knowledge ID and can be used to scope Search or Ask to specific files.
  • Reparse: Start parsing a knowledge item again.
  • WeKnora parses uploads asynchronously. An accepted upload is not immediately searchable. Use Knowledge > Get in a loop with an n8n Wait node until parse_status is completed; stop on failed or cancelled.

    Search

    Search Knowledge calls /knowledge-search and returns each retrieved chunk as a separate n8n item. Knowledge-base and knowledge IDs accept comma- or newline-separated values. Knowledge IDs are optional file-level filters; leave them empty to search every file in the selected knowledge bases.

    Session

    Create creates a WeKnora conversation container and returns its ID.

    Chat

    Ask calls /knowledge-chat/:session_id and consumes the SSE response as a live stream. Node version 2 offers three session-handling modes:

  • Automatically Remember maps a stable conversation key, such as the n8n Chat Trigger sessionId, to a WeKnora session in the Ask node’s n8n static data. A missing or deleted WeKnora session is recreated once after a 404 response.
  • Create New Every Time preserves the original one-session-per-execution behavior.
  • Use Existing Session ID accepts a WeKnora session ID supplied by the workflow.
  • Automatic memory always applies a configurable finite limit for the current workflow, Ask node, and credential. After every successful Ask, the node refreshes the current mapping and evicts the least-recently-used mappings until the limit is satisfied. Remote WeKnora session deletion is optional, and cleanup failures are returned as warnings without discarding the chat answer or undoing the local eviction. No Data Table or additional workflow node is required.

    Existing version 1 nodes keep their original behavior. Upgrade the node to version 2 in the n8n editor to use automatic memory.

    Inline WeKnora reference markers such as , , and [ref ...] are removed from the displayable answer.

    Output fields include:

    {
    	"output": "Clean answer without citation markers",
    	"answer": "Clean combined answer text",
    	"session_id": "session-id",
    	"session_created": false,
    	"session_reused": true,
    	"message_id": "message-id",
    	"event_count": 4
    }
    

    output is intentionally compatible with n8n Chat Trigger workflows.

    Example workflows

  • examples/file-upload.json: n8n Form Trigger to WeKnora file ingestion.
  • examples/rag-chat.json: n8n Chat Trigger to WeKnora RAG chat.
  • After import, select a WeKnora credential and replace the placeholder knowledge-base ID.

    API compatibility

    The node follows the current WeKnora /api/v1 documentation:

  • Knowledge
  • Knowledge search
  • Sessions
  • Chat

When a deployed WeKnora version and the Markdown documentation differ, use that instance’s Swagger UI as the source of truth.

Development

Requirements: Node.js 22.22 or newer and npm.

npm install
npm run lint
npm test
npm run dev

npm test performs a production build and tests URL/ID/JSON helpers, multipart encoding, SSE aggregation, malformed events, errors, and reference deduplication.

Publishing

Before the first public release:

1. Confirm the repository metadata points to PatrickLee243/n8n-nodes-weknora.
2. Push this directory to a public GitHub repository.
3. Create the n8n-nodes-weknora package on npm or publish the first version.
4. Configure npm Trusted Publishing for .github/workflows/publish.yml.
5. Run npm run release and push the generated version tag.
6. Submit the package through the n8n Creator Portal if verified-node distribution is desired.

The included publish workflow uses GitHub Actions OIDC and npm provenance. A scoped NPM_TOKEN can be configured as a fallback.

Security

API keys remain in n8n credentials. Do not put API keys, private WeKnora URLs, or credential exports in example workflows or issue reports. See SECURITY.md.

License

MIT