WTS Chat icon

WTS Chat

Get data from Wts API

Overview

This node operation sends a file within a specific chat session using the WTS Chat API. It supports sending a file either by providing a URL or by uploading a file from the input data in base64 format. The operation requires a session ID to identify the chat session and optionally allows synchronous message sending. This is useful for automating file sharing in customer support or chat-based workflows where files need to be sent directly within ongoing chat sessions.

Use Case Examples

  1. Sending a PDF document to a customer in a support chat session by specifying the session ID and uploading the file from the workflow input.
  2. Sharing an image via a URL in a chat session to provide visual information to the user.

Properties

Name Meaning
Session ID The unique identifier of the chat session where the file will be sent.
Url The URL of the file to be sent in the session. Used if not uploading a file directly.
Input Field File Name The name of the input field containing the base64 encoded file to send. Supports dot notation for nested fields.
Send Synchronous Message Determines whether the message sending should be synchronous (wait for confirmation before proceeding).

Output

JSON

  • json - The response from the WTS Chat API after sending the file, including message details and status.

Dependencies

  • Requires an API key credential for the WTS Chat API to authenticate requests.

Troubleshooting

  • Ensure the Session ID is provided and not empty; otherwise, the node throws an error indicating the missing session ID.
  • If neither a file URL nor a file input field is provided, the node throws an error prompting to fill one of these fields.
  • When sending a file from input, ensure the input data contains binary data with the specified file name; otherwise, an error is thrown indicating missing file data.
  • Check that the API key credential is correctly configured to avoid authentication errors.

Discussion