UTP+Class Action
AI-generatedSummary
Send a message from one user to another or mark all messages in a chat as read in the UTP+Class system.
Inputs
- Query (required) — The action to perform, either sending a message ('sentMessage') or marking messages as read ('markAsRead').
- User ID (required) — The UUID of the user initiating the action (must be a 36-character string).
- Other User ID — The target user ID for the message or read marking; if set to 'me', the User ID is used instead.
- Message — The text of the message to send; used only with the 'sentMessage' query.
Output shape
a single JSON object representing the response from the UTP+Class API for the performed action
The operation returns the API's response wrapped as JSON. The output shape depends on the API endpoint called. The node requires valid credentials for the 'utp_apiApi' authentication. It throws an error if the User ID is not exactly 36 characters.
Examples
Example 1: Send a message to another user
Set 'Query' to 'Sent Message', specify 'User ID' and 'Other User ID', provide the message text in 'Message'. The node sends this message via the UTP+Class API.
Example 2: Mark all messages as read in a chat
Set 'Query' to 'Mark as Read', specify 'User ID' and 'Other User ID' (or 'me' to use the User ID). The node marks all messages in that chat as read via the API.