WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Send File In Session" operation of the WTS Chat node allows users to send a file message within an existing chat session by specifying the session ID. The file can be sent either by providing a URL or by uploading a binary file from the input data. This operation supports synchronous sending, meaning it can wait for the message to be processed before continuing.

This node is beneficial in scenarios where automated workflows need to share files (images, documents, etc.) directly into ongoing chat sessions, such as customer support conversations or sales chats. For example, a support automation could send a PDF manual to a customer during a live chat session, or a sales bot could send product brochures dynamically.

Properties

Name Meaning
Session ID The unique identifier of the chat session where the file will be sent.
Url A direct URL to the file to be sent. If provided, the file will be sent via this URL instead of upload.
Input Field File Name The name of the input field containing the binary file data (base64 encoded) to upload and send.
Send Synchronous Message Boolean flag indicating whether the message should be sent synchronously (wait for confirmation).

Output

The output of this operation is a JSON object representing the response from the API after sending the file message in the session. It typically contains details about the sent message, such as message ID, status, timestamps, and any metadata returned by the service.

If a file is uploaded from binary data, the node first uploads the file to the service and then sends the message referencing the uploaded file's ID. The output reflects the final message send result.

No binary data is outputted by this node; it only outputs JSON responses.

Dependencies

  • Requires an API key credential for authenticating with the WTS Chat API.
  • The node uses the WTS Chat API endpoints to upload files and send messages.
  • Input binary data must be provided correctly if sending a file from input.
  • Proper session IDs must be supplied to target the correct chat session.

Troubleshooting

  • Session ID empty: If the session ID parameter is missing or empty, the node throws an error asking to fill in the SessionID field.
  • File or URL missing: If neither a file input nor a URL is provided, the node throws an error requesting one of these fields to be filled.
  • Input binary data missing: When sending a file from input, if the specified binary field does not exist or contains no data, an error is thrown.
  • Channel or recipient missing: Although not directly applicable here, similar operations require channel and recipient info; ensure all required fields are set.
  • API errors: Any API call failure results in a NodeApiError with the original error message. Check API credentials and network connectivity.
  • Invalid file field name: Use dot notation correctly if the file is nested in input data.

Links and References


This summary is based on static analysis of the node's execute method and property definitions related to the "Session" resource and "Send File In Session" operation.

Discussion