Chatwoot icon

Chatwoot

Interact with Chatwoot API

Overview

This node interacts with the Chatwoot API to manage messages within conversations of a Chatwoot account. Specifically, the Message - Get operation retrieves detailed information about a single message identified by its numeric ID, within a specified conversation and account.

Typical use cases include:

  • Fetching the content and metadata of a specific message in a customer support conversation.
  • Retrieving message details for auditing or logging purposes.
  • Integrating message data into workflows that require message context or history.

For example, you might use this node to get the details of a particular message when a customer replies, enabling your workflow to analyze or respond based on that message's content.

Properties

Name Meaning
Account ID The numeric ID of the Chatwoot account containing the conversation and message.
Conversation ID The numeric ID of the conversation where the message exists.
Message ID The numeric ID of the specific message to retrieve.
Continue on Fail Whether to continue executing subsequent items if this operation fails (true/false).

Output

The output is a JSON object representing the retrieved message. It includes all available fields returned by the Chatwoot API for a message resource, such as:

  • Message content
  • Message type (incoming/outgoing)
  • Timestamps
  • Sender information
  • Any additional metadata associated with the message

No binary data is output by this operation.

Example output structure (simplified):

{
  "id": 123,
  "content": "Hello, how can I help you?",
  "message_type": "outgoing",
  "created_at": "2024-01-01T12:00:00Z",
  "sender": {
    "id": 456,
    "name": "Agent Smith"
  },
  ...
}

Dependencies

  • Requires an active connection to the Chatwoot API via an API key credential configured in n8n.
  • The base URL of the Chatwoot instance must be set in the credentials.
  • Network access to the Chatwoot API endpoint is necessary.

Troubleshooting

  • Common issues:

    • Invalid or missing Account ID, Conversation ID, or Message ID will cause the API request to fail.
    • Incorrect API credentials or base URL configuration will result in authentication errors.
    • Network connectivity problems may prevent successful API calls.
  • Error messages:

    • "404 Not Found": The specified message, conversation, or account does not exist or the IDs are incorrect.
    • "401 Unauthorized": API key credential is invalid or missing.
    • "400 Bad Request": Parameters are malformed or missing required fields.
  • Resolutions:

    • Verify that the Account ID, Conversation ID, and Message ID are correct and correspond to existing resources.
    • Check that the API key credential is properly configured and has sufficient permissions.
    • Ensure the Chatwoot instance URL is correctly set in the credentials.
    • Enable "Continue on Fail" if you want the workflow to proceed despite individual item failures.

Links and References

Discussion