Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "Send File To Contact" operation of the WTS Chat node allows users to send files to a specified contact via a chosen communication channel. This operation supports sending files either by providing a URL or by uploading a file from the input data in base64/binary format. It also supports additional options such as enabling chatbots, associating the message with departments and users, controlling session visibility, and forcing session start.
This node is beneficial in scenarios where automated workflows need to deliver multimedia content (e.g., images, documents) directly to contacts through messaging platforms integrated with WTS Chat. For example, a customer support automation could send product manuals or invoices as files to customers automatically after certain triggers.
Properties
Name | Meaning |
---|---|
Chatbot Name or ID | Select or specify the chatbot to use when sending the file. Optionally enables chatbot interaction upon receiving a response. |
Department Name or ID | Select or specify the department associated with the message. Used for routing or organizational purposes. |
User Name or ID | Select or specify a user within the chosen department to associate with the message. |
From Name or ID | Select or specify the channel (e.g., phone number or messaging channel) from which the file will be sent. |
To | The recipient's phone number or username to whom the file will be sent. |
Url | URL of the file to send. If provided, the file will be sent by referencing this URL instead of uploading a file. |
Input Field File Name | The name of the input field containing the base64-encoded file data to upload and send. Supports dot notation for nested fields. |
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 upon receiving a response from the contact. |
Hidden Session | Boolean flag to mark the session as hidden, possibly affecting visibility in the UI or reports. |
Force Start Session | Boolean flag to force the start of a new session if none exists when sending the file. |
Output
The node outputs JSON data representing the result of the file sending operation. This typically includes metadata about the sent message, such as message ID, status, timestamps, and any relevant identifiers returned by the WTS Chat API.
If a file is uploaded from input data, the node first uploads the file to the WTS Chat service and then sends the message referencing the uploaded file ID. The output JSON reflects these operations' results.
No binary data is output by this node; it only processes binary input for file upload.
Dependencies
- Requires an active connection to the WTS Chat API using an API key credential.
- The node depends on the WTS Chat service endpoints for file upload and message sending.
- Input binary data must be correctly formatted and accessible under the specified input field name.
- Proper configuration of channels, bots, departments, and users in the WTS Chat system is necessary for successful message delivery.
Troubleshooting
- Missing Required Fields: Errors occur if mandatory fields like "From" (channel), "To" (recipient number), or file input (either URL or binary file) are missing. Ensure these are properly set.
- File Not Found in Input: If specifying a file input field, the node checks for binary data presence. Errors arise if the named file does not exist in the input or if input data is empty.
- Invalid Channel or Recipient: Selecting an undefined or invalid channel or recipient number causes errors. Verify that these values correspond to valid entities in your WTS Chat account.
- API Authentication Failures: Ensure the API key credential is valid and has sufficient permissions.
- Synchronous Sending Issues: When using synchronous sending, network delays or API timeouts may cause failures. Consider disabling synchronous mode if not required.
- Bot Activation Problems: Enabling the bot requires proper bot configuration in WTS Chat. If the bot fails to activate, check bot settings and permissions.
Links and References
- n8n Expressions Documentation
- WTS Chat API documentation (refer to your WTS Chat provider for official API docs)
- n8n Binary Data Handling: https://docs.n8n.io/nodes/advanced/binary-data/