нам удалось - (for us was success) we succeeded (in/to something)
нам пришлось - (for us was necessary) we had (to)