We study the viability of different gas-phase ion-molecule reactions that could produce precursors of formamide in the interstellar medium. We analyze different reactions between cations containing a nitrogen atom (NH + 3 , NH + 4 , NH 3 OH + , and NH 2 OH + ) and neutral molecules having one carbonyl group (H 2 CO and HCOOH). First, we report a theoretical estimation of the reaction enthalpies for the proposed processes. Second, for more favorable reactions, from a thermodynamic point of view, we perform a theoretical study of the potential energy surface. In particular, the more exothermic processes correspond to the reactions of ionized and protonated hydroxylamine with formaldehyde. In addition, a neutral-neutral reaction has also been considered. The analysis of the potential energy surfaces corresponding to these reactions shows that these processes present a net activation barrier and that they cannot be considered as a source of formamide in space.