CuI-catalyzed coupling of vinyl halides with carbazates gives N-protected N-alkenylhydrazines, which are condensed with ketones under acidic conditions to give polysubstituted pyrroles. The pyrrole synthesis may go through a similar mechanism with Fischer indole synthesis, which involves a [3,3]-sigmatropic rearrangement and other reactions.