The N‐alkylation of pyridines with cyanohydrin triflates or α‐halonitriles furnishes 1‐(1‐cyanoalkyl)pyridinium salts that can react with nitroolefins under basic conditions to furnish polysubstituted indolizines. Overall, the indolizine core can be constructed from a pyridine, two aldehydes, and a nitroalkane, and no undesired functional groups remain in the products. When bromoacetonitrile was used for the N‐alkylation, indolizine‐3‐carbonitriles were obtained instead. The pyridine component may be replaced by other azines, giving rise to related heterocyclic systems.