This work focuses on the development of a new synthesis route of reducing the number of reactants for the synthesis of phosphate-based materials. Thus one compound, the hexamethylphosphoramide, plays the roles of both precursor of the structure-directing agent (SDA) and the phosphorus source. The influence of some synthesis parameters (heating temperature, nature of solvent, acidity of the medium...) on the in situ decomposition of hexamethylphosphoramide and the results obtained for the gallophosphate system are reported.Syntheses were performed in aqueous or quasi non-aqueous (ethylene glycol) media at 150°C and 180°C. Samples were characterized by X-ray diffraction, liquid NMR spectroscopy (1H, 31P) and chemical analysis. 1H liquid NMR spectroscopy was used to fully characterize the decomposition of the alkylphosphoramide during the synthesis. The in situ generation of the SDA and the phosphorus source allowed preparing crystallized gallophosphates such as GaPO4-21, 2D-GAPON, 3D-GAPON, ULM-4 and ULM-3. Finally for the different reaction media, a decomposition mechanism of the hexamethylphosphoramide was proposed.