It depends on the type of the verb in the main clause which nominalizer should be used.
1)verbs basically used with こと
verbs regarding thoughts, communication/affection with words
言う、話す、伝える、教える、知らせる、命令する、要求する、考える、思う、信じる、、、
彼女が出て行ったことを彼に話した。
This こと is often interchangeable with と for quotation.
彼女が出て行ったと彼に話した。
2)verbs basically used with の
sensory/perceptive verbs, verbs which express that an action/movement comes into effect at the scene, at the time.
見る、見える、聞く、聞こえる、感じる、手伝う、助ける、とめる、待つ、、、
This の can be interchangeable with the nominalizer ところ in some cases.
彼女が部屋を出て行くのを見た。
彼女が部屋を出て行くところを見た。(This sentence is correct, but the meaning is changed from の.)
もの is used only as a pronoun.