Overview
This node appends a message to an existing conversation history identified by a chat ID. It is useful in scenarios where you want to maintain or extend a dialogue context, such as in chatbot workflows, customer support automation, or AI assistant interactions. For example, after receiving a user input, this node can add the user's message or the assistant's response to the conversation record stored on an external service.
Properties
| Name | Meaning |
|---|---|
| Chat ID | The unique identifier of the conversation to which the message will be appended. |
| Message Role | The role of the message sender; options are "Assistant" (AI assistant response) or "User" (user message). |
| Message Content | The actual text content of the message to append to the conversation. |
Output
The node outputs an array of items, each containing a json object with the following structure:
messageId: The unique identifier of the appended message returned by the external service.chatId: The conversation ID to which the message was appended.role: The role of the message sender ("assistant" or "user").content: The message content that was appended.success: A boolean indicating whether the append operation succeeded.timestamp: ISO string timestamp of when the operation occurred.originalData(optional): The original input data item JSON if the option to include it is enabled.
If the input item contains binary data, it is preserved and passed through to the output.
Dependencies
- Requires credentials for an external intent recognition API service, including:
- A base URL for the API.
- A system name.
- An API key.
- The node uses Basic Authentication with these credentials to call the endpoint
/api/conversations/append. - Proper configuration of these credentials in n8n is necessary for the node to function.
Troubleshooting
- Missing Credentials: If any of the required credential fields (URL, system name, API key) are missing, the node will throw an error before execution. Ensure all credential fields are correctly set.
- Failed HTTP Request: Network issues, incorrect URLs, or invalid credentials may cause the append request to fail. The error message will include the failure reason and the URL used.
- Required Parameters Missing: If either the Chat ID or Message Content is empty or undefined for any item, the node will throw an error for that item.
- Continue On Fail: If enabled, the node will continue processing subsequent items even if some fail, marking failed items with an error message and
success: false.
Links and References
- No direct external links provided in the source code.
- For usage, refer to your external intent recognition API documentation regarding the
/api/conversations/appendendpoint.