Send a direct message
Schema.slack.functions.SendDm
slack#/functions/send_dm
interactive_blocks
was provided, the action object contains the button properties (see action payload below)
interactive_blocks
is provided as an input parameter, the interactivity context becomes available
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.
const sendDmStep = ExampleWorkflow.addStep(
Schema.slack.functions.SendDm,
{
user_id: "U0J46F228L0",
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"
}