WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The node integrates with the WTS Chat API to manage chat sessions and send messages within those sessions. Specifically, for the Session resource and the Send Message Text operation, it allows sending a plain text message directly into an existing chat session identified by its Session ID.

This is useful in scenarios where you want to programmatically continue or initiate conversations within a managed session context, such as customer support chats, automated notifications, or chatbot interactions that require sending custom text messages.

Practical example:
You have a customer support system integrated with WTS Chat. When a new ticket is created or updated in your CRM, you want to send a follow-up message to the customer within the existing chat session. Using this node operation, you provide the session ID and the message text, and the message is sent into that session seamlessly.


Properties

Name Meaning
Session ID The unique identifier of the chat session where the text message will be sent.
Text The content of the text message to send into the specified session.

Output

  • The output contains a JSON object representing the response from the WTS Chat API after sending the text message to the session.
  • This JSON typically includes details about the sent message such as message ID, timestamp, status, and possibly metadata related to the session or message delivery.
  • The node does not output binary data for this operation.

Example output structure (simplified):

{
  "messageId": "string",
  "sessionId": "string",
  "text": "string",
  "timestamp": "string",
  "status": "string"
}

Dependencies

  • Requires an active connection to the WTS Chat API via an API key credential.
  • The node expects the API key to be configured in n8n credentials for authentication.
  • No additional external dependencies are required beyond the WTS Chat API access.

Troubleshooting

  • Error: "SessionID is empty!"
    Occurs if the Session ID property is not provided or is empty. Ensure you fill in the Session ID field with a valid session identifier.

  • API errors from WTS Chat service
    These may occur due to invalid session IDs, network issues, or permission problems. Check the API key validity and ensure the session exists and is accessible.

  • Empty or missing text message
    If the text message is empty or only whitespace, the node will throw an error. Provide meaningful text content to send.

  • General connectivity issues
    Verify that the base URL https://api.wts.chat is reachable from your environment and that your API key has sufficient permissions.


Links and References

Discussion