Connecting rasa to database

I want to send the users input to the database when a certain action is triggered so I wanted to know any way to implement that and I want the output in json format and only pass the last stored message of the conversation .The database is postgresql. I was thinking of creating a custom action for this but am not getting how to go about that.

Hi @Godo ,

You can take this approach:

  • Save the required items in slot
  • Once you receive the required last message then call a action and there you can connect to the DB and store into it