N8N Tools - Typebot API icon

N8N Tools - Typebot API

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

Overview

This node integrates with the Typebot.io API to manage and interact with chatbots (called "typebots") and their chat sessions. Specifically, the Start Chat operation initiates a new chat session with a published typebot using its public ID. It sends a user message to the chatbot and can optionally prefill variables, enable streaming for real-time responses, and customize the chat appearance and behavior.

Common scenarios where this node is beneficial include:

  • Starting automated conversations with a chatbot embedded on a website or app.
  • Triggering chatbot interactions from workflows based on external events.
  • Prefilling user-specific data into the chatbot to personalize the conversation.
  • Enabling streaming mode to receive partial chatbot responses in real time.

Practical example:

  • A customer support workflow that starts a chat session with a published chatbot when a user submits a form, sending the initial message and prefilled user details to personalize the experience.

Properties

Name Meaning
Typebot ID The unique identifier of the typebot (not used directly in Start Chat but required for other ops).
Public ID The public identifier of the published typebot to start a chat session with.
Message The initial message text to send to the typebot to start the conversation.
Additional Fields Optional extra settings including:
- Stream Enabled Enable streaming mode to receive real-time partial responses from the chatbot (boolean).
- Prefilled Variables Key-value pairs of variables to prefill in the chatbot before starting the chat (array of name/value).
- Result ID An existing result ID to continue a previous conversation context (string).
- Theme JSON object defining custom theme configuration for the chat UI.
- Settings JSON object defining custom settings for the chat session.
- Icon Emoji or URL string to set a custom icon for the typebot during the chat.

Output

The node outputs a JSON object representing the response from the Typebot API after starting the chat session. This typically includes:

  • Session identifiers and metadata about the newly created chat session.
  • The chatbot's initial reply or streamed partial replies if streaming is enabled.
  • Any additional data returned by the Typebot service relevant to the chat session state.

No binary data output is produced 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 makes HTTP POST requests to the Typebot API endpoints via a proxy service.

Troubleshooting

  • Invalid Public ID: If the provided public ID is incorrect or the typebot is not published, the API will return an error. Verify the public ID corresponds to a published typebot.
  • Missing Required Fields: Ensure the message and publicId fields are provided; otherwise, the request will fail.
  • Streaming Issues: If streaming is enabled but no partial responses are received, check network connectivity and API support for streaming.
  • JSON Parsing Errors: Custom theme or settings must be valid JSON strings; invalid JSON will cause errors.
  • API Authentication Failures: Confirm that the API key and token credentials are correctly set up and have sufficient permissions.

Links and References

Discussion