Literal AI icon

Literal AI

Use the Literal AI API

Overview

This node integrates with the Literal AI API to perform various operations on different resources, including datasets. Specifically, for the Dataset resource and the "Get Item" operation, it retrieves a single dataset item by its unique ID. This is useful when you want to fetch detailed information about a specific entry within a dataset managed in Literal AI.

Common scenarios include:

  • Retrieving metadata or content of a particular dataset item for further processing or analysis.
  • Using the dataset item data as input for subsequent workflow steps, such as transformations or conditional logic.
  • Debugging or auditing dataset contents by fetching individual items.

Example: You have a dataset of user feedback entries stored in Literal AI, and you want to retrieve one specific feedback item by its ID to analyze or display it.

Properties

Name Meaning
Dataset Item ID The unique identifier of the dataset item to retrieve. This is required to specify which item to fetch from the dataset.

Output

The node outputs a JSON object under the content field containing the full details of the requested dataset item as returned by the Literal AI API. This typically includes all properties of the dataset item such as its input data, metadata, timestamps, and any other associated fields.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "content": {
    "id": "string",
    "input": { /* dataset item input data */ },
    "metadata": { /* optional metadata */ },
    "createdAt": "timestamp",
    "updatedAt": "timestamp",
    // other dataset item fields...
  }
}

Dependencies

  • Requires an API key credential for the Literal AI API to authenticate requests.
  • The node uses the official Literal AI client library (@literalai/client) to interact with the API.
  • Proper configuration of the API key credential in n8n is necessary before using this node.

Troubleshooting

  • Invalid or missing Dataset Item ID: If the provided ID is incorrect or empty, the API will likely return an error indicating the item was not found. Ensure the ID is correct and exists in the target dataset.
  • Authentication errors: If the API key credential is invalid or missing, authentication will fail. Verify that the API key is correctly set up in n8n credentials.
  • API rate limits or network issues: Temporary failures may occur due to network problems or API rate limiting. Retrying after some time or checking network connectivity can help.
  • JSON parsing errors: Some parameters expect JSON strings (not applicable for this operation but relevant for others). Make sure JSON inputs are well-formed if used elsewhere.

Links and References

Discussion