Create Direct Message

rocketchat.create_direct_message
ActionChat & messagingconnection required

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

Open (or reopen) a direct-message room with one person or a group, and return its room id so a message can be sent into it.

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

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

FieldTypeRequiredDefaultConstraintsExample
username
The person to open a direct message with, with or without the '@'.
stringNo———
usernames
A comma-separated list of usernames for a group direct message.
stringNo———
  • At least one of username, usernames must be set.

Output

One shape.

result

FieldTypeExample
room.rid
The direct-message room id.
string—
room.t
The room type; always 'd' for a direct message.
string—
room.usernames
The usernames in the conversation.
array—
success
True — Rocket.Chat's own envelope flag.
boolean—
{
  "room": {
    "rid": "",
    "t": "",
    "usernames": []
  },
  "success": false
}

See Create Direct 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.