Acylation of 6,7-dimethoxy-1,2,3,4-tetrahydroisoquinoline (I) with N-Boc-nipecotic acid (II) by means of EDC/HOBt gives amide (III). Subsequent acidic cleavage of the Boc protecting group yields amine (IV). 3,4-Methylenedioxyaniline (V) is acylated by acryloyl chloride in the presence of Et3N to produce the acrylanilide (VI). Then, Michael addition of piperidine (IV) to the acrylanilide (VI) in boiling toluene provides the title compound.