Skip to main content

send_dm

Facts

Description
Schema
Schema reference
Required scopes
No additional scopes required

Input Parameters

Output Parameters

Usage info

Sends a message directly to a user, from your workflow.

If you include a button in the direct message, the function execution will not continue until an end user clicks on that button.

Example workflow step

const sendDmStep = ExampleWorkflow.addStep(
Schema.slack.functions.SendDm,
{
user_id: "U123ABC456",
message: "Don't give up. Never surrender. Except the cookies. Surrender the cookies.",
},
);

Example action payload

{
"action_id": "WaXA",
"block_id": "=qXel",
"text": {
"type": "plain_text",
"text": "View",
"emoji": true
},
"value": "click_me_123",
"type": "button",
"action_ts": "1548426417.840180"
}