Actions41
- Step/Generation Actions
- Thread Actions
- User Actions
- Dataset Actions
- Experiment Actions
- File Actions
- Prompt Actions
- Score Actions
Overview
This node integrates with the Literal AI API to manage datasets and their items. Specifically, the "Create Item" operation under the "Dataset" resource allows users to add a new item to an existing dataset by providing input data in JSON format. This is useful for workflows that involve dynamically building or updating datasets with new entries, such as adding training examples, test cases, or records for machine learning or data analysis purposes.
Practical examples:
- Adding a new user interaction record to a dataset used for training a chatbot.
- Inserting a new labeled example into a dataset for AI model evaluation.
- Appending structured input data to a dataset for further processing or experimentation.
Properties
| Name | Meaning |
|---|---|
| Dataset ID | The unique identifier of the dataset where the new item will be created. |
| Input Data | The JSON-formatted input data representing the content of the new dataset item to add. |
Output
The node outputs a JSON object under the json field containing the response from the Literal AI API after creating the dataset item. This typically includes details about the newly created item such as its ID, input data, timestamps, and any other metadata returned by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for the Literal AI service to authenticate requests.
- The node depends on the official Literal AI client library (
@literalai/client) bundled within the node. - Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Invalid or missing Dataset ID: Ensure the Dataset ID provided exists and is correctly formatted.
- Malformed JSON in Input Data: The input must be valid JSON; otherwise, parsing errors will occur.
- Authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
- Network or API errors: Temporary connectivity issues or API rate limits may cause failures.
Error messages:
"error": "Invalid JSON"— Check the syntax of the Input Data property."error": "Dataset not found"— Confirm the Dataset ID is correct and accessible."error": "Unauthorized"— Recheck the API key credential configuration.
To resolve these, validate inputs carefully, ensure credentials are current, and consult Literal AI API documentation for error specifics.
Links and References
- Literal AI API Documentation (general reference for API endpoints and data formats)
- n8n Documentation (for configuring credentials and using custom nodes)