Skip to content

files_upload_v2 returns internal_error when using markdown in blocks #1756

Description

@haimrait

files_upload_v2 returns internal_error when using markdown in blocks parameter

Reproducible in:

slack-bolt==1.25.0
slack-sdk==3.36.0
Python 3.13.5
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74
Darwin Kernel Version 24.5.0

The Slack SDK version

slack-bolt==1.25.0
slack-sdk==3.36.0

Python runtime version

Python 3.13.5

OS info

ProductName:		macOS
ProductVersion:		15.5
BuildVersion:		24F74
Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6041

Steps to reproduce:

1. Code Example

from slack_sdk.web.async_client import AsyncWebClient
import json

# Initialize client
client = AsyncWebClient(token="xoxb-your-token")

# Prepare parameters
channel_id = "D099T7G7VHD"  # DM channel
blocks = [{"type": "markdown", "text": "_**Haim Raitsev** posted a new message_\\n> test"}]
files = [{"id": "F09J0L8TDRQ", "title": "screenshot.png"}]

# Attempt to upload with blocks
response = await client.files_upload_v2(
    channel=channel_id,
    file_uploads=[
        {
            "content": b"<file_bytes_here>",
            "filename": "screenshot.png",
            "title": "screenshot.png"
        }
    ],
    blocks=json.dumps(blocks)
)

2. Response

{
    "ok": False,
    "error": "internal_error"
}

Expected result:

The file should be uploaded successfully with the rich text blocks displayed in the message, as the underlying files.completeUploadExternal:

Actual result:

The API returns {"ok": false, "error": "internal_error"} without any additional error details.


Additional Context:

This issue is reproduced only when we have a new markdown block (https://docs.slack.dev/reference/block-kit/blocks/markdown-block/) when we use other blocks the message posted correctly.

files.completeUploadExternal API Call

HTTP Request

POST https://slack.com/api/files.completeUploadExternal HTTP/1.1
Host: slack.com
Authorization: Bearer xoxb-your-token-here
Content-Type: application/x-www-form-urlencoded

Request Details

Method: POST

URL: https://slack.com/api/files.completeUploadExternal

Headers:

Authorization: Bearer xoxb-your-token-here
Content-Type: application/x-www-form-urlencoded

Body (URL-encoded):

files=[{"id":"F09J0L8TDRQ","title":"screenshot.png"}]
channel_id=D099T7G7VHD
blocks=[{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}]

Body Parameters Breakdown

Parameter Value Description
files [{"id":"F09J0L8TDRQ","title":"screenshot.png"}] JSON array of file objects (URL-encoded)
channel_id D099T7G7VHD DM channel ID where file will be shared
blocks [{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}] JSON array of blocks (URL-encoded)

Example using cURL

curl -X POST https://slack.com/api/files.completeUploadExternal \
  -H "Authorization: Bearer xoxb-your-token-here" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode 'files=[{"id":"F09J0L8TDRQ","title":"screenshot.png"}]' \
  --data-urlencode 'channel_id=D099T7G7VHD' \
  --data-urlencode 'blocks=[{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}]'

Error Response (Current Issue)

{
    "ok": false,
    "error": "internal_error"
}

Thank you for maintaining this excellent SDK!

Activity

  1. changed the title [-](Set a clear title describing the issue)[/-] [+]files_upload_v2 returns internal_error when using markdown in blockss[/+] on Oct 1, 2025
  2. changed the title [-]files_upload_v2 returns internal_error when using markdown in blockss[/-] [+]files_upload_v2 returns internal_error when using markdown in blocks[/+] on Oct 1, 2025
  3. haimrait commented on Oct 19, 2025

    @haimrait
    Author

    any update?

  4. added
    bugM-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented
    and removed on Oct 21, 2025
  5. zimeg commented on Oct 21, 2025

    @zimeg
    Member

    Hey @haimrait! 👋 Thanks for reporting this and a kind bump 👾 ✨

    I can confirm that the files.completeUploadExternal method errors when using the markdown block which seems off to me.

    We're investigating this on the backend side of things now, but I might recommend using different blocks in the meantime.

    Also, we need to support this argument from the SDK itself I believe - following slackapi/node-slack-sdk#2261. This might be unrelated, but let's track it here for now 🎁

  6. github-actions commented on Nov 24, 2025

    @github-actions
  7. razlo commented on Nov 30, 2025

    @razlo

    Hi, any updates? Thanks!

  8. github-actions commented on Jan 5, 2026

    @github-actions

    👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

  9. kperkins-ss commented on Jan 12, 2026

    @kperkins-ss

    Just reporting that this is still an issue

  10. daniel-daydream commented on Jul 14, 2026

    @daniel-daydream

    It would be amazing if this issue could be fixed. It still exists, and it's affecting my team.

  11. luxalpa commented on Sep 7, 2026

    @luxalpa

    We're investigating this on the backend side of things now, but I might recommend using different blocks in the meantime.

    Which blocks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions