WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Send Text In Session" operation for the Session resource in the WTS Chat n8n node allows you to send a text message directly into an existing chat session. This is particularly useful for automating follow-ups, sending notifications, or interacting with users who are already engaged in a session (such as customer support or sales conversations).

Common scenarios:

  • Sending automated replies or updates to ongoing customer sessions.
  • Notifying users within a session about status changes or important information.
  • Integrating external systems to push messages into active chat sessions.

Example use cases:

  • After a support ticket is updated, automatically notify the user in their current chat session.
  • Send reminders or confirmations to users during an ongoing sales conversation.

Properties

Display Name Type Description
Text String The text message you want to send into the session.
Session ID String The unique identifier of the session where the message will be sent.
Send Synchronous Message Boolean Whether to send the message synchronously (wait for delivery confirmation before proceeding).

Output

The output is a JSON object representing the result of the message-sending operation. While the exact structure depends on the API response, it typically includes:

{
  "id": "string",           // Unique identifier of the sent message
  "sessionId": "string",    // The session ID where the message was sent
  "body": {
    "text": "string"        // The text content that was sent
  },
  "status": "string",       // Status of the message (e.g., 'sent', 'delivered')
  "timestamp": "string"     // When the message was sent
  // ...other metadata fields depending on the API
}

No binary data is produced by this operation.


Dependencies

  • External Service: Requires access to the WTS Chat API.
  • API Key: You must configure valid WTS Chat API credentials (wtsApi) in your n8n instance.
  • Environment: Ensure your n8n instance can reach https://api.wts.chat.

Troubleshooting

Common issues and error messages:

  • Missing Session ID:

    • Error: "SessionID is empty!", "Fill in the SessionID field"
    • Resolution: Make sure to provide a valid Session ID.
  • Empty Text Message:

    • Error: "Write a text to send", "Fill in the Text field"
    • Resolution: Enter the text you wish to send.
  • Invalid Credentials:

    • Error: Authentication errors from the API.
    • Resolution: Check your WTS Chat API credentials in n8n.
  • API/Network Errors:

    • Error: Various network or server errors.
    • Resolution: Ensure network connectivity and that the WTS Chat service is operational.

Links and References

Discussion