Is this possible to send response from Database instead of template?

Is this possible to send a response to the user from the Database instant of the template ? I want to store intent and action in the database If Yes how? I can use MongoDB or SQL

Yes it is absolutely possible.

You can implement an action which does the database call and get the response string.

@samrudh Thank You for Your Response. can I get An Example of this so it will easy for me to understand