Skip to content

Telegram node fails #15317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gitmeatarru opened this issue May 12, 2025 · 4 comments
Closed

Telegram node fails #15317

gitmeatarru opened this issue May 12, 2025 · 4 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@gitmeatarru
Copy link

Bug Description

Hello everyone

I report a strange behavior of the telegram node, when everything is fine with the text, but it gives an error and does not send a message, here is an example of the message:

[
{
""output": "To convert pressure from kPa to psi, use the following coefficient: 1 kPa = 0.145038 psi.  \n\n Let's calculate: \n\n270 kPa * 0.145038 = approximately 39.157 psi.  \n\n I can check more precisely, if necessary."
}
]

About. removeMarkdown()
This is the last attempt to fix this somehow, because I noticed that if there are control characters or code markup, then the node also goes into error!

To be honest, this is already quite boring, considering that I use the paid ChatGPT 4.1 nano and at the same time specifically use the function to clean up Markdown and it still doesn't help!!! Why?! How is it?

Screenshot
https://prnt.sc/pd0ne2Xo3DwU

As you can see, the text goes to the node and everything lights up green, but the node goes into error!
And so every time it happens randomly, wants to work, wants not to work, it really pisses me off!
Guys, we need to do something about this already, this is an old bug that has been dragging on for a very long time!

Let's make a parameter in the telegram node that would automatically bring the input data to the 100% working version that Telegram will accept!!!

Node:

{
  "nodes": [
    {
      "parameters": {
        "chatId": "={{ $('Telegram Trigger1').item.json.message.chat.id }}",
        "text": "={{ $('ASISTENT').item.json.output.removeMarkdown() }}",
        "additionalFields": {
          "appendAttribution": false,
          "disable_web_page_preview": true
        }
      },
      "id": "11303f84-b6f2-4504-9690-9a50ad546513",
      "name": "Response1",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2000,
        520
      ],
      "webhookId": "311f135b-8f35-43ec-ba56-81912d731a6d",
      "retryOnFail": true,
      "credentials": {
        "telegramApi": {
          "id": "CXKeGwNo9hv875gq",
          "name": "Bender"
        }
      },
      "onError": "continueErrorOutput"
    }
  ],
  "connections": {},
  "pinData": {},
  "meta": {
    "instanceId": "97123157e3f77d693b32c97d1606d6ccd5c5a60a31dad07f4e71594804c649fe"
  }
}

To Reproduce

Create an AI agent
then telegram the knife and send a text message

Expected behavior

normal node execution

Operating System

Ubuntu Linux 24.04

n8n Version

1.91.3

Node.js Version

dont know, its in docker container

Database

PostgreSQL

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented May 12, 2025

Hey @gitmeatarru,

We have created an internal ticket to look into this which we will be tracking as "GHC-1965"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label May 12, 2025
@Joffcom
Copy link
Member

Joffcom commented May 12, 2025

Hey @gitmeatarru

You mentioned that this is an old bug that has been dragging on, can you share the other reports of this?

Looking at your input I suspect this is an issue with Telegram trying to handle the text as markdown, setting the parse mode to html will likely resolve this.

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label May 12, 2025
@gitmeatarru
Copy link
Author

Hey @gitmeatarru

You mentioned that this is an old bug that has been dragging on, can you share the other reports of this?

Looking at your input I suspect this is an issue with Telegram trying to handle the text as markdown, setting the parse mode to html will likely resolve this.

no, im not reported about this, but its was from 1.74 version, so its why im call this ild bug

about telegram with ur tips - i`m testing, will add news later about it =)

@Joffcom Joffcom removed the Needs Feedback Waiting for further input or clarification. label May 21, 2025
@gitmeatarru
Copy link
Author

gitmeatarru commented May 31, 2025

and so, more than a week of tests passed, and the error never crashed

I also added tag removal and markdown removal, everything looks working so far =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

2 participants