Controlling the position of the Fermi level at the single-particle level in bulk amount of carbon nanotubes is a key technological bottleneck against their use in building nanodevices for electronics, optics, sensing, bioimaging, and beyond. Here are deployed a novel set of molecules built up from the same building blocks (aniline and methoxy groups attached on a triazine anchor) that efficiently p- and n-dope the nanotubes, depending upon the way they are assembled. Independent computational and experimental investigations consistently confirm the tunability-by-assembly concept of the charge transfer agents. The changes of the electronic density localized on the anchor groups and, upon attachment, the consistent variation of the position of the Fermi level in single-walled carbon nanotubes are monitored. The induced shifts reach several hundreds of meV, ranging from p-doping up to n-doping. This is evidenced by changes in the electronic and vibrational behavior of the nanotubes, as observed by Raman, photoelectron, and photoluminescence spectroscopies.