Actions13
- Agent Actions
- Datastore Actions
- Query Actions
- Reranker Actions
- LMUnit Actions
- Parser Actions
Overview
The "Ingest Document" operation for the Datastore resource allows users to upload and ingest binary documents into a specified datastore. This is useful for scenarios where you want to store, index, or process documents such as PDFs, images, or other file types within a managed datastore for later retrieval, analysis, or AI-powered querying.
Practical examples include:
- Uploading scanned contracts or invoices into a document management system.
- Ingesting research papers or reports into a knowledge base for semantic search.
- Adding multimedia files to a content repository that supports AI-based tagging or classification.
Properties
| Name | Meaning |
|---|---|
| Datastore ID | The unique identifier of the datastore where the document(s) will be ingested. |
| Input Binary Field(s) | The name(s) of the binary field(s) in the input data to ingest. If left empty, all binary fields are used. |
| Metadata (JSON String) | Optional metadata provided as a JSON string. This should be a flat dictionary of key-value pairs to associate with the ingested document. |
| Authentication | Method of authentication to use; currently supports using an API key credential. |
Output
The node outputs JSON data representing the result of the ingestion operation. Typically, this includes confirmation details such as document IDs, status messages, or any returned metadata from the datastore service after ingestion.
If the node handles binary data, it would relate to the input binary fields being ingested, but the output primarily focuses on JSON responses confirming successful ingestion.
Dependencies
- Requires an API key credential for authenticating requests to the external Contextual AI service.
- The node depends on the external Contextual AI platform's API to perform the ingestion.
- Proper configuration of the API key credential in n8n is necessary before use.
Troubleshooting
Common issues:
- Providing an invalid or empty Datastore ID will cause the ingestion to fail.
- Incorrectly formatted metadata JSON string can lead to parsing errors.
- Specifying a binary field name that does not exist in the input data will result in no data being ingested.
- Missing or invalid API key credentials will prevent authentication.
Error messages and resolutions:
- "Invalid Datastore ID" — Verify the datastore ID is correct and exists.
- "Metadata JSON parse error" — Ensure the metadata string is valid JSON and properly formatted as a flat dictionary.
- "No binary data found" — Check that the specified binary field names match those in the input items.
- "Authentication failed" — Confirm the API key credential is set up correctly and has proper permissions.
Links and References
- Contextual AI Documentation (hypothetical link)
- n8n documentation on working with binary data
- General guide on using API key credentials in n8n