By condensation of indole 3-carbonyl chloride (I) with endo-8-methyl-8-azabicyclo[3.2.1]octan-3-ol (II) by means of butyllithium in THF, or Na2CO3 in the same solvent.