Literal AI icon

Literal AI

Use the Literal AI API

Overview

The node integrates with the Literal AI API to manage "threads" within the Literal AI platform. Specifically, for the Thread - Create or Update operation, it allows users to either create a new thread or update an existing one by providing a thread ID and optional additional details such as name, metadata, participant ID, and tags.

This node is useful in scenarios where you want to programmatically organize conversations, discussions, or grouped data entities (threads) in Literal AI. For example, you might use it to:

  • Create a new discussion thread with specific participants and tags.
  • Update an existing thread’s metadata or rename it.
  • Manage threads dynamically based on external triggers or workflows.

Properties

Name Meaning
Thread ID The unique identifier of the thread to create or update.
Additional Fields Optional extra information about the thread:
- Name The display name of the thread.
- Metadata JSON object containing additional metadata for the thread.
- Participant ID Identifier of a participant associated with the thread.
- Tags Comma-separated list of tags to categorize or label the thread.

Output

The node outputs a JSON object under the json field with a single property:

  • content: This contains the response from the Literal AI API after creating or updating the thread. It typically includes the thread's details such as its ID, name, metadata, participants, and tags as stored or updated in the Literal AI system.

No binary data output is produced by this operation.

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 Thread ID: If the provided thread ID does not exist when attempting to update, the API may return an error. Ensure the thread ID is correct or create a new thread instead.
  • Malformed Metadata JSON: The metadata field must be valid JSON. Invalid JSON will cause parsing errors. Validate JSON syntax before input.
  • Tags Formatting: Tags should be comma-separated strings without extra spaces. Improper formatting might lead to unexpected tag assignments.
  • API Authentication Errors: Missing or incorrect API key credentials will result in authentication failures. Verify that the API key is correctly set up in n8n credentials.
  • Network or API Downtime: Temporary network issues or API service downtime can cause request failures. Retry after some time or check Literal AI service status.

Links and References

Discussion