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 such as users, scores, projects, steps, files, threads, datasets, experiments, and prompts. Specifically for the Thread - Get One operation, it retrieves detailed information about a single thread by its unique identifier.

Common scenarios where this node is beneficial include:

  • Fetching conversation or discussion thread details in an AI-driven collaboration or messaging platform.
  • Retrieving metadata and participant information of a specific thread for further processing or display.
  • Integrating thread data into workflows that require context from previous interactions.

Example use case:

  • You have a workflow that processes user conversations stored as threads. Using this node, you can fetch a particular thread’s details by providing its ID, then analyze or route the data accordingly.

Properties

Name Meaning
Thread ID The unique identifier of the thread to retrieve. This is a required string input.

Output

The node outputs a JSON object under the json field containing the full content of the requested thread as returned by the Literal AI API. This includes all available thread details such as its ID, name, metadata, participants, tags, and any other associated information.

If the operation succeeds, the output structure looks like:

{
  "content": {
    /* thread details object */
  }
}

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Literal AI API via an API key credential configured in n8n.
  • The node uses the official Literal AI client library (@literalai/client) to communicate with the API.
  • Proper API permissions are needed to access thread data.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Thread ID will likely result in an error from the API indicating the thread was not found.
    • Missing or incorrect API credentials will cause authentication failures.
    • Network connectivity problems may prevent successful API calls.
  • Error messages and resolutions:

    • "Thread not found": Verify the Thread ID is correct and exists in the Literal AI system.
    • "Authentication failed": Check that the API key credential is correctly set up and has necessary permissions.
    • Timeout or network errors: Ensure stable internet connection and that the Literal AI API endpoint is reachable.

Links and References

Discussion