https://discord.gg/botpress logo
Hello I need a little help here. In my execute cod...
# 🌎general
m
Hello I need a little help here. In my execute code card I have the code below. I get the response and generate the message. Now I want to show the message to the client how can I achieve that? Please note storing the message in the variable also doesnt seem to work as it remains empty. axios.post(
${url}/client/statetmententries
, getStatementReq) .then((response: any) => { if(response && response.data) { const clientNo = response.data.No; const balance = response.data.Balance; const transactions = response.data["0"]; let smsMessage = `Client No: ${clientNo}\nRemaining Balance: ${balance}\nTotal Paid:\n`; transactions.forEach((transaction: any) => { smsMessage += `Date: ${transaction["Posting Date"]}, Amount: ${transaction.Amount}\n`; }); console.log(smsMessage) workflow.message = smsMessage } }) .catch((error: any) => { console.error(error) })