Skip to main content

Threaded reply

Attach the parent message timestamp to the outgoing request. Preserve the original channel together with that timestamp when handling a delayed interaction.

Output

Local preview of the selected language’s tested example. Slack client appearance may differ; controls here do not send requests.

Reply in thread · 1700000000.000100
Reticulating splines... 30% complete.
Serialized output
{
"channel": "#general",
"mrkdwn": true,
"blocks": [
{
"type": "section",
"block_id": "<generated-block-id>",
"text": {
"type": "mrkdwn",
"text": "Reticulating splines... 30% complete."
}
}
],
"thread_ts": "1700000000.000100",
"text": ""
}

Code​

Pass thread_ts (the timestamp of the parent message) to reply in-thread.

from slackblocks import Message, SectionBlock

reply = Message(
channel="#general",
thread_ts="1700000000.000100",
blocks=SectionBlock("Reticulating splines... 30% complete."),
)
print(reply.json())