Hi there, I am new to n8n and have no idea of json.
I created a Workflow, where all my emails are checked via IMAP Email trigger, if they are addressed to me directly (not cc) and if they are from certain domains (customers). After that they are sent
via telegram bot to my phone
transalted via text to speech and also sent via telegram
a out of office reply is sent.
My problem now is that I had the case of long emails with all the long texts from the whole conversation and now I got an error that the input is to long and can not sent via Telegram.
At the moment my Telegram Output looks like that:
Email von: {{ $json.from }}
Betreff: {{ $json.subject }}
Inhalt:
{{ $json.textPlain }}
Is it possible to limit the output of the textPlain to perhaps 2,500 Characters? This would also be cheaper on my OpenAI Budget for Text to speech
Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.
```
<your workflow>
```
That implies to any JSON output you would like to share with us.
Thank you for your contribution. Indeed, utilizing the JavaScript methods (like substring or slice ) in your expression is the easiest and best approach.