Rocket.Chat: Message

Send, update, delete messages; DM helpers

Overview

This node allows users to interact with Rocket.Chat messages by performing operations such as posting, sending, updating, deleting messages, and managing direct messages (DMs). It supports targeting messages to specific rooms, users, or free-text identifiers, and includes options for customizing message appearance and content. Common use cases include automating chat notifications, updating existing messages, deleting messages, and managing direct message conversations within Rocket.Chat.

Use Case Examples

  1. Posting a message to a specific channel or user.
  2. Updating the text of an existing message in a chat room.
  3. Deleting a message by its ID.
  4. Opening a direct message with a user and sending a message to that DM.

Properties

Name Meaning
Target Mode Determines how the message target is specified: free text, room picker, or user picker.
Target The target room or user identifier as free text, used when Target Mode is 'text'. If empty, the default target from credentials is used.
Room The selected room (channel/group/DM) to target, used when Target Mode is 'pickerRoom'.
User The selected user to DM, used when Target Mode is 'pickerUser'.
Text The message text content to post or send.
Thread ID (tmid) Optional thread ID to post 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 attachments in raw JSON array format.

Output

JSON

  • json - The JSON response from the Rocket.Chat API for the performed message operation, including details of the posted, updated, deleted message or DM room information.

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 to avoid errors when posting or sending messages.
  • When using attachments, ensure the JSON array is correctly formatted to prevent parsing errors.
  • If opening a DM fails, verify the username is correct and the user is available in Rocket.Chat.
  • Common error messages include authentication failures, invalid room or message IDs, and malformed JSON for attachments. Verify credentials, IDs, and JSON formatting to resolve these issues.

Links

Discussion