# Telegram - Bad Request: message is too long

**URL:** <https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864>\
**Category:** Questions\
**Tags:** data-transformation, telegram\
**Created:** [April 5, 2022, 6:20am UTC](https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864 "2022-04-05T06:20:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cholzer79](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/cholzer79/32/12006_2.png) [@cholzer79](https://community.n8n.io/u/cholzer79)\
**Post date:** [April 5, 2022, 6:20am UTC](https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864/1 "2022-04-05T06:20:15Z")

</div>

I use an n8n workflow to forward E-Mails via the IMAP Reader to Telegram.

Sometimes an E-Mail is too long which causes the Telegram node to throw an error.

Is there a way how I can limit the characters/cut it off before the message is sent to the Telegram node so that the message stays inside the limit?

I already tried to add slice, but then I get [object Object] in telegram instead of the E-Mail message. O.o

```auto
{{$node["markup"].json["markuptextPlain"].slice(0, 100)}}

```

 ![telegram](https://europe1.discourse-cdn.com/n8n/original/2X/9/9555b1641a100354ffce53c5fb41886c7b3c9044.jpeg)

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [April 5, 2022, 9:56am UTC](https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864/2 "2022-04-05T09:56:16Z")

</div>

Hi @cholzer79, how does the data looking from your `markup` node look like and how is your Telegram node set up? Is there a chance `markuptextPlain` isn’t a string (in which case slice would not return a string)?

---

<div class="post-metadata">

**Author:** ![cholzer79](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/cholzer79/32/12006_2.png) [@cholzer79](https://community.n8n.io/u/cholzer79)\
**Post date:** [April 5, 2022, 2:37pm UTC](https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864/3 "2022-04-05T14:37:59Z")

</div>

ah dang, you are right. I sliced off a part of my ‘markup’ function output which telegram did not like.  
'My fault. XD  
I fixed it now and works like a charm!

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [April 5, 2022, 2:39pm UTC](https://community.n8n.io/t/telegram-bad-request-message-is-too-long/12864/4 "2022-04-05T14:39:16Z")

</div>

Nice, glad to hear! Many thanks for confirming 🙂
