¿How can I get the user responses?


I would like to know how can I get the users answers after the chatbot conversation is completed. I want my chatbot to help users to answer questionnaires. And when the conversation is finished, I want to get the user answers in json or xml format to process them. Is that possible using Botpress? How can this be done?

Thanks in advance.

Hi @miguel.pardo ,

You can send it to an SMTP API or any other API.
1- So right before conversation ends, you can add an Execute Code node
2- In the code node, access {{event.state.session.history}}, format it the way you want
3- Send it to yourself as an e-mail through an API call using Axios: axios - npm
Or send it to any other API you have.

What do you think of this?

Hi @bassam.tantawi

Thanks for your answer. It has a lot of sense.

If I had an API REST, can I make a POST HTTP request to my API when the conversation is finished using Botpress? That would be perfect for me.

Thanks again!

1 Like

Hi @miguel.pardo ,