WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The node "WTS Chat" integrates with the WTS API to manage chat-related data and operations. Specifically, for the Message resource and the Get Message Status operation, it retrieves the current status of a message by its unique identifier.

This node is useful in scenarios where you need to track or verify the delivery, read, or processing status of messages sent through the WTS platform. For example, after sending a message, you might want to check if it was delivered successfully or if it encountered any errors.

Practical example:

  • After sending a message via the WTS Chat service, use this node to fetch the message status by providing the message ID, enabling automated workflows to react accordingly (e.g., retry sending, notify users).

Properties

Name Meaning
Message ID The unique identifier of the message whose status you want to retrieve.

Output

The node outputs an array with one item containing a json object representing the message status information as returned by the WTS API. This JSON typically includes details such as delivery state, read receipts, timestamps, and any error codes related to the message.

No binary data output is involved in this operation.

Example output structure (conceptual):

{
  "messageId": "string",
  "status": "string",          // e.g., "sent", "delivered", "read", "failed"
  "timestamp": "ISO8601 string",
  "errorCode": "string|null",
  "details": { ... }           // Additional metadata about the message status
}

Dependencies

  • Requires an active connection to the WTS API using an API key credential.
  • The node depends on the WTS Chat service endpoint to fetch message status.
  • Proper configuration of the WTS API credentials in n8n is necessary.

Troubleshooting

  • Common issues:

    • Providing an invalid or empty Message ID will cause the node to throw an error.
    • Network or authentication failures with the WTS API can result in errors.
    • If the message ID does not exist or has been deleted, the API may return an error or empty response.
  • Error messages:

    • "NodeApiError" wrapping the underlying API error, often indicating issues like invalid parameters or authorization failure.
    • "Message ID is empty" or similar validation errors if the required input is missing.
  • Resolution tips:

    • Ensure the Message ID is correctly provided and corresponds to an existing message.
    • Verify that the API key credential is valid and has sufficient permissions.
    • Check network connectivity and API endpoint availability.

Links and References

Discussion