Rocket.Chat: Message

Send, update, delete messages; DM helpers

Overview

This node allows users to manage messages in Rocket.Chat by performing operations such as posting, sending, updating, and deleting messages, as well as opening direct messages (DMs) and sending messages to DMs. It supports targeting messages to specific rooms or users using different modes (free text, room picker, user picker). This node is useful for automating chat interactions, managing conversations, and integrating Rocket.Chat messaging into workflows.

Use Case Examples

  1. Automatically post a message to a specific channel when a new task is created.
  2. Update a previously sent message with new information.
  3. Delete a message based on its ID to moderate content.
  4. Open a direct message with a user and send a message automatically.

Properties

Name Meaning
Target Mode Determines how the target room or user is specified for the message operation. Options include free text input, picking a room, or picking a user.
Target The target room or user specified as free text (e.g., #general, @username, or roomId). If empty, the default target from credentials is used.
Room Select a room (channel, group, or direct message) from a list to target the message operation.
User Select a user to send a direct message to from a list of users.
Message ID The unique identifier (_id) of the message to update or delete.

Output

JSON

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

Dependencies

  • Requires Rocket.Chat API access with an API key credential for authentication.

Troubleshooting

  • Ensure the message ID provided for update or delete operations is correct and exists in the specified room.
  • Verify that the target room or user is accessible and the credentials have permission to post, update, or delete messages in that context.
  • For sending or posting messages, ensure the text content is not empty unless the API supports empty messages.
  • When opening a DM, if the user does not exist or cannot be messaged, an error will be thrown indicating the DM could not be opened.

Links

Discussion