Coastal urban basins are highly vulnerable to flash flooding, yet the operational application of HEC-RAS 2D rain-on-grid models often involves time-consuming manual steps, from data conversion and file editing to execution and mapping. This study presents a dynamic, Python-based workflow for the Peraia coastal basin, Greece, a 57.3 km² 2D mesh of 16,190 cells on 2 m terrain, streamlining the pipeline without manual GUI interaction. Simulation window, time step, grid geometry and coordinate registration are read from the input file at run time, so a new dataset requires no edit to any script. NetCDF files are converted to HEC-DSS, the rainfall grid reprojected onto the model coordinate system, and the HEC-RAS unsteady flow and plan files updated by direct text manipulation. Simulations run programmatically via ras-commander under HEC-RAS 6.7 Beta 5, and results extracted from GeoTIFF rasters as maps of maximum water depth, flow velocity, depth–velocity hazard product, inundation boundaries, and flood arrival time. The pipeline is evaluated under five synthetic scenarios that redistribute a fixed 116.65 mm, 24 h design depth in time. The complete workflow runs unattended in 10 minutes per scenario against an estimated 75 minutes manually, a reduction of about 87 %. Redistribution left the maximum water depth essentially unchanged, within 2 %, but altered the inundated area by 14.5 % (8.18–9.36 km²), the mean flow velocity by 51 %, and the median flood arrival time by a factor of 16, from 0.8 to 13.5 hours. The late-peaked hyetograph produced the largest inundation, depth and velocity, the uniform the smallest. By reducing manual intervention and making every run reproducible, the workflow provides a scalable framework for rapid 2D hydrodynamic simulation and continuous scenario testing.