Actions13
- Agent Actions
- Datastore Actions
- Query Actions
- Reranker Actions
- LMUnit Actions
- Parser Actions
Overview
The node "Contextual AI" provides access to various Contextual AI tools, including operations related to agents, parsing, querying, and reranking. Specifically, the "Get Document Metadata" operation under the "Datastore" resource allows users to retrieve metadata information about a specific document stored in a datastore.
This node is beneficial when you need to programmatically access metadata details of documents within a datastore, such as for auditing, indexing, or further processing workflows that depend on document attributes without fetching the entire document content.
Practical example:
- Automatically retrieving metadata like creation date, author, or tags of a document before deciding whether to process or archive it.
- Integrating with a document management system where metadata drives workflow decisions.
Properties
| Name | Meaning |
|---|---|
| Datastore ID | The unique identifier of the datastore containing the document whose metadata is needed. |
| Document ID | The unique identifier of the document to retrieve metadata for. |
| Authentication | Method of authentication to use; currently supports "API Key". |
Output
The output of this node is a JSON object containing the metadata of the specified document. This metadata typically includes attributes such as document properties, timestamps, authorship, tags, or any other descriptive information stored alongside the document in the datastore.
If multiple items are returned (e.g., in batch mode), the output will be an array of such metadata objects.
The node does not output binary data for this operation; it focuses solely on metadata retrieval.
Dependencies
- Requires an API key credential for authenticating requests to the Contextual AI service.
- The node depends on the external Contextual AI platform's API to fetch document metadata.
- Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Invalid or missing Datastore ID or Document ID will result in errors or empty responses.
- Incorrect or expired API key credentials will cause authentication failures.
- Network connectivity issues can prevent communication with the Contextual AI API.
Error messages and resolutions:
- "Authentication failed" — Verify that the API key credential is correctly configured and valid.
- "Document not found" — Check that the provided Document ID exists within the specified Datastore ID.
- "Invalid parameters" — Ensure that all required fields (Datastore ID, Document ID) are provided and correctly formatted.
Links and References
- Contextual AI Official Documentation (hypothetical link)
- n8n Documentation on Creating Custom Nodes