ChatWoot icon

ChatWoot

Consume ChatWoot API

Public → Get All Conversation

AI-generated

Overview

This n8n node interacts with the ChatWoot API, specifically targeting the "Public" resource and the "Get All Conversation" operation. It is designed to retrieve all public conversations from a specified ChatWoot inbox. This node is useful for scenarios where you need to fetch and process customer conversations from a public-facing inbox, such as aggregating support requests, analyzing conversation trends, or integrating ChatWoot data into other workflows.

Practical examples:

  • Automatically exporting all public conversations for reporting or analytics.
  • Syncing ChatWoot public conversations with a CRM or helpdesk system.
  • Triggering alerts or actions in n8n based on new public conversations.

Properties

Name Type Meaning
Authentication options Selects the authentication method: either direct parameter input or predefined credentials.
BaseUrl string The base URL of your ChatWoot instance (e.g., https://chatwoot.org). Required if using parameter-based authentication.
Inbox Identifier string The unique identifier for the ChatWoot inbox whose public conversations you want to retrieve.

Output

The output is a JSON array where each item represents a public conversation retrieved from the specified ChatWoot inbox. Each object in the array contains the details of a single conversation. The exact structure depends on the ChatWoot API response, but typically includes fields such as conversation ID, status, messages, participants, and timestamps.

Example output structure:

[
  {
    "id": 12345,
    "status": "open",
    "messages": [
      {
        "id": 1,
        "content": "Hello!",
        "created_at": "2024-06-01T12:00:00Z"
      }
    ],
    "participants": [
      {
        "id": 678,
        "name": "John Doe"
      }
    ],
    "created_at": "2024-06-01T11:59:00Z"
  },
  ...
]

Dependencies

  • ChatWoot Instance: You must have access to a running ChatWoot server.
  • Authentication: Either provide the BaseUrl and token directly, or use predefined ChatWoot credentials configured in n8n.
  • n8n Configuration: If using predefined credentials, ensure they are set up under n8n’s credentials section.

Troubleshooting

  • Invalid Credentials: If authentication fails, ensure that the correct BaseUrl and token are provided, or that the predefined credentials are valid.
  • Missing Inbox Identifier: The "Inbox Identifier" property is required; omitting it will result in an error.
  • API Errors: If the ChatWoot API returns errors (e.g., 404 Not Found, 401 Unauthorized), check that the inbox exists and that your credentials have sufficient permissions.
  • Error Handling: If "Continue On Fail" is enabled, errors for individual items will be returned in the output with an error field containing the error message.

Links and References

Discussion