Covalent triazine frameworks (CTFs) are porous organic materials promising for applications in catalysis and separation due to their high stability, adjustable porosity and intrinsic nitrogen functionalities. CTFs are prepared by ionothermal trimerization of aromatic nitriles, however, multiple side reactions also occur under synthesis conditions, and their influence on the material properties is still poorly described. Here we report the systematic characterization of nitrogen in CTFs using X-ray photoelectron spectroscopy (XPS). With the use of model compounds, we could distinguish several types of nitrogen species. By combining these data with textural properties, we unravel the influence that the reaction temperature, the catalyst and the monomer structure and composition have on the properties of the resulting CTF materials.