Actions14
Overview
The node allows creating a new document within a specified knowledge base by sending the document content, optional metadata, and chunking configuration to the Ragdoll AI API. This is useful for users who want to add textual data to their knowledge bases for later querying, indexing, or AI-powered interactions.
Typical use cases include:
- Adding new articles, notes, or documents to an existing knowledge base.
- Preparing documents with chunking options to optimize search or retrieval performance.
- Enriching knowledge bases with structured metadata alongside raw content.
For example, a user might create a document containing a product manual's text, specify metadata like author or date, and configure chunking to split the text into manageable pieces for efficient processing.
Properties
| Name | Meaning |
|---|---|
| Knowledge Base ID | The identifier of the knowledge base where the document will be added. |
| Content | The main textual content of the document to be created. |
| Metadata | Optional JSON object containing additional metadata related to the document (e.g., tags, author info). |
| Chunking Config | Configuration for splitting the document text into chunks: |
| - Chunk Size | Number of characters per chunk when using fixed size chunking. |
| - Chunk Overlap | Number of overlapping characters between consecutive chunks. |
| - Type | Method of chunking: either "Fixed Size" (splitting by character count) or "Paragraph" (splitting by paragraphs). |
Output
The node outputs the response from the Ragdoll AI API after creating the document. The json output field contains the details of the newly created document, typically including its unique ID, associated knowledge base ID, stored content, metadata, and chunking information.
No binary data output is indicated for this operation.
Dependencies
- Requires an active connection to the Ragdoll AI API endpoint.
- An API authentication token or key credential must be configured in n8n to authorize requests.
- The base URL for the API is taken from the configured credentials.
- The node sends a POST request to
/v1/documents/with the document data.
Troubleshooting
- Missing Required Fields: Errors may occur if the Knowledge Base ID or Content fields are empty. Ensure these required inputs are provided.
- Invalid Chunking Config: If chunk size or overlap values are invalid (e.g., negative numbers), the API might reject the request. Use sensible positive integers.
- Authentication Failures: If the API key or token is missing or incorrect, the node will fail to authenticate. Verify credential setup.
- API Endpoint Issues: Network errors or incorrect base URL configurations can cause request failures. Confirm the API URL is correct and reachable.
- Metadata Format: Invalid JSON in the Metadata property could cause errors. Validate JSON syntax before submission.
Links and References
- Ragdoll AI API Documentation (general reference for API endpoints and usage)
- n8n documentation on HTTP Request Node for understanding how API calls are made
- JSON validation tools for verifying metadata input correctness