How to save additional fields in the database?

Hello, With rasa conversations can be saving to database mongo/postgres etc. Most of code is written in python. For example: user send message: “hello world” then this message will be save to database

How to catch the moment when someone(user/bot) writes a message in python? I want call rest api at this point. Second question: Is possible add fields to database? For example user/rasa write message: “hello” I want save message hello and for example field country=“UK”, field=“MY_CUSTOM_FIELD”=‘somevalue’ etc? Is it possible?

I would call a custom action. Then I would implement all custom logic and database calls in the action server. To let rasa recognize python code you should provide some code within a dedicated intent. Then define a story or rule that calls the action server if someone types in python code. Probably I didn’t get the question right, so did that help? :slight_smile: