Open Direct Message
slack.open_dm
ActionChat & messagingconnection required
Calls the Slack Web API with the connection's bot token.
Open or resume a DM or group DM and return the channel id to post to.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Slack
- Secret shape
- the Slack bot token (xoxb-…), or {"token": "xoxb-…"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
3 fields, none 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 |
|---|---|---|---|---|---|
users Comma-separated user ids (U…), one for a DM and up to eight for a group DM. | string | No | — | — | U012ABCDEF |
channel Resume an existing DM by its channel id (D… or G…) instead of naming users. | string | No | — | — | — |
return_im Ask Slack for the full DM channel definition rather than just its id. | boolean | No | false | — | — |
- At least one of users, channel must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"return_im": false,
"users": "U012ABCDEF"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
ok Always true; a failure raises instead. | boolean | true |
channel The DM channel id — pass it to slack.post_message. | string | — |
already_open True when the conversation already existed. | boolean | — |
no_op True when Slack did nothing because it was already open. | boolean | — |
{
"already_open": false,
"channel": "",
"no_op": false,
"ok": true
}Notes
- The bot must be a member of a private channel before it can act there (Slack answers not_in_channel otherwise).
- Slack rate-limits each Web API method on its own tier; a throttled call fails with the number of seconds to wait and is safe for the node's retry policy to repeat.
Templates that use Slack
See Open Direct Message run in a workflow.
In a technical demo we add the Slack connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.