In this section we will see examples of synthesis of heterocycles by nucleophilic attack on carbonyl groups. Aldehyde and ketone carbonyls give rise to nucleophilic addition reactions, while carbonyls of acid derivatives (halides, anhydrides, esters, amides, nitriles) give rise to addition-elimination processes.
A) We start with the synthesis of a benzofuran.
In the first stage we join the reactants by means of an S N 2 and we end up cycling with an aldol reaction.
Mechanism:
B) We continue with the synthesis of a pyrrole by imine formation and cyclization with enamine attack on carbonyl.
C) Obtaining indole by attacking nucleophilic heteroatoms to carbonyl.
D) We continue with another example of cyclization by attack of heteroatoms on carbonyls. In this case, hydroxylamine acts as a nucleophile to form an isoxazole.
Mechanism:
E) Cyclization on an ortho position of a benzene ring, to yield quinoline.