Overview
This node allows sending, updating, deleting, and managing messages in Rocket.Chat, including direct messages (DMs). It supports advanced message sending with custom message IDs and additional fields like alias, emoji avatar, avatar URL, URL parsing, and attachments. Common use cases include automating chat notifications, managing chat conversations programmatically, and integrating Rocket.Chat messaging into workflows.
Use Case Examples
- Send a message to a specific channel or user with custom formatting and attachments.
- Update or delete a previously sent message in a chat room.
- Open a direct message channel with a user and send a message to that DM.
Properties
| Name | Meaning |
|---|---|
| Target Mode | Defines how the target recipient of the message is specified (free text, pick a room, or pick a user). |
| Target | The target room or user identifier as free text, used if Target Mode is 'text'. If empty, the default target from credentials is used. |
| Room | Select a room (channel/group/DM) to send the message to, used if Target Mode is 'pickerRoom'. |
| User | Select a user to send a direct message to, used if Target Mode is 'pickerUser'. |
| Text | The message text content to send. |
| Thread ID (tmid) | Optional thread ID to send the message as a reply in a thread. |
| Additional Fields | Optional additional message fields such as alias, emoji avatar, avatar URL, URL parsing flag, and raw JSON attachments. |
Output
JSON
json- The JSON response from the Rocket.Chat API for the performed message operation, including message details or operation status.
Dependencies
- Requires Rocket.Chat API access with an API key credential for authentication.
Troubleshooting
- Ensure the target room or user exists and is accessible with the provided credentials.
- Verify that the message ID for update or delete operations is correct and belongs to the specified room.
- Check that the attachments JSON is properly formatted to avoid parsing errors.
- If opening a DM fails, verify the username exists and the API user has permission to open DMs.
Links
- Rocket.Chat API - chat.postMessage - Official Rocket.Chat API documentation for sending messages.
- Rocket.Chat API - im.open - Official Rocket.Chat API documentation for opening direct messages.