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, a self-hosted chatbot builder platform that allows creating and managing chatbots with visual flows. Specifically, the Save Client Logs operation under the Chat resource enables saving client-side logs from an active chat session. This is useful for debugging and troubleshooting issues encountered during user interactions with a chatbot.

Typical use cases include:

  • Collecting detailed client-side logs to diagnose problems in chatbot conversations.
  • Storing logs for audit or analysis purposes.
  • Enhancing support workflows by capturing user interaction data on the client side.

For example, after a user interacts with a chatbot session, you can save the logs generated on the client (such as errors, warnings, or custom debug information) back to the Typebot system for later review.

Properties

Name Meaning
Session ID The unique identifier of the chat session from a previous interaction.
Additional Fields A collection of optional fields including:
- Stream Enabled Enable streaming for real-time responses (boolean).
- Prefilled Variables Variables to prefill in the typebot, each with a name and value.
- Result ID Existing result ID to continue conversation (string).
- Theme Custom theme configuration as JSON.
- Settings Custom settings as JSON.
- Icon Typebot icon, either an emoji or URL string.
- Typebot JSON Typebot 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 File size limit in megabytes for uploads (number).
- Logs Array of client-side log entries to be saved (specific to Save Client Logs operation).

Note: For the Save Client Logs operation, the key additional field used is logs, which should be an array containing the client logs to save.

Output

The node outputs a JSON object representing the response from the Typebot API after attempting to save the client logs. The structure typically includes confirmation of the saved logs or error details if the operation failed.

Example output JSON structure:

{
  "json": {
    // Response data from Typebot API about the saved logs
  }
}

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Typebot API.
  • Needs the Typebot API base URL and an API token configured in the node credentials.
  • The node sends requests to the Typebot API endpoints and also uses a proxy service hosted at https://n8ntools.io/api/v1/proxy/typebot with an additional API key for request forwarding.

Troubleshooting

  • Common Issues:

    • Invalid or missing session ID will cause the API call to fail.
    • Incorrectly formatted logs (not an array) may lead to errors.
    • Network or authentication failures due to invalid API keys or tokens.
  • Error Messages:

    • "Unknown chat operation: saveClientLogs": Indicates a misconfiguration of the operation parameter.
    • API errors returned from Typebot (e.g., 401 Unauthorized, 404 Not Found) usually mean invalid credentials or session IDs.
  • Resolutions:

    • Ensure the session ID corresponds to an active chat session.
    • Validate the logs array format before sending.
    • Verify API credentials and permissions.
    • Use the node's "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion