N8N Tools - Typebot API
Actions23
- Typebot Actions
- Chat Actions
- Result Actions
- Workspace Actions
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 "Update Typebot in Session" operation updates the configuration of an active chatbot session by sending new or modified Typebot JSON configuration to the ongoing chat session identified by a session ID.
This operation is useful when you want to dynamically change the behavior, flow, or appearance of a chatbot during an active conversation without starting a new session. For example, you might update the chatbot's logic based on user input or external events, or apply a new theme or settings mid-session.
Practical examples:
- Adjusting the chatbot's questions or responses on the fly based on previous answers.
- Injecting new variables or changing the flow structure while a user is chatting.
- Updating the chatbotβs UI theme or icon dynamically during a session.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the active chat session to update. |
| Additional Fields | A collection of optional fields to customize the update: |
| - Stream Enabled | Enable or disable streaming for real-time responses (boolean). |
| - Prefilled Variables | Variables to prefill in the typebot; each variable has a name and value (multiple allowed). |
| - Result ID | Existing result ID to continue conversation (string). |
| - Theme | Custom theme configuration as JSON to style the chatbot interface. |
| - Settings | Custom settings as JSON to configure chatbot behavior. |
| - Icon | Typebot icon specified as an emoji or URL string. |
| - Typebot JSON | The main JSON configuration object for the typebot, used to update the chatbot in the session. |
Note: For this specific operation ("Update Typebot in Session"), the key property is Session ID and Typebot JSON inside Additional Fields, which contains the updated chatbot configuration.
Output
The node outputs a JSON object representing the response from the Typebot API after updating the chatbot session. This typically includes confirmation of the update and any relevant data returned by the API about the session state.
The output is structured as:
{
"json": {
// API response data confirming the update or providing session details
},
"pairedItem": {
"item": <index_of_input_item>
}
}
There is no binary data output for this operation.
Dependencies
- Requires an API key credential for authenticating with the Typebot API.
- Needs the base URL and API token for the Typebot service, configured in the node credentials.
- The node uses HTTP requests to communicate with the Typebot API endpoints.
- No additional external dependencies beyond the Typebot API and n8n environment.
Troubleshooting
Common issues:
- Invalid or expired session ID: The session ID must correspond to an active chat session; otherwise, the API will reject the update.
- Malformed Typebot JSON: The JSON configuration provided must be valid and conform to Typebot schema; invalid JSON will cause errors.
- Missing or incorrect API credentials: Ensure the API key and tokens are correctly set up in n8n credentials.
- Network or connectivity problems to the Typebot API endpoint.
Error messages:
"Unknown chat operation: updateTypebotInSession": Indicates a misconfiguration or unsupported operation; verify the operation name.- API authorization errors: Check that the API token and key are valid and have sufficient permissions.
- JSON parsing errors: Validate the JSON strings before passing them to the node.
To resolve errors, verify all inputs, ensure proper authentication, and validate JSON configurations.
Links and References
- Typebot.io Official Website
- Typebot API Documentation (for detailed API endpoint info)
- n8n Documentation (for general usage of custom nodes and credentials)