ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The "List All Messages" operation for the "Messages" resource in this custom n8n node allows users to retrieve all messages from a specific conversation within a ChatWoot account. This is useful for automating workflows that need to process, analyze, or archive chat conversations from ChatWoot. For example, you might use this node to export all messages from a customer support conversation for reporting, sentiment analysis, or integration with other systems.

Properties

Display Name Type Description
Account Id Number The numeric ID of the ChatWoot account. Required to specify which account's data to access.
Conversation Id Number The numeric ID of the conversation whose messages you want to list. Required to target the correct conversation.

Output

The output will be a JSON array where each item represents a message from the specified conversation. Each message object typically includes fields such as:

  • id: Unique identifier for the message.
  • content: The text content of the message.
  • created_at: Timestamp when the message was created.
  • sender: Information about who sent the message (e.g., agent, contact).
  • Additional metadata as provided by the ChatWoot API.

Note: The exact structure may include more fields depending on the ChatWoot API response.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Credentials: You must configure the chatwootApi credential in n8n, including the base URL and authentication details for your ChatWoot account.

Troubleshooting

  • Missing or Invalid Credentials: If the chatwootApi credential is not set up correctly, the node will fail to connect to ChatWoot. Ensure the credentials are valid and have sufficient permissions.
  • Invalid Account or Conversation ID: Providing an incorrect Account Id or Conversation Id will result in errors or empty results. Double-check these values in your ChatWoot dashboard.
  • API Rate Limits: Excessive requests may trigger rate limiting on the ChatWoot API. Monitor usage if you encounter related errors.
  • Common Error Messages:
    • 401 Unauthorized: Check your API credentials.
    • 404 Not Found: Verify the Account Id and Conversation Id.
    • 500 Internal Server Error: There may be an issue with the ChatWoot server; try again later.

Links and References

Discussion