Actions30
- Dataset Actions
- Document Actions
- Segment Actions
- Metadata Actions
Document → Get
AI-generatedOverview
The node "Dify Knowledge Base" enables managing AI knowledge base datasets, documents, segments, and metadata through a variety of CRUD (Create, Read, Update, Delete) operations. Specifically for the Document - Get operation, it retrieves detailed information about a specific document within a dataset.
This node is useful in scenarios where you need to programmatically access documents stored in an AI knowledge base, such as fetching document content or metadata for further processing, analysis, or integration with other systems.
Practical example:
You have a dataset containing multiple documents representing product manuals. Using this node's Document Get operation, you can retrieve a particular manual by its ID to display it in a custom application or to analyze its content.
Properties
| Name | Meaning |
|---|---|
| Dataset ID | The unique identifier of the dataset that contains the document. |
| Document ID | The unique identifier of the document to retrieve from the specified dataset. |
Output
The output of the Document Get operation is a JSON object representing the retrieved document's data. This typically includes all relevant fields describing the document, such as its content, metadata, status, and any other attributes managed by the knowledge base API.
- The
jsonoutput field contains the full document details. - There is no indication that binary data is returned for this operation.
Dependencies
- Requires an API key credential for authenticating requests to the Dify AI knowledge base service.
- The node uses the base URL and authorization token configured in the credentials to communicate with the external Dify API.
- No additional external dependencies are indicated.
Troubleshooting
Common issues:
- Invalid or missing Dataset ID or Document ID will cause the operation to fail.
- Authentication errors if the API key or base URL is incorrect or expired.
- Network connectivity problems may prevent successful API calls.
Error messages:
"The operation "get" is not supported for resource "document": This indicates a misconfiguration of the operation parameter.- Errors related to invalid IDs or permissions will be returned from the API and surfaced in the node's error output.
Resolution tips:
- Verify that both Dataset ID and Document ID are correctly provided and exist in the knowledge base.
- Ensure the API key credential is valid and has necessary permissions.
- Use the node's "Continue On Fail" option to handle errors gracefully during batch executions.
Links and References
- Dify AI Knowledge Base Documentation (general reference for API capabilities)
- n8n documentation on creating custom nodes for further customization guidance