Production of heterocyclic amines instead of the amides expected from aminolysis reactions. Effective method for the synthesis of quinoxaline compounds from ethyl gallate. Cyclization of amines by nucleophilic substitution reaction using a green chemistry methodology.