We present a microfluidic device that detects trace concentrations of drugs of abuse in saliva within minutes using surface-enhanced Raman spectroscopy (SERS). Its operation is demonstrated using methamphetamine. The detection scheme exploits concentration gradients of chemicals, fostered by the laminar flow in the device, to control the interactions between the analyte, silver nanoparticles (Ag-NPs), and a salt. Also, since all species interact while advecting downstream, the relevant reaction coordinates occur with respect to the position in the channel. The system was designed to allow the analyte first to diffuse into the side stream containing the Ag-NPs, on which it is allowed to adsorb, before salt ions are introduced, causing the Ag-NPs to aggregate, and so creating species with strong SERS signal. The device allows partial separation via diffusion of the analyte from the complex mixture. Also, the reproducible salt-induced NP aggregation decouples the aggregation reaction (necessary for strong SERS) from the analyte concentration or charge. This method enables the creation of a region where detection of the analyte of interest via SERS is optimal, and dramatically extends the classes of molecules and quality of signals that can be measured using SERS, compared to bulk solution methods. The spatial distribution of the SERS signals was used to map the degree of nanoparticle aggregation and species diffusion in the channel, which, together with numerical simulations, was used to describe the kinetics of the colloid aggregation reaction, and to determine the optimal location in the channel for SERS interrogation.