Zep v3 icon

Zep v3

Interact with Zep Cloud v3 API

Overview

This node operation allows you to add multiple messages in batch to an existing conversation thread within the Zep Cloud v3 platform. It is useful for scenarios where you want to programmatically append a series of chat messages or conversation entries to a specific thread, such as importing chat logs, syncing messages from another system, or automating message additions in bulk.

For example, if you have a customer support chat thread and want to add several messages at once (e.g., from a transcript), this operation efficiently sends all those messages in one API call rather than individually.

Properties

Name Meaning
Thread ID The unique identifier of the thread to which the messages will be added.
Messages A collection of messages to add. Each message includes:
- Role: The role of the message sender (string).
- Role Type: The type of role; options are User, Assistant, or System.
- Content: The textual content of the message.

Output

The output JSON contains the response from the Zep Cloud API after adding the batch of messages to the specified thread. This typically includes confirmation details about the messages added or any metadata returned by the API.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Zep Cloud v3 API.
  • Requires an API key credential configured in n8n for authenticating requests to the Zep API.
  • The base URL used for API calls is https://api.getzep.com.

Troubleshooting

  • Common Issues:

    • Invalid or missing Thread ID: Ensure the Thread ID provided exists and is correct.
    • Empty or improperly formatted messages array: Each message must include required fields (role and content).
    • Authentication errors: Verify that the API key credential is correctly set up and has necessary permissions.
    • Network issues or API downtime can cause request failures.
  • Error Messages:

    • "Unknown thread operation": Indicates an unsupported operation was requested; verify operation name.
    • HTTP 4xx or 5xx errors: Check API key validity, thread existence, and message payload format.
    • JSON parsing errors: Ensure the messages input is properly structured as per the defined schema.

Links and References


Summary of Relevant Code Logic for "Add Messages to a Thread in Batch"

  • Retrieves threadId and messages parameters from node input.
  • Maps each message to an object with role, role_type, and content.
  • Sends a POST request to endpoint /api/v2/threads/{threadId}/messages/batch with the messages array in the body.
  • Uses the configured API key credential for authentication.
  • Returns the API response as node output.

Discussion