Unravelling quantum dynamics using flow equations