Actions36
- Account Actions
- Canned Response Actions
- Contact Actions
- Conversation Actions
- Inbox Actions
- Label Actions
- Message Actions
- Team Actions
- Webhook Actions
Overview
This node interacts with the Chatwoot API to manage conversations and their attributes. Specifically, the "Update Custom Attributes" operation for the "Conversation" resource allows users to update custom metadata fields associated with a conversation. This is useful for adding or modifying additional information that is not part of the standard conversation data model, such as tags, priority levels, or any other custom key-value pairs.
Practical scenarios include:
- Adding internal notes or flags to conversations for better categorization.
- Storing custom status indicators or workflow states.
- Integrating with external systems by syncing custom attributes.
Example: You have a conversation with ID 123 and want to add a custom attribute "priority": "high" to it. Using this operation, you can send a JSON object with these attributes to update the conversation accordingly.
Properties
| Name | Meaning |
|---|---|
| Conversation ID | The numeric ID of the conversation to update. |
| Custom Attributes | A JSON-formatted string representing the custom attributes to set on the conversation. |
| Continue on Fail | Whether the node should continue processing subsequent items if this operation fails. |
| Debug Logging | Whether to output detailed request and response logs to the console for debugging. |
Output
The node outputs the JSON response from the Chatwoot API after updating the custom attributes. This typically includes the updated conversation object with the new custom attributes reflected.
If multiple input items are processed, the output is an array of JSON objects corresponding to each itemโs result.
No binary data output is involved in this operation.
Dependencies
- Requires an API authentication token credential for Chatwoot (an API key or access token).
- The node makes HTTP POST requests to the Chatwoot API endpoint
/api/v1/accounts/{accountId}/conversations/{conversationId}/custom_attributes. - The base URL and account ID must be configured in the credentials.
- No additional environment variables are required.
Troubleshooting
- Invalid JSON in Custom Attributes: If the provided custom attributes JSON is malformed, the node throws an error indicating invalid JSON. Ensure the JSON syntax is correct before running.
- Authentication Errors: If the API token is missing or invalid, the HTTP request will fail. Verify the API credentials are correctly set up.
- Conversation Not Found: If the conversation ID does not exist, the API will return an error. Confirm the conversation ID is valid.
- Continue on Fail: Enable this option to allow the node to proceed with other items even if one fails, useful in batch operations.
Links and References
- Chatwoot API Documentation - Conversations
- n8n Documentation - Working with Credentials
- JSON Validator โ Useful for validating custom attributes JSON before use.