Chat Data icon

Chat Data

Basic Chat Data Node

Overview

The node facilitates sending messages to a chatbot via an API. It allows users to specify one or more messages with roles (user or assistant) and content, then sends these messages to the selected chatbot. The node supports continuing conversations by appending messages or starting fresh, selecting different AI models for response generation, and optionally streaming partial responses.

This node is useful in scenarios where automated conversational interactions are needed, such as customer support bots, virtual assistants, or any application requiring dynamic chat-based communication. For example, it can be used to send user queries to a chatbot and receive AI-generated replies, enabling integration of conversational AI into workflows.

Properties

Name Meaning
Chatbot Name or ID Select a chatbot from the list or specify its ID to which the message(s) will be sent.
Messages One or more messages to send in the conversation. Each message includes:
- Role: "User" or "Assistant" indicating the sender's role.
- Content: The text content of the message.
Additional Fields Optional extra settings:
- Conversation ID: ID of the current conversation; if omitted, a new one is generated.
- Base Model: Choose the AI model to use ("GPT 3.5", "GPT 4o", "GPT 4"). Overrides chatbot default.
- Base Prompt: Override the chatbot's base prompt when processing context.
- Append Messages: Boolean to append messages to previous conversation (true) or replace all (false).
- Stream Response: Boolean to stream partial responses as they arrive or wait for full completion.

Output

The node outputs a JSON object under the json.output field containing the chatbot's response data returned from the API. This typically includes the generated reply and any metadata provided by the chatbot service.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the chatbot service.
  • Needs the base URL of the chatbot API configured in credentials.
  • Relies on HTTP POST requests to the chatbot API endpoint /api/v2/chat.

Troubleshooting

  • Missing or invalid API credentials: The node requires a valid API key and base URL. Errors about missing base URL or authorization failures indicate credential misconfiguration.
  • Empty messages array: At least one message must be provided; otherwise, the node throws an error.
  • API errors: If the chatbot API returns an error status, the node surfaces the error message. Common causes include invalid chatbot ID, malformed request body, or exceeding usage limits.
  • JSON parsing errors: When specifying additional fields like base prompt, ensure valid string inputs.
  • Streaming issues: If streaming is enabled but not supported by the environment, responses may fail or hang.

To resolve errors:

  • Verify API credentials and permissions.
  • Ensure at least one message with valid role and content is provided.
  • Check that the chatbot ID corresponds to an existing chatbot.
  • Use the correct model names as options.
  • Disable streaming if unsupported.

Links and References

Discussion