Actions36
- Account Actions
- Canned Response Actions
- Contact Actions
- Conversation Actions
- Inbox Actions
- Label Actions
- Message Actions
- Team Actions
- Webhook Actions
Overview
This node integrates with the Chatwoot API to manage conversations within a Chatwoot account. Specifically, the Conversation: Create operation allows users to start a new conversation by sending an initial message to a specified inbox and optionally associating it with an existing contact or assigning it to agents or teams.
Common scenarios where this node is beneficial include:
- Automating customer support workflows by programmatically creating conversations when new inquiries arrive.
- Integrating Chatwoot conversations with other systems (e.g., CRM, ticketing) to ensure all customer interactions are tracked.
- Sending templated or custom messages as the first interaction in a conversation.
Practical example:
- A chatbot system detects a user query and uses this node to create a new conversation in Chatwoot with a welcome message, assigning it to a specific team for follow-up.
Properties
| Name | Meaning |
|---|---|
| Send | How to send the data: either using structured form fields ("Structured Fields") or providing a full custom JSON payload ("Custom JSON"). |
| Custom JSON | (Shown if "Send" = "Custom JSON") The complete JSON payload to send for creating the conversation, overriding all structured fields. |
| Source ID | (Required if "Send" = "Structured Fields") The source identifier for the conversation, e.g., a unique external ID representing the conversation origin. |
| Inbox ID | (Required if "Send" = "Structured Fields") Numeric ID of the inbox where the conversation will be created. |
| Initial Message Content | (Required if "Send" = "Structured Fields") Text content of the initial message to send in the conversation. |
| Additional Options | (Optional, shown if "Send" = "Structured Fields") Collection of optional parameters: |
| - Additional Attributes | JSON object for extra attributes like browser info, e.g., {"browser": "Chrome", "browser_version": "89.0.4389.82"} |
| - Assignee ID | Numeric ID of the agent to assign the conversation to. |
| - Contact ID | Numeric ID of an existing contact to associate with the conversation. |
| - Custom Attributes | JSON object for custom key-value attributes related to the conversation, e.g., {"priority": 3} |
| - Snoozed Until | Date/time until which the conversation is snoozed (paused). |
| - Status | Status of the conversation; options are "Open", "Resolved", or "Pending". |
| - Team ID | Numeric ID of the team to assign the conversation to. |
| - WhatsApp Template Parameters | Parameters for WhatsApp message templates including category (AUTHENTICATION, MARKETING, UTILITY), language code, template name, and processed parameters as JSON. |
| Continue on Fail | Whether to continue processing subsequent items if this operation fails. |
| Debug Logging | Whether to output detailed request and debug information to the console during execution. |
Output
The node outputs the JSON response from the Chatwoot API after creating the conversation. This typically includes details about the newly created conversation such as its ID, status, associated contact, inbox, assignee, timestamps, and the initial message sent.
If multiple input items are processed, the output is an array of JSON objects corresponding to each created conversation.
No binary data output is produced by this operation.
Dependencies
- Requires an active Chatwoot account and API access token configured in n8n credentials.
- The node makes HTTP requests to the Chatwoot API endpoints, so network connectivity to the Chatwoot server is necessary.
- Proper permissions on the API token to create conversations and send messages.
Troubleshooting
- Invalid JSON errors: When using the "Custom JSON" mode or entering JSON in additional/custom attributes, invalid JSON syntax will cause errors. Ensure JSON is well-formed.
- Missing required fields: If required fields like Source ID, Inbox ID, or Initial Message Content are missing in structured mode, the API call will fail.
- API authentication errors: Incorrect or expired API tokens will result in authorization failures. Verify the API key credential.
- Permission issues: Insufficient permissions for the API token may cause errors when creating conversations or assigning them.
- Debug logging: Enable debug logging to see detailed request URLs, headers, and payloads to help diagnose issues.