Need to post variable values into Telegram channel
# 🤝help
m
Hi, i am trying to post certain variables into external telegram channel , using Botpress Cloud execute code card. Ai has generated a code: ________________ const telegramApiKey = "YOUR_TELEGRAM_API_KEY" const telegramChatId = "YOUR_TELEGRAM_CHAT_ID" const message =
Variable 1: ${workflow.variable1}\nVariable 2: ${workflow.variable2}
const url =
https://api.telegram.org/bot${telegramApiKey}/sendMessage
const payload = { chat_id: telegramChatId, text: message } await axios.post(url, payload) _______________ but after running this code i get an error : Error executing action "inline-ins-466f0fe5b3.js" in flow:Main:node:Standard4 [SyntaxError, Missing } in template expression] What am I doing wrong? Or maybe you have ready to use code for my task. Your help is much appreciated!