Telegram Bot: Unescaped characters error

Hello
I dont know much coding and looking for help in solving an error I am getting when I am sending some text which has special character “₹” from my tradingview alert to pipedream to telegram bot. how can i encode the same so that the error for the alert is not trigger.

attached my workflow with details.

i think i need to do some changes in the last imgae having query value but dont know what code needs to be changed. Help would be appreciated.Thanks.

Hi @sid2040,

I’m sorry to hear you’re having trouble with special characters in your workflow. To encode the text properly, you can use the encodeURIComponent function in your code step before sending it to the Telegram bot.

In the last image where you have the query value, you can modify the code like this:

const encodedText = encodeURIComponent(steps.trigger.event.body.text);

Then, use the encodedText variable in place of the original text when constructing the URL for the Telegram bot.

If you still face any issues or need further assistance, please feel free to ask. You can also visit https://pipedream.com/support for more support options.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.

I made the change as below

however i am getting encodedtext as output now

Hey Sid, I wanted to see if you ever figured this out? I am doing the exact same thing and my head is getting sore from banging it off the desk. Cheers