How to get user input and store them into training data

Dont use custom action as it will go as per the story what if the user lefts the conversation in the middle? Use tracker to get the conversation. The best way is to get the conversation from tracker current state and export it to .md file.