Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The node "WTS Chat" integrates with the WTS API to send and manage chat messages, contacts, sessions, panels, sequences, and chatbots. Specifically, for the Message resource and the Send Text To Contact operation, it allows sending a plain text message to a specified contact via a chosen communication channel.
This operation is useful in scenarios such as:
- Automating customer support replies by sending text messages directly to customers.
- Broadcasting notifications or alerts to individual contacts.
- Integrating chatbot responses with manual text messages.
- Triggering personalized messages based on workflow events.
For example, you can use this node to send a welcome message to a new user who just signed up, or to notify a customer about their order status through Instagram or other supported channels.
Properties
Name | Meaning |
---|---|
Text | The actual text content of the message to be sent. |
Chatbot Name or ID | Select or specify the chatbot to associate with the message (optional). If not set, no bot is used. |
Department Name or ID | Optionally specify the department responsible for sending the message. |
User Name or ID | Optionally specify a user within the selected department who will send the message. This list updates dynamically based on the chosen department. |
From Name or ID | The channel (e.g., Instagram account) from which the message is sent. Must be selected or specified. |
To | The recipient's phone number or username where the message will be delivered. |
Send Synchronous Message | Boolean flag indicating whether the message should be sent synchronously (wait for confirmation before proceeding). |
Enable Bot | Boolean flag to activate the chatbot automatically if the contact responds to this message. |
Hidden Session | Boolean flag to mark the session as hidden when sending this message. |
Force Start Session | Boolean flag to force the creation of a new session if one does not already exist for this conversation. |
Output
The output of this operation is a JSON object representing the response from the WTS API after sending the text message. It typically includes details such as message ID, status, timestamps, and any metadata returned by the API confirming the message was sent.
No binary data is output by this operation.
Example output structure (simplified):
{
"id": "message-id",
"status": "sent",
"from": "channel-id",
"to": "recipient-number",
"body": {
"text": "Your message text"
},
"timestamp": "2024-06-01T12:00:00Z",
"metadata": { ... }
}
Dependencies
- Requires an active connection to the WTS API using an API key credential.
- The node depends on the WTS API endpoints for sending messages and retrieving related data.
- Proper configuration of channels, departments, users, and optionally chatbots must exist in the WTS system.
- Network connectivity to
https://api.wts.chat
is required.
Troubleshooting
Common Issues
- Missing Required Fields: Errors occur if mandatory fields like "From" (channel), "To" (recipient), or "Text" are empty or invalid.
- Invalid Channel or Recipient: Selecting an undefined or incorrect channel or providing an invalid recipient number/username will cause failures.
- API Authentication Errors: If the API key is missing, expired, or invalid, the node will throw authentication errors.
- File Input Errors: Although not applicable to this text-only operation, other operations involving files require valid binary input; otherwise, errors about missing file data appear.
Common Error Messages
"Choose channel"
/"Fill in the From field"
: The "From" channel is not selected or invalid."Set an Instagram number or username for sending"
/"Fill in the To field"
: The recipient number or username is missing."Write a text to send"
/"Fill in the Text field"
: The message text is empty."There is no data in the input"
: For file-related operations, indicates missing binary data."Invalid email!"
: For contact operations, indicates improperly formatted email addresses.
How to Resolve
- Ensure all required fields are filled correctly.
- Verify that the API key credential is configured and valid.
- Confirm that the selected channel and recipient exist and are correct.
- For synchronous sending, allow sufficient time for the API to process the request.
- Check network connectivity to the WTS API endpoint.
Links and References
- WTS API Documentation (general reference for API capabilities)
- n8n Expressions Documentation (for dynamic parameter expressions)
- WTS Chat Node GitHub Repository (if available, for source and issues)
This summary focuses on the Message resource and the Send Text To Contact operation as requested, based on static analysis of the provided source code and property definitions.