Pharmacologically active derivatives of phenothiazine, iminodibenzyl, carbazole and pyrazole are prepared with high yields and chemoselectivity by the reaction of the correspondingN-allylic orN-methallylic compounds, primary or secondary amines, carbon monoxide and hydrogen in the presence of [Rh (cod) Cl] 2 as catalyst via a one pot hydroformylation-amine condensation-reduction sequence.