Sending Bot conversation via webhook
# 🤝help
b
i followed the tutorial here : https://botpress.com/docs/cloud/exporting-bot-data/exporting-conversations/from-the-bot/ but when it comes to sending the conversation to a webhook i always get a error. is the code right or am i doing something wrong
f
Hey there, Can you send a screenshot of your code + the expanded error it gives from the logs.
b
f
There are multiple errors there
Your endpoint is incorrect
You don't have a variable called name with the user scope
https://my-api-url.com should be replaced with your endpoint that you have created for receiving the data
You don't have to include this user: user.name Its just if you want to.
I would recommend you to use the rest of the code for the conversation part, if your have the Summary agent on so it would look like this instead. conversation: event.state.session.fullHistory OR conversation.SummaryAgent.summary OR conversation.SummaryAgent.transcript
b
can i also send the chat history as 2 variables, user: bot:
f
You could, but you would have to do some coding for it. Start out by fixing everything that is underlined by red
b
f
Perfect, have you tried running it?
b
it works
can i separate the bot and user into 2 arrays
bot and user
f
Yea, just needs some code. Let me know if you figure out how
b
Something like this
f
Thank you for sharing
34 Views