N8N Tools - Typebot API icon

N8N Tools - Typebot API

Complete Typebot.io integration - Self-hosted chatbot builder with visual flows

Overview

The Start Preview Chat operation in the Chat resource allows users to initiate a preview chat session with a Typebot chatbot for testing purposes. Unlike a regular chat session, this preview mode does not save any conversation data, making it ideal for developers or testers who want to interact with the bot and verify its behavior without affecting production data.

Typical use cases include:

  • Testing new chatbot flows before publishing.
  • Debugging chatbot responses in a safe environment.
  • Experimenting with different input messages or prefilled variables without creating persistent chat sessions.

For example, a user can send a test message to a specific Typebot by its ID and receive an immediate response streamed in real-time if enabled, all without saving the chat history.

Properties

Name Meaning
Typebot ID The unique identifier of the Typebot to start the preview chat with.
Message The message text to send to the Typebot in the preview chat session.
Additional Fields Optional extra settings including:
- Stream Enabled Enable streaming mode for receiving real-time partial responses (true/false).
- Prefilled Variables Key-value pairs to prefill variables in the Typebot before starting the chat.
- Result ID An existing result ID to continue a previous conversation context (optional).
- Theme JSON object defining custom theme configuration for the chat interface.
- Settings JSON object for additional custom settings related to the chat session.
- Icon Emoji or URL string to set a custom icon for the Typebot during the preview chat.

Output

The node outputs a JSON object representing the response from the Typebot API for the started preview chat session. This typically includes:

  • The chatbot's reply message(s).
  • Session metadata such as session identifiers or status.
  • If streaming is enabled, partial responses may be included progressively.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "sessionId": "string",
  "messages": [
    {
      "from": "typebot",
      "text": "Response message text"
    }
  ],
  "status": "success"
}

Dependencies

  • Requires an API key credential for authenticating with the Typebot API.
  • Needs the base API URL and an authentication token configured in the node credentials.
  • The workspace ID is used internally to scope requests.
  • The node makes HTTP POST requests to the Typebot API endpoint /api/v1/typebots/{typebotId}/preview/startChat.

Troubleshooting

  • Invalid Typebot ID: If the provided Typebot ID is incorrect or does not exist, the API will return an error. Verify the ID is correct.
  • Authentication errors: Ensure that the API key and token credentials are valid and have sufficient permissions.
  • Malformed JSON in Additional Fields: Custom theme or settings fields require valid JSON. Invalid JSON will cause parsing errors.
  • Streaming issues: If streaming is enabled but no partial responses are received, check network connectivity and API support for streaming.
  • Missing required parameters: The Typebot ID and Message fields are mandatory; missing these will cause the node to fail.

Links and References

Discussion