Actions39
- Chatbot Actions
- Contact Actions
- Message Actions
- Panel Actions
- Sequence Actions
- Session Actions
Overview
The "Get Message By ID" operation of the WTS Chat node retrieves detailed information about a specific message using its unique identifier. This node interacts with the Wts API to fetch message data, which can be useful in scenarios such as auditing conversations, tracking message delivery, or integrating message details into workflows.
Practical examples include:
- Fetching the content and metadata of a particular chat message for customer support follow-up.
- Retrieving message details to trigger conditional logic based on message content or status.
- Integrating message history into CRM systems or analytics dashboards.
Properties
Name | Meaning |
---|---|
Message ID | The unique identifier of the message to retrieve. |
Output
The output is a JSON object containing the full details of the requested message as returned by the WtsChatService. The structure typically includes message content, sender/receiver info, timestamps, status, and any associated metadata.
If the node supports binary data (e.g., files attached to messages), it would be included in the output accordingly, but for this operation, the focus is on JSON message data.
Example output snippet (conceptual):
{
"id": "message-id",
"sessionId": "session-id",
"from": "sender-id",
"to": "receiver-id",
"body": {
"text": "Message text content"
},
"status": "delivered",
"timestamp": "2024-01-01T12:00:00Z",
"metadata": { ... }
}
Dependencies
- Requires an active connection to the Wts API via an API key credential.
- The node depends on the
WtsChatService
internal service to perform the API call to fetch the message by ID. - Proper configuration of the Wts API credentials in n8n is necessary.
Troubleshooting
Common issues:
- Providing an invalid or empty Message ID will result in errors.
- Network or authentication failures with the Wts API may cause request errors.
Error messages:
"NodeApiError"
wrapping errors from the API call, e.g., "Message not found" if the ID does not exist."Invalid API key"
or authentication errors if credentials are misconfigured.
Resolutions:
- Ensure the Message ID is correctly specified and exists.
- Verify that the API key credential is valid and has sufficient permissions.
- Check network connectivity and API endpoint availability.
Links and References
- Wts API Documentation (general reference, replace with actual docs if available)
- n8n documentation on creating custom nodes