Reply to a message by creating or adding to a thread
Schema.slack.functions.ReplyInThread
slack#/functions/reply_in_thread
true
false
workflow_button
element.
Based on certain conditions, you can reply to a message in-thread.
const replyInThreadStep = ExampleWorkflow.addStep(
Schema.slack.functions.ReplyInThread,
{
message_context: sendMessageStep.outputs.message_context,
reply_broadcast: false,
message: "Thank you for submitting a message to #sos, Gilligan.",
},
);
To reply in-thread with buttons, they must be wrapped in a block (example: section block). Then, use the workflow_button
element.
const replyInThreadButton = ExampleWorkflow.addStep(
Schema.slack.functions.ReplyInThread,
{
message_context: sendMessageStep.outputs.message_context,
reply_broadcast: false,
message: "Please confirm your request for help in #sos.",
interactive_blocks: [
{
"type": "section",
"text": {
"type": "plain_text",
"text": "Click to confirm",
},
"accessory": {
"type": "workflow_button",
"text": {
"type": "plain_text",
"text": "Confirm",
},
"action_id": "button-action-id-custom",
"workflow": {
"trigger": {
"url":
"https://slack.com/shortcuts/Ft0123ABC456/xyz...zyx",
},
},
},
},
]
},
);