WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The node "WTS Chat" integrates with the Helena API to manage messaging, contacts, sessions, and panels. Specifically for the Message resource and the Send Message Template operation, it allows sending templated messages through a specified communication channel.

This operation is useful in scenarios where you want to send predefined message templates (e.g., notifications, alerts, marketing messages) to users via chat channels, ensuring consistent formatting and content. For example, a customer support bot can send a template message confirming an appointment or providing troubleshooting steps.

Properties

Name Meaning
Session ID The identifier of the session related to the message. Optional; used to associate the message with an existing session.
From Name or ID The channel from which the message will be sent. Choose from available channels or specify an ID dynamically.
To The recipient's phone number or contact identifier to whom the message will be sent.
Templates Name or ID The template to use for the message. Loaded based on the selected channel. Choose from available templates or specify an ID dynamically.
Params Parameters to fill in the template placeholders. Multiple key-value pairs where each key corresponds to a template parameter name or ID, and the value is the text to substitute.
Bots Name or ID Optionally select a bot to send the message through. Useful if multiple bots are configured for different purposes or channels.
Departments Name or ID Optionally specify a department associated with the message. This can help route or categorize messages internally.
User Name or ID Optionally specify a user within the chosen department. This can be used for routing or tracking who is responsible for the message or session.
Enable Bot Boolean flag indicating whether a chatbot should be activated upon receiving a response from the contact.
Hidden Session Boolean flag indicating whether the session should be hidden.
Force Start Session Boolean flag indicating whether to force the start of a new session when sending this message.

Output

The output is a JSON object representing the response from the Helena API after sending the templated message. It typically includes details such as message ID, status, timestamps, and any metadata returned by the API.

The node does not output binary data for this operation.

Example output structure (simplified):

{
  "id": "string",
  "status": "string",
  "sentAt": "timestamp",
  "to": "recipient_number",
  "from": "channel_id",
  "templateId": "string",
  "parameters": {
    "paramName1": "value1",
    "paramName2": "value2"
  },
  ...
}

Dependencies

  • Requires an API key credential for authentication with the Helena API.
  • Uses the Helena Chat Service to fetch templates and template parameter names dynamically.
  • The base URL for API requests is https://api-test.helena.run.
  • The node depends on n8n's ability to load options dynamically for channels, templates, bots, departments, and users.

Troubleshooting

  • Missing or invalid API key: Ensure that the API key credential is correctly configured and valid.
  • Template not found: If the selected template ID or name does not exist for the chosen channel, the request will fail. Verify that the template exists and is accessible.
  • Parameter mismatch: The template requires specific parameters; ensure all required parameters are provided with correct names and values.
  • Invalid phone number: The "To" field must contain a valid recipient number formatted according to the channel's requirements.
  • Session-related errors: If using session-related flags (sessionId, forceStartSession), ensure the session ID is valid or that forcing a new session is appropriate.
  • Network or API errors: Check network connectivity and Helena API service status if requests fail unexpectedly.

Common error messages usually come from HTTP responses and include status codes like 400 (bad request), 401 (unauthorized), or 404 (not found). Review the error message details for guidance.

Links and References

  • n8n Expressions Documentation
  • Helena API base URL: https://api-test.helena.run
  • (No direct public documentation links were found in the source code; refer to your Helena API provider for detailed API docs.)

Discussion