The markdown block type (introduced in Block Kit - Feb 2025, expanded in Mar 2026) works correctly when sent via WebClient.chat_postMessage, but returns a 500 error when sent via WebhookClient (i.e. slash command
response_url).
Reproducible example:
from slack_sdk.webhook import WebhookClient
from slack_sdk import WebClient
blocks = [
{
"type": "markdown",
"text": "## Heading\n\n| Col A | Col B |\n|---|---|\n| 1 | 2 |"
}
]
# ✅ Works — returns 200
client = WebClient(token="xoxb-...")
client.chat_postMessage(channel="#test", blocks=blocks, text="fallback")
# ❌ Fails — returns 500
webhook = WebhookClient("https://hooks.slack.com/commands/T.../...")
webhook.send(blocks=blocks)
Expected behavior: WebhookClient.send() should support the markdown block type, same as chat.postMessage.
Actual behavior: Slack's response_url endpoint returns HTTP 500 with no descriptive error body.
Context:
- slack_sdk version: 3.39.0
- Python version: 3.12.12
- This affects slash command responses where response_url is the standard reply mechanism
Category (place an x in each of the [ ])
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The markdown block type (introduced in Block Kit - Feb 2025, expanded in Mar 2026) works correctly when sent via WebClient.chat_postMessage, but returns a 500 error when sent via WebhookClient (i.e. slash command
response_url).
Reproducible example:
Expected behavior: WebhookClient.send() should support the markdown block type, same as chat.postMessage.
Actual behavior: Slack's response_url endpoint returns HTTP 500 with no descriptive error body.
Context:
Category (place an
xin each of the[ ])Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.