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. Common use cases include automating chat communications, updating existing messages, deleting messages, opening direct message channels, and sending messages directly to users. For example, a user can update a message in a specific channel or send a direct message to a user programmatically.

Use Case Examples

  1. Updating a message in a channel by specifying the message ID and new text.
  2. Sending a direct message to a user by opening a DM and posting a message.
  3. Deleting a message from a room using the message ID.

Properties

Name Meaning
Target Mode Determines how the target for the message is specified, either by free text, picking a room, or picking a user.
Target The target room, channel, or user specified as free text. If empty, the default target from credentials is used.
Room The selected room (channel/group/DM) when using the 'Pick a Room' target mode.
User The selected user to DM when using the 'Pick a User' target mode.
Message ID The unique identifier of the message to update or delete.
New Text The new text content to update an existing message with.

Output

JSON

  • json - The response from the 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 token or personal access token for authentication.

Troubleshooting

  • Ensure the message ID is correct when updating or deleting messages to avoid errors.
  • Verify that the target room or user exists and is accessible with the provided credentials.
  • When sending DMs, confirm that the DM channel opens successfully before posting a message; otherwise, an error is thrown.
  • Check that JSON attachments are properly formatted to avoid parsing errors.

Links

Discussion