Actions38
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "Send Message File" operation under the "Session" resource allows sending a file message within an existing chat session. This node action supports sending files either by providing a direct URL or by uploading a file from the input data (base64-encoded binary). It is useful in scenarios where you want to share documents, images, or other media files as part of a conversation in a session.
Practical examples include:
- Sending a PDF invoice or contract to a customer during a support session.
- Sharing product images or brochures in a sales chat session.
- Delivering multimedia content like videos or audio clips within a customer service interaction.
Properties
| Name | Meaning |
|---|---|
| Session ID | The unique identifier of the chat session where the file message will be sent. |
| Url | A direct URL link to the file to send. If provided, the file will be sent via this URL instead of upload. |
| Field File | The name of the input field containing the base64-encoded file data to upload and send. |
Output
The output JSON contains the response from the API after sending the file message in the session. This typically includes details about the sent message such as message ID, status, timestamps, and any metadata returned by the service.
If a file is uploaded from input data, the node first saves the file via an API call and then sends the message referencing the saved file's ID.
No binary data is output by this node; it only outputs JSON with the API response.
Dependencies
- Requires an API key credential for authenticating with the WTS Chat API.
- The node depends on the external WTS Chat API endpoints for saving files and sending messages.
- Proper configuration of the API key credential in n8n is necessary.
Troubleshooting
- Missing Session ID: The node throws an error if the Session ID is empty or missing. Ensure the Session ID parameter is filled correctly.
- No file or URL provided: An error occurs if neither a file field nor a URL is specified. Provide at least one.
- Input data issues: If the file field is specified but no binary data exists in the input under that field name, an error is thrown. Verify the input data contains the expected binary file.
- Invalid API key or network errors: Errors from the API calls are wrapped and thrown as node errors. Check API key validity and network connectivity.
- File upload failure: If saving the file fails, the message sending will not proceed. Inspect the error message for details.
Links and References
- WTS Chat API Documentation (generic reference, replace with actual docs if available)
- n8n documentation on working with binary data
- General guidance on sending files in chat applications