'How can get chat history of users in botpress?

I am working on Botpress chatbot. I need to send an email with a current user chat history. I have no idea how to achieve this. Version using: Botpress V12.2.0

I googled and documents. but found nothing related to it.



Solution 1:[1]

you need to query the database with the current userId. The table in your version may vary. In current version the table in postgresql is msg_messages where you have a field with the actual payload of the conversations. You will need to use json operators of psql to extract the text of the conversation to email it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Juanjo EspĂ­