The condensation of 2-methyl-3-(1H-imidazol-1-ylmethyl)indole (III) with acrylonitrile (IV) by means of benzyltrimethylammonium hydroxide (B) in dioxane gives 1-(2-cyanoethyl)-2-methyl-3-(1H-imidazol-1-ylmethyl)indole (V), which is then hydrolyzed with KOH in water. The reaction of compound (III) with methyl acrylate (VI) in the same conditions as before gives 1-(2-methoxy-carbonylethyl)-2-methyl-3-(1H-imidazol-1-ylmethyl)indole (VII), which is also hydrolyzed. Compound (III) can be obtained from 2-methylindole (I).