WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Get All Messages" operation of the WTS Chat node retrieves a list of messages associated with a specific chat session from the WTS API. This operation is useful for scenarios where you want to fetch conversation history or monitor ongoing chats within a session.

Typical use cases include:

  • Extracting all messages from a customer support chat session for analysis or record-keeping.
  • Monitoring message flow in real-time sessions for automation or reporting.
  • Integrating chat histories into CRM or other business tools.

For example, you might use this node to pull all messages from a session identified by its Session ID, optionally filtering by creation or update timestamps, and controlling pagination to handle large volumes of messages.

Properties

Name Meaning
Session ID The unique identifier of the chat session whose messages you want to retrieve.
CreatedAt.After Filter to include only messages created after this date/time (format: YYYY-MM-DD hh:mm).
CreatedAt.Before Filter to include only messages created before this date/time (format: YYYY-MM-DD hh:mm).
UpdatedAt.After Filter to include only messages updated after this date/time (format: YYYY-MM-DD hh:mm).
UpdatedAt.Before Filter to include only messages updated before this date/time (format: YYYY-MM-DD hh:mm).
Auto Pagination Boolean flag to enable automatic pagination, fetching multiple pages of results automatically.
Max Pages When auto pagination is enabled, the maximum number of pages to retrieve (1 to 100).
Page Number When auto pagination is disabled, the specific page number to retrieve.
Page Size When auto pagination is disabled, the number of items per page (1 to 100).
Order By Field name to sort the messages by (e.g., creation date).
Order Direction Direction of sorting: Ascending or Descending.

Output

The output consists of an array of JSON objects, each representing a message retrieved from the specified session. Each message object contains details as provided by the WTS API, such as message content, sender information, timestamps, status, and any metadata associated with the message.

If the node supports binary data for messages (e.g., attachments), it would be included in the binary property of the output item; however, for this operation, the focus is on retrieving message records, so binary data is not explicitly handled here.

Dependencies

  • Requires an active connection to the WTS API via an API key credential configured in n8n.
  • The node depends on the WTS Chat service endpoints to fetch messages.
  • Proper permissions and valid session IDs are necessary to access message data.

Troubleshooting

  • SessionID is empty, please fill it in: This error occurs if the Session ID property is not provided. Ensure that you specify a valid Session ID to retrieve messages.
  • API errors: If the WTS API returns errors (e.g., invalid credentials, permission denied, or session not found), the node will throw an error. Verify your API key and session existence.
  • Pagination issues: If too many messages exist and pagination is not properly configured, you may receive incomplete data. Use Auto Pagination with an appropriate Max Pages setting to retrieve all messages.
  • Date filters format: Date/time filters must follow the specified format (YYYY-MM-DD hh:mm) and respect your time zone. Incorrect formats may cause unexpected results or errors.

Links and References


This summary is based on static analysis of the node's source code and input properties related to the "Message" resource and "Get All Messages" operation.

Discussion