Recent advances in end-to-end continuous-flow synthesis are rapidly expanding the capabilities of automated customized syntheses of small-molecule pharmacophores, resulting in considerable industrial and societal impacts; however, many hurdles persist that limit the number of sequential steps that can be achieved in such systems, including solvent and reagent incompatibility between individual steps, cumulated by-product formation, risk of clogging and mismatch of timescales between steps in a processing chain. To address these limitations, herein we report a strategy that merges solid-phase synthesis and continuous-flow operation, enabling push-button automated multistep syntheses of active pharmaceutical ingredients. We demonstrate our platform with a six-step synthesis of prexasertib in 65% isolated yield after 32 h of continuous execution. As there are no interactions between individual synthetic steps in the sequence, the established chemical recipe file was directly adopted or slightly modified for the synthesis of twenty-three prexasertib derivatives, enabling both automated early and late-stage diversification.