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, specifically focusing on managing chat sessions and conversations. The "Save Client Logs" operation allows users to save client-side logs related to a specific chat session. This is particularly useful for debugging and troubleshooting issues that occur during user interactions with a chatbot built using Typebot.

Typical use cases include:

  • Collecting detailed client-side logs after a chat session to diagnose problems.
  • Storing logs for audit or quality assurance purposes.
  • Enhancing support workflows by providing developers or support teams with contextual logs from user sessions.

For example, after a user interacts with a chatbot, you can use this node to send the collected client logs (such as errors, warnings, or custom debug information) back to the Typebot service for storage and later analysis.

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 provided as JSON.
- Settings Custom settings provided as JSON.
- Icon Typebot icon specified as an emoji or URL string.
- Typebot JSON Typebot configuration as JSON for import or update operations.
- Export Format Format for exporting results; options are CSV, JSON, or Excel.
- Filename Custom filename for file uploads (string).
- 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 logs being saved 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 HTTP requests to the Typebot API endpoints.
  • No other external dependencies are required.

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 or unsupported operation; ensure the operation is correctly set.
    • API authorization errors: Check that the API key and token credentials are valid and have necessary permissions.
    • Validation errors from the API: Verify that the logs field is properly structured and contains valid log entries.
  • Resolution Tips:

    • Double-check the session ID and ensure it corresponds to an active or existing chat session.
    • Validate the format of the logs before sending.
    • Confirm that credentials are correctly set up in n8n and have not expired or been revoked.

Links and References

Discussion