Large-scale photochemical synthesis of high value chemicals under mild conditions is an ideal method of green chemical production. However, a scalable photocatalytic process has been barely reported due to the costly preparation, low stability of photosensitizers and critical reaction conditions required for classical photocatalysts. Here, we report the merging of flow chemistry with heterogeneous photoredox catalysis for the facile production of high value compounds in a continuous flow reactor with visible light at room temperature in air. In the flow reactor system, polymeric carbon nitrides, which are cheap, sustainable and stable heterogeneous photocatalysts, are immobilized onto glass beads and fibers, demonstrating a highly flexible construction possibility for devices of the photocatalytic materials. As an example of the production of high value chemicals, important chemical structures such as cyclobutanes, which are basic building blocks for many pharmaceutical compounds, like magnosalin, are synthesized in flow with high catalytic efficiency and stability.