An automated dispersive liquid-liquid microextraction integrated with gas chromatography and mass spectrometric procedure was developed for the determination of three N-nitrosamines (N-nitroso-di-n-propylamine, N-nitrosopiperidine, and N-nitroso di-n-butylamine) in water samples. Response surface methodology was employed to optimize relevant extraction parameters including extraction time, dispersive solvent volume, water sample pH, sodium chloride concentration, and agitation (stirring) speed. The optimal dispersive liquid-liquid microextraction conditions were 28 min of extraction time, 33 μL of methanol as dispersive solvent, 722 rotations per minute of agitation speed, 23% w/v sodium chloride concentration, and pH of 10.5. Under these conditions, good linearity for the analytes in the range from 0.1 to 100 μg/L with coefficients of determination (r(2) ) from 0.988 to 0.998 were obtained. The limits of detection based on a signal-to-noise ratio of 3 were between 5.7 and 124 ng/L with corresponding relative standard deviations from 3.4 to 5.9% (n = 4). The relative recoveries of N-nitroso-di-n-propylamine, N-nitrosopiperidine, and N-nitroso di-n-butylamine from spiked groundwater and tap water samples at concentrations of 2 μg/L of each analyte (mean ± standard deviation, n = 3) were (93.9 ± 8.7), (90.6 ± 10.7), and (103.7 ± 8.0)%, respectively. The method was applied to determine the N-nitrosamines in water samples of different complexities, such as tap water, and groundwater, before and after treatment, in a local water treatment plant.