Open Direct Message Channel
mattermost.create_direct_channel
ActionChat & messagingconnection required
Calls the Mattermost API with the connection's credentials.
Open the direct-message channel between two users and return it, so a post op can send a DM to its id.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- Mattermost
- Secret shape
- the personal access token, or {"token": "…"}
- Config it needs
- base_url, team_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
2 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
user_id The user to message — from mattermost.get_user_by_username or by_email. | string | Yes | — | — | — |
other_user_id The other side of the DM. Defaults to the connection's own user. | string | No | — | — | — |
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The channel id — what the post ops need. | string | chn123456789 |
team_id The team the channel belongs to. | string | — |
name The channel handle used in its URL. | string | town-square |
display_name The channel name shown in the UI. | string | — |
type 'O' public, 'P' private, 'D' direct, 'G' group. | string | — |
header The channel header text. | string | — |
purpose The channel purpose text. | string | — |
create_at Creation time, in milliseconds since the epoch. | number | — |
{
"create_at": 0,
"display_name": "",
"header": "",
"id": "chn123456789",
"name": "town-square",
"purpose": "",
"team_id": "",
"type": ""
}See Open Direct Message Channel run in a workflow.
In a technical demo we add the Mattermost connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.