n8n - ✅(Solved) Fix Regression: Telegram Send Document strips Chinese punctuation from binary file names [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
n8n-io/n8n#28354Fetched 2026-04-11 06:30:41
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
commented ×1cross-referenced ×1labeled ×1mentioned ×1

PR fix notes

PR #28358: fix(telegram Node): Use RFC 5987 encoding for non-ASCII filenames in Send Document

Description (problem / solution / changelog)

Summary

When a binary file has a non-ASCII filename (e.g. containing Chinese punctuation characters like 【】()), the Telegram Send Document operation silently strips or corrupts those characters. This is a regression introduced when the binary file upload was reworked.

Root cause: The Content-Disposition header for the file part is built by the form-data library using filename="<raw>". When the filename contains non-ASCII bytes, some HTTP endpoints (including Telegram's Bot API) may strip or mangle them because raw UTF-8 in an ASCII-era header is technically non-standard.

Fix: Detect filenames containing non-ASCII characters and use RFC 5987 percent-encoding (filename*=UTF-8''<encoded>). For ASCII-only filenames the existing plain-object code path is preserved unchanged. The form-data library's options.header string override is used to inject the custom Content-Disposition header.

Changes:

  • Telegram.node.ts – new branch in sendDocument that builds a real FormData instance with RFC 5987-encoded filename header for non-ASCII filenames
  • Telegram.node.test.ts – two new test cases covering the non-ASCII and ASCII-only code paths

Related Linear tickets, Github issues, and Community forum posts

Fixes #28354

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with Backport to Beta, Backport to Stable, or Backport to v1 (if the PR is an urgent fix that needs to be backported)

Changed files

  • packages/cli/src/modules/mcp/mcp.controller.ts (modified, +49/-1)
  • packages/frontend/editor-ui/src/features/ndv/parameters/utils/fromAIOverride.utils.test.ts (modified, +11/-0)
  • packages/frontend/editor-ui/src/features/ndv/parameters/utils/fromAIOverride.utils.ts (modified, +0/-1)
  • packages/nodes-base/nodes/Telegram/Telegram.node.ts (modified, +46/-13)
  • packages/nodes-base/nodes/Telegram/tests/Telegram.node.test.ts (modified, +88/-0)
RAW_BUFFERClick to expand / collapse

Bug Description

When using the Telegram node with Message → Send Document, the file name stored in the binary data is not preserved after upload.

The issue affects Chinese punctuation characters in the file name. In my tests, Chinese punctuation is stripped or normalized after the file is sent through the Telegram node.

Example:

Binary file name before sending:

认知天性【标题已矫正】.md

File name returned by Telegram node output after sending:

认知天性 标题已矫正.md

Observed behavior:

  • Chinese characters themselves are preserved
  • Chinese punctuation characters are stripped or normalized
  • This includes at least:
    • 【】
    • ()
  • From my testing, this seems to affect Chinese punctuation in general, not just one specific pair of brackets

This appears to be a regression:

  • At least n8n 1.109.1 worked correctly
  • n8n 2.14.2 shows this issue
  • I have not tested every version in between yet

From a workflow perspective, the binary file name is correct before sending, but the file name returned after the Telegram upload is changed.

To Reproduce

  1. Prepare a binary file in n8n.
  2. Set the binary file name to a value containing Chinese punctuation, for example: 认知天性【标题已矫正】.md
  3. Add a Telegram node with:
    • Resource: Message
    • Operation: Send Document
    • Binary File: enabled
    • Input Binary Field: the binary field containing the file
  4. Execute the node.
  5. Inspect the Telegram node output, especially: result.document.file_name

Actual result:

  • The original binary file name is not preserved
  • Chinese punctuation is stripped or normalized
  • Example returned value: 认知天性 标题已矫正.md

Additional notes:

  • The same behavior also happens with other Chinese punctuation, such as ()
  • n8n 1.109.1 is confirmed working
  • n8n 2.14.2 reproduces the issue
  • Intermediate versions have not been tested yet

Expected behavior

The Telegram node should preserve the binary file name exactly as provided before upload, including Chinese punctuation characters.

For example, if the binary file name is:

认知天性【标题已矫正】.md

then the uploaded file name returned by the node should remain exactly:

认知天性【标题已矫正】.md

The same should apply to other Chinese punctuation characters as well.

Since this behavior works in n8n 1.109.1 but fails in n8n 2.14.2, this looks like a regression.

Debug Info

Please see the attached screenshots for the node configuration and output.

Confirmed versions:

  • Working: 1.109.1
  • Broken: 2.14.2

Versions in between:

  • Not fully tested yet

Environment:

  • Deployment type: [Docker / npm / desktop / cloud / self-hosted]
  • Database: [SQLite / Postgres / etc.]
  • OS: [your OS]
  • Node.js version: [if known]

Additional notes:

  • The binary metadata inside n8n shows the expected file name before sending
  • The changed file name appears in the Telegram node output under result.document.file_name
  • The issue affects Chinese punctuation characters in file names
  • Chinese characters themselves are preserved

Operating System

Ubuntu 24.04 LTS

n8n Version

2.14.2

Node.js Version

Official Docker Image

Database

PostgreSQL

Execution mode

main (default)

Hosting

self hosted

extent analysis

TL;DR

Downgrade to n8n version 1.109.1 to preserve Chinese punctuation characters in file names sent through the Telegram node.

Guidance

  • Verify the issue by testing with n8n version 1.109.1, as it is confirmed to work correctly.
  • Test intermediate versions between 1.109.1 and 2.14.2 to identify the exact version where the regression occurred.
  • Consider reporting the issue to the n8n developers, providing the detailed reproduction steps and version information.
  • If downgrading is not feasible, explore alternative workflows or nodes that do not modify the file name, as a temporary workaround.

Example

No code snippet is provided, as the issue is related to the Telegram node's behavior in n8n, and no specific code changes are implied.

Notes

The root cause of the issue is not explicitly stated, but it appears to be a regression introduced in a version later than 1.109.1. The exact version where the issue started is not known, as intermediate versions have not been fully tested.

Recommendation

Downgrade to n8n version 1.109.1, as it is confirmed to preserve Chinese punctuation characters in file names sent through the Telegram node. This is a temporary solution until the issue is fixed in a later version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

The Telegram node should preserve the binary file name exactly as provided before upload, including Chinese punctuation characters.

For example, if the binary file name is:

认知天性【标题已矫正】.md

then the uploaded file name returned by the node should remain exactly:

认知天性【标题已矫正】.md

The same should apply to other Chinese punctuation characters as well.

Since this behavior works in n8n 1.109.1 but fails in n8n 2.14.2, this looks like a regression.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - ✅(Solved) Fix Regression: Telegram Send Document strips Chinese punctuation from binary file names [1 pull requests, 1 comments, 2 participants]