Zep v3 icon

Zep v3

Interact with Zep Cloud v3 API

Overview

The "Add Session Messages" operation in the Session resource allows users to append one or more messages to an existing session within the Zep Cloud v3 API. This is useful for applications that manage conversational data or chat histories, where you want to programmatically add new messages to a session's message log.

Typical use cases include:

  • Chatbots or virtual assistants appending user and assistant messages to a session.
  • Logging conversation history for customer support sessions.
  • Storing system-generated messages or context updates in a session.

For example, after a user sends a message to a chatbot, this node can add that message along with the assistant's response to the session's message list, maintaining a complete conversation record.

Properties

Name Meaning
Session ID The unique identifier of the session to which 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 messages to the specified session. It typically includes confirmation details such as the updated list of messages or status information about the addition.

If the API supports it, the output may also include metadata about the session or the newly added messages.

This node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the Zep Cloud v3 API.
  • The node makes HTTP requests to https://api.getzep.com/api/v2/sessions/{sessionId}/messages endpoint.
  • Proper configuration of the API key credential in n8n is necessary for successful authentication.

Troubleshooting

  • Common issues:

    • Invalid or missing Session ID: Ensure the Session ID provided exists and is correct.
    • Empty or improperly formatted messages: Each message must have a role and content; missing these will cause errors.
    • Authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
    • Network or API downtime: Check connectivity and API status if requests fail unexpectedly.
  • Error messages:

    • "Unknown session operation": Indicates an unsupported operation was requested; verify the operation name.
    • HTTP 401 Unauthorized: Authentication failed; check API key credentials.
    • HTTP 400 Bad Request: Likely due to invalid input parameters; review the messages array and session ID.

Resolving these usually involves verifying input parameters, ensuring valid credentials, and checking network connectivity.

Links and References

Discussion