1,3,5-Triazapentadienes usually show U- or twisted S-shaped conformations along the N-C-N-C-N skeleton due to dominating n/π* interactions. If, however, the 1,3,5-triazapentadiene unit is part of a ring, its W conformation might be restricted to the plane. Here, we describe the synthesis of 13 new 1,3,5-triazapentadienes 10-12, which are sterically restrained by incorporation into six- or seven-membered ring systems, by addition of a lithiated primary amine or hydrazine 5 to a dinitrile 7, 8, or 9 with the two cyano groups in 1,3 or 1,4 distance. These novel compounds show very strong tendency for aggregation due to hydrogen bonding, especially to form homodimers as seen from X-ray data in the solid state. Additional hydrogen bonding generates also linear chains in the crystal. Several of the new compounds show fluorescence in solution. Quantum chemical DFT calculations were used for evaluation of the dimerization energies and for interpretation of the photophysical properties.