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. This preview mode is designed for testing purposes, where interactions do not get saved or recorded permanently. It enables sending a message to a specific Typebot instance and receiving responses in real-time, optionally with streaming enabled for live updates.

This node is beneficial when you want to test how your chatbot responds to various inputs without affecting production data or saving conversation history. For example, before publishing a new version of a chatbot, you can use this operation to simulate user interactions and verify the bot's behavior.

Properties

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

Output

The output is a JSON object representing the response from the Typebot API after starting the preview chat session. It typically includes:

  • The chatbot's reply message(s).
  • Session metadata such as session identifiers.
  • Any streamed content if streaming was enabled.
  • Status or error information if applicable.

No binary data is output by this operation.

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 node sends HTTP requests to the Typebot API endpoints and also uses a proxy service endpoint for request forwarding.

Troubleshooting

  • Common Issues:

    • Invalid or missing Typebot ID will cause the API call to fail.
    • Incorrectly formatted JSON in "Theme" or "Settings" fields may lead to parsing errors.
    • Network or authentication failures due to invalid API tokens or keys.
    • Using streaming without proper handling on the client side might cause incomplete data processing.
  • Error Messages:

    • "Unknown chat operation: startPreviewChat" indicates a misconfiguration or unsupported operation name.
    • API authorization errors suggest checking the API token and key credentials.
    • JSON parse errors for theme/settings mean the provided JSON is malformed; validate JSON syntax before input.

Links and References

Discussion