slackapi / slackapi/python-slack-sdk
markdown block type not supported when sending via WebhookClient / response_url
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4k
- Forks
- 857
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 16
Description
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 [ ])
- slack_sdk.web.WebClient (sync/async) (Web API client)
- slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- slack_sdk.models (UI component builders)
- slack_sdk.oauth (OAuth Flow Utilities)
- slack_sdk.socket_mode (Socket Mode client)
- slack_sdk.audit_logs (Audit Logs API client)
- slack_sdk.scim (SCIM API client)
- slack_sdk.rtm (RTM client)
- slack_sdk.signature (Request Signature Verifier)
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with slack_sdk.webhook.WebhookClient.send() and its sync/async implementations, then compare their block handling with WebClient.chat_postMessage(). Run the provided markdown-block example against both endpoints and inspect the response behavior. Done means WebhookClient supports the markdown block type consistently, or the endpoint limitation is clearly identified and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100