Send Message

rocketchat.send_message
ActionChat & messagingconnection required

Calls the Rocket.Chat API with the connection's credentials.

Send a message to one room id, with an optional caller-supplied message id. Use this instead of post_message when a retried step must not post twice: reusing the same message_id makes the second attempt a no-op.

Connection

Required
Yes — the node will not save without one
Auth type
API key
Providers
Rocket.Chat
Secret shape
the personal access token, or {"token": "…", "user_id": "…"}
Config it needs
base_url, user_id
Resolved by
config.connection_id, else node.connection_id

Configuration

5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
room_id
The room id (not its name) — use rocketchat.get_channel_info to resolve one.
stringYes———
msg
The markdown message to send.
stringNo——Deploy finished :rocket:
attachments
Rich message attachments (JSON array of Rocket.Chat attachment objects, each with title, text, color, image_url, fields and so on). For a real file use rocketchat.upload_file instead.
arrayNo—array of object—
tmid
Post as a reply inside this thread; leave blank to start a new message.
stringNo———
message_id
An id to store the message under, so a retry reuses it instead of posting a duplicate. Leave blank to let Rocket.Chat generate one.
stringNo———
  • At least one of msg, attachments must be set.

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "msg": "Deploy finished :rocket:"
}

Output

One shape.

result

FieldTypeExample
message._id
The message id.
string7aDSXtjMA3KPLxLjt
message.rid
The id of the room the message is in.
string—
message.msg
The message text, as Rocket.Chat stored it.
string—
message.ts
When the message was posted, as an ISO-8601 timestamp.
string—
message.u._id
The id of the user the message was posted as.
string—
message.u.username
The username the message was posted as.
string—
message._updatedAt
When the message last changed, ISO-8601.
string—
success
True — Rocket.Chat's own envelope flag.
boolean—
{
  "message": {
    "_id": "7aDSXtjMA3KPLxLjt",
    "_updatedAt": "",
    "msg": "",
    "rid": "",
    "ts": "",
    "u": {
      "_id": "",
      "username": ""
    }
  },
  "success": false
}

See Send Message run in a workflow.

In a technical demo we add the Rocket.Chat connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.