N8N Tools - Typebot API icon

N8N Tools - Typebot API

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

Overview

This node provides a comprehensive integration with Typebot.io, a self-hosted chatbot builder platform that allows creating and managing chatbots with visual flow design. It supports managing typebots (chatbots), handling chat sessions, retrieving conversation results, and managing workspaces.

Common scenarios where this node is beneficial include:

  • Automating chatbot management tasks such as creating, updating, publishing, or deleting chatbots.
  • Starting and continuing chat sessions programmatically to integrate chatbot conversations into workflows.
  • Exporting and analyzing conversation results for insights.
  • Managing workspace members and settings.

Practical examples:

  • Automatically start a chat session when a user submits a form and continue the conversation based on user input.
  • Export chatbot conversation results in CSV or JSON format for reporting.
  • Update chatbot configurations dynamically during active chat sessions.
  • Invite new members to a workspace as part of an onboarding workflow.

Properties

Name Meaning
Additional Fields A collection of optional fields to customize requests, including:
Stream Enabled: Enable streaming for real-time chat responses.
Prefilled Variables: Key-value pairs to prefill variables in the chatbot.
Result ID: Existing result ID to continue a conversation.
Theme: Custom theme configuration as JSON.
Settings: Custom settings as JSON.
Icon: Emoji or URL for the chatbot icon.
Typebot JSON: Full chatbot configuration as JSON for import or update.
Export Format: Format for exporting results; options are CSV, JSON, Excel.
Filename: Custom filename for file uploads.
File Size Limit MB: Maximum allowed file size in megabytes.

Note: The node also uses other parameters depending on the operation, such as typebotId, publicId, sessionId, message, resultId, folderId, and typebotName which are required or optional based on the selected resource and operation.

Output

The node outputs an array of JSON objects corresponding to each input item processed. Each output item contains:

  • json: The response data from the Typebot API call, which varies by operation. This can include chatbot details, chat session responses, conversation results, workspace information, or confirmation of actions performed.
  • pairedItem: Metadata linking the output to the input item index.

If the node handles file uploads or exports, the output may include data representing exported files or upload URLs, but binary data handling is not explicitly detailed in the code.

Dependencies

  • Requires an API key credential for authenticating with the Typebot API.
  • Needs configuration of the Typebot API base URL and authentication token.
  • Uses an external proxy service (https://n8ntools.io/api/v1/proxy/typebot) to forward requests to the Typebot API.
  • Requires n8n environment to have the appropriate credentials configured for secure access.

Troubleshooting

  • Unknown Resource or Operation Errors: If an unsupported resource or operation is selected, the node throws an error indicating the unknown resource or operation. Ensure you select valid combinations.
  • Authentication Failures: Missing or invalid API keys or tokens will cause authorization errors. Verify credentials are correctly set up.
  • JSON Parsing Errors: When providing JSON strings for properties like theme, settings, or typebotJson, ensure the JSON is well-formed to avoid parsing exceptions.
  • Streaming Issues: Enabling streaming requires proper handling of streamed responses downstream; otherwise, it might cause unexpected behavior.
  • File Upload Limits: Exceeding the specified file size limit will likely cause upload failures. Adjust the fileSizeLimitMb property accordingly.

Links and References

Discussion