Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The node integrates with the WTS Chat API to send message templates within an existing chat session. Specifically, the "Send Template In Session" operation allows users to send a predefined message template to a specified session by its ID. This is useful in customer support or automated messaging scenarios where standardized responses or rich content templates (including files) need to be sent to ongoing conversations.
Typical use cases include:
- Sending order confirmation templates to customers during a support session.
- Delivering FAQ or troubleshooting guides as templated messages.
- Automating follow-up messages using predefined templates in active chat sessions.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the chat session where the template message will be sent. |
| Template Name or ID | Select a template from the list associated with the session or specify a template ID via expression. |
| Params | Key-value pairs for template parameters to customize the template content dynamically. Each parameter has a name (from the template's expected parameters) and a value to substitute. |
| Url | URL of a file to attach/send along with the template message if the template supports file attachments. |
| Input Field File Name | The name of the input field containing a base64-encoded file to send with the template message. Supports dot notation for nested fields. |
| Send Synchronous Message | Boolean flag indicating whether the message should be sent synchronously (wait for confirmation) or asynchronously. |
Output
The output is an array of JSON objects representing the response from the WTS Chat API after sending the template message. The structure typically includes details about the sent message such as message ID, status, timestamps, and any metadata returned by the API.
If a file is sent with the template, the node handles uploading the file first and then references it by ID in the template message payload. Binary data can be provided as input for the file, but the output itself contains only JSON metadata about the sent message.
Dependencies
- Requires an API key credential for authenticating with the WTS Chat API.
- The node uses internal services to fetch available templates for a session and to upload files if included.
- The user must configure the WTS API credentials in n8n before using this node.
Troubleshooting
- Session ID empty: If the Session ID is not provided or empty, the node throws an error asking to fill in the Session ID field.
- Template not selected: If no valid template is chosen, an error prompts to select a valid template.
- File input issues: When sending a file, if the input binary data is missing or the specified file name does not exist in the input, errors are thrown indicating the absence of data or file.
- API errors: Any errors returned by the WTS Chat API are wrapped and rethrown as node errors with descriptive messages.
- Invalid parameter values: Ensure that template parameters match those expected by the selected template; otherwise, the API may reject the request.
Links and References
- WTS Chat API Documentation (generic link, replace with actual if available)
- n8n Expressions Documentation - for specifying dynamic template IDs or parameters
- Base64 File Handling in n8n - for understanding how to provide files as input to nodes