This study shows that keto-enol tautomerism in 2,4,6-trihydroxybenzaldehyde (Tp) imine COFs acts as variable electron/hole traps, boosting exciton dissociation and charge transfer. Tp COF (TpBpy) achieves an photocatalytic H2O2 generation rate of 8350 μmol h-1 g-1 under simulated light, and a solar-to-chemical conversion efficiency of 0.038% in a flow reactor under natural sunlight.