Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The node integrates with the WTS Chat API to manage chat sessions and send templated messages within a session. Specifically, the "Send Template In Session" operation allows users to send a predefined message template to an active chat session identified by its Session ID. This is useful for automating responses, sending structured information, or triggering workflows based on templates during ongoing conversations.
Common scenarios include:
- Sending order confirmations, appointment reminders, or FAQs automatically using templates.
- Personalizing messages in customer support chats by filling template parameters dynamically.
- Attaching files or media to template messages within a session context.
Example: Automatically send a shipping update template with dynamic tracking number parameters to a customer's chat session.
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 message template from a list loaded based on the Session ID, or specify a template ID via expression. |
| Params | Key-value pairs to fill dynamic parameters in the selected template. Each parameter has a name (from the template's expected parameters) and a corresponding value to insert. |
| Url | URL of a file to attach to the template message if the template supports file attachments. |
| Input Field File Name | Name of the input field containing a base64-encoded file to attach to 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 node outputs JSON data representing the response from the WTS Chat API after sending the template message. This typically includes details about the sent message such as message ID, status, timestamps, and any metadata returned by the API.
If a file is attached, the node handles uploading the file first and then sends the template message referencing the uploaded file ID.
Binary data can be input to the node for file attachments but the output does not contain binary data; it only contains JSON metadata about the sent message.
Dependencies
- Requires an API key credential for authenticating with the WTS Chat API.
- The node depends on the WTS Chat service endpoints to fetch templates available for a session and to send messages.
- If attaching files, the node uploads files to the WTS Chat API before sending the template message.
- Proper configuration of the API key credential in n8n is necessary.
Troubleshooting
- Session ID empty or invalid: The node throws an error if the Session ID is missing or blank. Ensure the Session ID is correctly provided.
- Template not selected or invalid: An error occurs if no valid template is chosen. Select a template from the dropdown or provide a valid template ID.
- File attachment errors: If specifying a file input field, ensure the input data contains binary data with the exact field name. Errors occur if the file is missing or incorrectly referenced.
- API errors: Any issues from the WTS Chat API (e.g., authentication failure, rate limits) are surfaced as node errors. Check API key validity and usage limits.
- Parameter mismatch: When providing template parameters, ensure names match those expected by the template to avoid incomplete or failed message sending.
Links and References
- WTS Chat API Documentation (generic link, replace with actual if available)
- n8n Expressions Documentation - for using expressions in property fields
- WTS Chat Templates Guide (if publicly available)
This summary focuses on the "Session" resource and the "Send Template In Session" operation as requested, based on static analysis of the provided source code and properties.