Actions7
- Action Actions
- Chatbot Actions
Overview
This node interacts with a chatbot service API to update the base prompt of a specified chatbot. The base prompt is a foundational instruction or context that guides how the chatbot responds during conversations. Updating this prompt allows users to modify the chatbot's behavior or personality without retraining it from scratch.
Common scenarios where this node is beneficial include:
- Adjusting the chatbot’s tone or style dynamically.
- Changing the initial instructions to better suit new use cases.
- Quickly refining chatbot responses based on user feedback or evolving requirements.
For example, a customer support team might update the base prompt to make the chatbot more empathetic during holiday seasons or to emphasize certain product features.
Properties
| Name | Meaning |
|---|---|
| Chatbot Name or ID | Select the target chatbot by name or specify its unique ID. |
| Base Prompt | The new base prompt text that will replace the existing one for the selected chatbot. |
Output
The node outputs a JSON object containing the response from the chatbot service API after attempting to update the base prompt. The output includes:
success: A boolean indicating if the update was successful (true).chatbotId: The ID of the chatbot whose base prompt was updated.- Additional fields returned by the API related to the update operation.
Example output JSON structure:
{
"success": true,
"chatbotId": "12345",
"...": "other API response fields"
}
No binary data is produced by this node.
Dependencies
- Requires an API key credential for authenticating requests to the chatbot service.
- The node expects a base URL configured in the credentials to form API endpoints.
- The node uses HTTP POST requests to the
/api/v2/update-chatbot-settingsendpoint of the chatbot service.
Troubleshooting
- Missing or invalid credentials: If the base URL or API key is missing or incorrect, the node will throw an error indicating credential misconfiguration. Verify the API key and base URL in the credential settings.
- Invalid chatbot ID: Providing a non-existent chatbot ID will result in an error from the API. Ensure the chatbot exists and the ID is correct.
- API errors: If the API returns an error status, the node surfaces the error message. Common causes include malformed base prompt text or service-side issues.
- Network issues: Connectivity problems can cause request failures. Check network access and firewall settings.
- Continue on Fail: If enabled, the node will continue processing other items even if some fail, returning error details in the output JSON.
Links and References
- n8n Expressions Documentation
- Refer to your chatbot service API documentation for details on the
/update-chatbot-settingsendpoint and base prompt usage.