Hello everyone, I am trying to programmatically se...
# 💻developers
c
Hello everyone, I am trying to programmatically send a message to user chat from the Execution Code panel. Botpress AI is suggesting to use a HTTP call to the Botpress API, but that ain't working Any ideas how I can do that? Something like:
Copy code
const messages = [{ text: '12313132131' }]

for (const message of messages) {
  await client.createMessage({
    payload: { type: 'text', text: message.text },
    'x-user-key': event.userId,
    conversationId: event.conversationId
  })
}
https://cdn.discordapp.com/attachments/1121494527727902891/1245090190356250817/Captura_de_Tela_2024-05-28_as_16.03.29.png?ex=66577c1a&is=66562a9a&hm=220a9a6424a590fb3f141981f0133ee1047ba622d90d35d63186afda8349f4c3&
16 Views