Abstract Azole-N-acetonitrile derivatives were utilized as synthons for an ambident carbonyl moiety via a strategy relying upon sequential base-mediated SN Ar substitution of a 2-halo heterocycle, in situ oxidation, and amine displacement. This strategy allows prompt and efficient synthesis of N-containing heteroaryl amides directly from the corresponding halides via a one-pot process.