Chat Data icon

Chat Data

Basic Chat Data Node

Overview

The node enables creating a new chatbot by specifying its name, model type, and training data. It supports different chatbot models including custom-trained ones using your own knowledge base text or URLs to scrape, as well as predefined medical chat models and custom backend endpoints.

This node is useful when you want to programmatically create chatbots tailored to specific domains or datasets, for example:

  • Creating a veterinary medical chatbot trained on specialized texts.
  • Building a chatbot trained on your own documents or web pages by uploading source text or scraping URLs.
  • Integrating with your own AI backend by specifying a custom endpoint and authorization token.

Properties

Name Meaning
Chatbot Name The name to assign to the newly created chatbot. This is a required string input.
Model The chatbot model type to use. Options:
• Train With Your Own Knowledge Base (custom-data-upload)
• Veterinarity Medical Chat Model (medical-chat-vet)
• Human Medical Chat Model (medical-chat-human)
• Your Own Backend Endpoint (custom-model)
Source Text Text content used to train the chatbot. Only applicable if the selected model is "Train With Your Own Knowledge Base". Multi-line string input.
URLs to Scrape One or more URLs to scrape and use as training data. Only applicable if the model is "Train With Your Own Knowledge Base". Each URL is specified individually.
Custom Backend The URL of a custom backend endpoint to handle chatbot requests. Only used when the model is "Your Own Backend Endpoint".
Bearer Token Authorization bearer token to access the custom backend endpoint. Only used when the model is "Your Own Backend Endpoint".

Output

The output JSON contains the response from the chatbot creation API call. Typically, it includes:

  • Confirmation of success.
  • Details about the created chatbot such as its ID and configuration.
  • Any error messages if the creation failed.

No binary data is output by this node.

Example output structure (simplified):

{
  "status": "success",
  "chatbotId": "string",
  "chatbotName": "string",
  "model": "string",
  "message": "Chatbot created successfully"
}

Dependencies

  • Requires an API key credential configured in n8n to authenticate against the chatbot service's REST API.
  • The node makes HTTP POST requests to the /api/v2/create-chatbot endpoint of the configured base URL.
  • Proper network connectivity and valid credentials are necessary.

Troubleshooting

  • Missing or invalid API credentials: The node will throw errors if the base URL or API key is missing or incorrect. Verify your credential setup.
  • Invalid input parameters: Required fields like chatbot name must be provided; otherwise, the node throws validation errors.
  • API errors: If the external service returns an error status, the node surfaces the message. Check the message for details such as invalid model type or malformed training data.
  • Empty training data: When using the "Train With Your Own Knowledge Base" model, ensure that either source text or URLs to scrape are provided; otherwise, the chatbot may not train properly.
  • Custom backend issues: For the "Your Own Backend Endpoint" model, verify that the custom backend URL and bearer token are correct and accessible.

If the node is set to continue on fail, errors will be included in the output JSON under an error property instead of stopping execution.

Links and References

Discussion