Climate change deeply impacts riverine ecosystems, altering flow regimes, species abundance, community composition, and key ecosystem functions. In this study we used an experimental approach to explore how reductions in flow velocity (experiment 1) and flushing events (experiment 2) influence periphyton, both in the presence and absence of macroinvertebrate grazers. We prepared eight stream mesocosms with periphyton pre-grown under two conditions: four mesocosms with macroinvertebrates and four without. Of these, six underwent flow changes and two were maintained as controls at a constant flow of 0.1 m s⁻¹. In experiment 1, mesocosms operated at high flow velocity (0.25 m s⁻¹) for one week and then transitioned to low flow velocity (0.05 m s⁻¹) for another week. In experiment 2, we tested three short flushing events of increasing frequency, during which flow velocity was abruptly raised from 0.05 to 0.25 m s⁻¹ for six hours. We assessed changes in periphyton community structure (biovolume and taxonomic composition) and metabolic activity, including gross primary production (GPP), ecosystem respiration (ER), and net ecosystem production (NEP). High flow velocity promoted the autotrophy of periphyton, but high suspended organic matter increased ER and heterotrophy at the whole mesocosm scale. Macroinvertebrates significantly reduced periphyton productivity, altered taxonomic composition, and decreased total algal biovolume. However, they contributed to enhancing the system's resilience by stabilizing metabolic rates despite abrupt changes in flow. These findings highlight the intricate interplay between flow dynamics and biotic interactions in shaping the structural and functional characteristics of aquatic ecosystems under changing climatic conditions.