Nice lesson! I like the fact that you spoke about automated savings, for emergency funds accumulation, because with manual savings alone somebody might go broke once, as things to spend on will always exist.
Even as you plan to automate your saving, an high level of discipline is also necessary if you hope to get the best from your investment and savings.
There are possibilities of saving for your emergency and then spending it all even when the emergency hasn't set in so, as much as saving for emergency is necessary, being disciplined enough that you're not touching whatever you've set aside is much more crucial.
Of cause, what will help you stay invested for the long run is when you're able to Ballance everything up. Expecially in our countries where needs are too much and the finances to meeting those needs are most times not enough, it's expected to do proper planning and implement a proper disciplinary measure that will keep you balanced up with the allocation that goes into your expenses, investment and also emergency fund.